element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Forum 基于CPLD/FPGA的CMI编码设计与实现
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 0 replies
  • Subscribers 558 subscribers
  • Views 1221 views
  • Users 0 members are here
  • cpld
  • cmi编码
  • vhdl
Related

基于CPLD/FPGA的CMI编码设计与实现

Flush
Flush over 14 years ago

引言

 

CMI码是传号反转码的简称,它是一种应用于PCM四次群和光纤传输系统中的常用线路码型,具有码变换设备简单、有较多的电平跃变,含有丰富的定时信息,便于时钟提取,有一定的纠错能力等优点。
在高次脉冲编码调制终端设备中广泛应用作接口码型,在速率低于8 448 Kb/s的光纤数字传输系统中也被建议作为线路传输码型。

 

本文针对光纤通信传输码型的要求和CMI码的编码原理,介绍了一种以EPM系列7064芯片为硬件平台,以Max+PlusⅡ为软件平台,以VHDL为开发工具,适合于CPLD实现的CMI编码器的设计方案。

1 CMI码的编码规则

 

CMI编码规则如表1所示。

image

在CMI编码中,输入码字0直接输出01码型,较为简单。对于输入为1的码字,其输出CMI码字存在两种结果OO或11码,因而对输入1的状态必须记忆。同时,编码后的速率增加一倍。

2 CMI编码器的建模与实现

 

首先在原始时钟MUX_Clk的上升沿进行翻转得到二分频时钟Clk,周期为原始时钟的2倍。
然后产生伪随机序列,由3个D触发器产生7位伪随机序列,序列产生原理如图1所示。

image
任何一个D触发器的输出都可以作为要产生的m序列,则序列以7为周期循环出现,在3个D触发器输出都为0时,语句m_buffer(2)<=(m_bu-ffer(1)xor m_buffer(O))Or((not m_buffer(2))and(not m_buffer(1))and(not m_buffer(O))),可以使第一个D触发器在Clk上升沿到来时输出为1,从而避免陷入“000"的死循环。

 

最后为“O”码、“1”码的编码:
“O”编码的实现:在原始时钟信号的下降沿对m序列进行检测,当其值为“0”时,将原始信号的二分频后的信号求非赋值给编码输出,即可实现对“O”进行“01”编码。

 

“1”编码的实现:在原始时钟信号的二分频信号的上升沿对m序列进行检测,如果其值为“1”,用表达式statel<=statel X0R m_buff(O)对“1”的奇偶进行记录;在原始时钟的下降沿,将statel的值赋给编码输出即可实现对“1”的“00”,“11”交替编码。

image

其中:m_test:产生的m序列;
MUX_DT:CMI编码输出;
MUX_CLK:原始时钟。

3 仿真结果

在Max+PlusⅡ平台下对CMI编码进行编译和仿真,最后得到CMI编码仿真结果。图2是CMI码编码波形图。

image
在时钟MUX_CLK驱动下工作,m_test是产生的m序列1011100,MUX_的DT为CMI编码输出,可以看到,编码为11010011000101,有一定延时,但编码完全正确。

4 结语

 

该设计详细介绍了基于CPLD的CMI编码的实现方法。提出利用原始信号的二分频后的信号求非赋值给编码输出,得到“0”的编码,利用缓存对“1”的个数进行记录,而对“1”进行编码的编程思路,利用VHDL进行程序设计实现,在Max+PlusⅡ平台下对设计结果进行仿真,结果完全正确。
实践表明,运用CPLD实现CMI编码具有软件开发周期短、成本低、执行速度高、实时性强、升级方便等特点,而且可以把该电路和其他功能电路集成在同一块CPLD/FPGA中,减少了外接元件的数目,提高了集成度,而且有很大的编程灵活性,很强的移植性,因此有很好的应用前景。

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube