数字基带信号HDB3码的编码器设计与建模

上传人:无*** 文档编号:78986833 上传时间:2022-04-22 格式:DOC 页数:4 大小:947KB
收藏 版权申诉 举报 下载
数字基带信号HDB3码的编码器设计与建模_第1页
第1页 / 共4页
数字基带信号HDB3码的编码器设计与建模_第2页
第2页 / 共4页
数字基带信号HDB3码的编码器设计与建模_第3页
第3页 / 共4页
资源描述:

《数字基带信号HDB3码的编码器设计与建模》由会员分享,可在线阅读,更多相关《数字基带信号HDB3码的编码器设计与建模(4页珍藏版)》请在装配图网上搜索。

1、-hdb3_coder.vhd,实现HDB3编码器功能library ieee;use ieee.std_logic_1164.all;entity hdb3_coder isport(codein:in std_logic; clk:in std_logic; clr:in std_logic; codeout:out std_logic_vector(1 downto 0);end hdb3_coder;architecture rtl of hdb3_coder issignal codeoutv:std_logic_vector(1 downto 0);signal count0:in

2、teger:=0;signal s0:std_logic_vector(4 downto 0):=00000;signal count1:integer range 1 downto 0;signal codeoutb:std_logic_vector(1 downto 0);signal s1:std_logic_vector(4 downto 0):=00000;signal clkb:std_logic;signal s3:std_logic_vector(1 downto 0);signal flag1b:integer range 1 downto 0;signal flagv:in

3、teger range 1 downto 0;signal firstv:integer range 0 to 1;component dff-调元件dff port(d:in std_logic; clk:in std_logic; q :out std_logic);end component;begin add_v:process(clk,clr) -插V begin if(rising_edge(clk)then if(clr=1)then codeoutv=00; count0codeoutv=01; -01代表1 count0 if(count0=3)then -四连0插v cod

4、eoutv=11; count0=0; else count0=count0+1; codeoutv codeoutv=00; count0=count0; end case; end if; end if;end process add_v;s0(0)=codeoutv(0);s1(0)=codeoutv(1);dsll:dff port map(s1(0),clk,s1(1);ds01:dff port map(s0(0),clk,s0(1);dsl2:dff port map(s1(1),clk,s1(2);ds02:dff port map(s0(1),clk,s0(2);dsl3:d

5、ff port map(s1(2),clk,s1(3);ds03:dff port map(s0(2),clk,s0(3);-dsl4:dff port map(s1(3),clk,s1(4);-ds04:dff port map(s0(3),clk,s0(4);-dsl5:dff port map(s1(4),clk,s1(5);-ds05:dff port map(s0(4),clk,s0(5);bclk:clkb=not clk;add_b:process(clkb) -插B begin if(rising_edge(clkb)then if(codeoutv=11)then if(fi

6、rstv=0)then count1=0; firstv=1; s1(4)=s1(3); s0(4)=s0(3); else if(count1=0)then s1(4)=1; s0(4)=0; count1=0; else s1(4)=s1(3); s0(4)=s0(3); count1=0; end if; end if; elsif(codeoutv=01)then count1=count1+1; s1(4)=s1(3); s0(4)=s0(3); else s1(4)=s1(3); s0(4)=s0(3); count1=count1; end if; end if; end pro

7、cess add_b;codeoutb=s1(4)&s0(4);output:process(clkb) -输出 begin if(rising_edge(clkb)then if(codeoutb=01)or(codeoutb=10)then -1或B if(flag1b=1)then codeout=01; flag1b=0; else codeout=11; flag1b=1; end if; elsif(codeoutb=11)then -V if(flag1b=1)then codeout=11; else codeout=01; end if; else codeout=00; flag1b=flag1b; end if; end if; end process output;end rtl;

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!