基于FPGA的HDB3编译码的建模与实现 摘要 本文以FPGA为硬件平台,基于EDA工具QUARTUSⅡ为软件平台上对HDB3编/译码进行实现。由于在EDA的软件平台QUARTUSⅡ上不能处理双极性的信号,因此对HDB3码的编/译码的实现分为:软件部分和硬件部分。软件部分是基于QUARTUSⅡ的平台上对输入的码元进行编码和译码,通过系统仿真,验证了HDB3码的编译码的正确性;硬件部分采用CD74HC4052双四选一的数模选择器实现单极性到双极性的转换;采用AD790和SE5539实现双极性到单极性的转换。最后,通过仿真,验证了方案的正确性。 关键词:HDB3;建模;VHDL;编/译码;QUARTUSⅡ The Modeling and Realization of the HDB3 Encoding and Decoding Based on FPGA Wu Yingfa (College of Physics Science and Information Engineering,Jishou University,Jishou,Hunan 416000) Abstract The HDB3 encoding and decoding are realized based on taking FPGA as hardware platform and taking QUARTUSⅡ,a kind of EDA tool,as the software platform. Because QUARTUSⅡ can not deal with the bipolar of signal,the realization of HDB3’s encoding/decoding function is divided into two parts: software and hardware part. In the software part: the encoding/decoding of HDB3 are realized based on QUARTUSⅡ, and the simulation result that the realization is correct. In the hardware part: the CD74HC4052 are used to realize unipolar /bipolar transformation, at the same time, the AD790 and SE5539 are used to realize bipolar/unipolar transformation. At last, the efficiency of the above method is proved by the simulation results. Key words: HDB3;Modeling;VHDL;Encoding/Decoding;QUARTUSⅡ 目录 第一章绪论 1 第二章 EDA辅助设计工具的介绍 3 FPGA的介绍 3 PLD的介绍 3 FPGA的系统介绍 3 VHDL语言和QUARTUSⅡ 4 VHDL语言 4 EDA工具QUARTUSⅡ 5 第三章 HDB3码编码器的建模与实现 6 HDB3码的编码规则 6 基于VHDL的编码器的建模及实现 6 编码器的VHDL建模及难点分析 7 基于VHDL编码器的实现 7 11 11 11 11 HDB3码编码器的波形仿真及分析 11 小结 11 第四章 HDB3码译码器的建模与实现 11 HDB3码的译码规则及建模 11 译码中双/单极性的实现 11 基于VHDL译码器的实现 11 11 HDB3码译码器的程序设计 11 HDB3码译码器的波形仿真及分析 11 小结 11 第五章结束语 11 参考文献 11 致谢 26 附录一 11 附录二 11 第一章绪论 数字基带信号的传输是数字通信系统的重要组成部分之一。特别是HDB3(High Density Bipolar-3 Coding,三阶高密度双极性码)码的使用,其不但保持AMI(Alternation mark Inversion