Аннотация:In this study we consider a two-dimensional Dirac model with inhomogeneous energy gap. New generalizations of the domain-wall fermions formalism are proposed. It is shown that the step-terrace surface structure of the domain wall leads to the appearance of localized massive fermion states.