PickHDB3 yards ( third-order high-density dual polarity yards) is the most commonly used in modern transmission system is one of the MaXing, is widely This study is based on the main content of the HDB3 yards encoder CPLD device First of HDB3 yards and CPLD application and research status were introduced, This paper used to MaxPlusII and VHDL language software, Finally HDB3 yards are analyzed in detail by VHDL language encoding principle and realization Based on the principle of coding HDB3 yards, the paper analyzes the design scheme of HDB3 code design mainly divided into three coder realized module ( insert V module, modeling and realize the modeling and realization, B module modeling and realize polarity transform module) After completion, the software design in the simulation, MaxPlus2 test results and the design idea of early, so right, completed based on simulation HDB3 code design of CPLD Keywords: HDB3, VHDL, Polarity transformation