正在加载图片...
I<=yLi when (gl and not g2al and not g2bl)-1 end 将上述程序稍加改动可以得到二进制-十进制译码器设计; 二进制译码器也可以采用其他设计方式实现: 在54.7节中展示了多种设计程序; 码制转换电路 该类电路为多路输入/多路输出,将输入的编码转换为对应 的输出的编码;上述二进制译码器的数据流设计方式可以推 广到各类码制转换电路的设计中; 例: BCD-Excess3(余3码)的转换p49表29 要求:输入4位BCD码,输出4位余3码(正函数) KBCD EX3 aa.1yta· library ieee use ieee std logic 1164. all; entity kbcd ex3 is port(a: in std logic vector(3 downto 0); y: out std logic vector(3 downto O)) end kbcd ex3 architecture rtl of kbcd ex3 is with a select y<= 0111" when "0000""0100"when 0001 0101"".0110" when"0011yl<=yLi when (g1 and not g2al and not g2bl)='1' else "11111111"; end rtl; 将上述程序稍加改动可以得到二进制-十进制译码器设计; 二进制译码器也可以采用其他设计方式实现: 在 5.4.7 节中展示了多种设计程序; 码制转换电路 该类电路为多路输入/多路输出,将输入的编码转换为对应 的输出的编码;上述二进制译码器的数据流设计方式可以推 广到各类码制转换电路的设计中; 例:BCD—Excess-3(余 3 码)的转换 p.49 表 2-9 要求:输入 4 位 BCD 码,输出 4 位余 3 码(正函数) library ieee; use ieee.std_logic_1164.all; entity kbcd_ex3 is port (a: in std_logic_vector(3 downto 0); y: out std_logic_vector(3 downto 0)); end kbcd_ex3; architecture rtl of kbcd_ex3 is begin with a select y<= "0111" when "0000", "0100" when "0001", "0101" when "0010", "0110" when "0011
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有