没有合适的资源?快使用搜索试试~ 我知道了~
首页基于VHDL的HDB3码源代码
基于VHDL的HDB3码源代码

HDB3码的V B 双极性 译码等代码,需要的大大们给你们分享下,有帮助哦!
资源详情
资源评论
资源推荐

插V的实现很简单:相当于一个序列检测器。当检测到四个连0时,用双相码11取代第
四个0。
library ieee;
use ieee.std_logic_1164.all;
entity onev is
port(clk,clr,codein:in std_logic;
codeoutv:out std_logic_vector(1 downto 0 ));
end onev;
architecture one of onev is
signal count0:integer:=0;
begin
process(clk,clr)
begin
if (clk'event and clk='1') then
if (clr='1') then codeoutv<="00";count0<=0;
else
case codein is
when '1' => codeoutv<="01";count0<=0;
when '0' =>
if (count0=3) then codeoutv<="11";count0<=0;
else count0<=count0+1;codeoutv<="00";
end if;
when others => codeoutv<="00";count0<=count0;
end case;
end if;
end if;
end process;
end one;
插符号B的实现比较复杂点:
难点在于插入符号 B 在检测下一 V 之前,我们可以引入 4 位的移位寄存器 reg_4b 来解决难题。
library ieee;
use ieee.std_logic_1164.all;
entity twob is
port(clk,clr:in std_logic;
codeoutv:in std_logic_vector(1 downto 0);
codeoutb:out std_logic_vector(1 downto 0));
end twob;
architecture two of twob is
signal s1:std_logic_vector(3 downto 0) :="0000";
signal s0:std_logic_vector(3 downto 0) :="0000";















安全验证
文档复制为VIP权益,开通VIP直接复制

评论1