正在加载图片...
入/输出关系) 直接赋值语句 信号名<=信号值(表达式); 要点 赋值式双方应为相同类型 当采用一种类型时,表达式涉及的运算应与该类型相容; 实际数字电路中,信号的类型通常为“ STD LOGIO”,对 应的运算通常为逻辑运算 24译码器(采用赋值语句 library ieee td logic 1164. all entity decoder 24 is port(a: in std logic vector(I downto 0); f: out std logic vector(3 downto 0)); end decoder 24 architecture d of decoder 24 is f(o)<=not a(l)and not a(0) f(1)<=not a(1)and a(0) f(2)<=a(1)and not a(0) f(3)<=a(1)anda(0),入/输出关系) end d; 直接赋值语句: 信号名<= 信号值(表达式); 要点: 赋值式双方应为相同类型; 当采用一种类型时,表达式涉及的运算应与该类型相容; 实际数字电路中,信号的类型通常为“STD_LOGIC”,对 应的运算通常为逻辑运算; 例: 2-4 译码器(采用赋值语句) library ieee; use ieee.std_logic_1164.all; entity kdecoder24 is port (a: in std_logic_vector (1 downto 0); f: out std_logic_vector (3 downto 0) ); end kdecoder24; architecture d of kdecoder24 is begin f(0) <= not a(1) and not a(0); f(1) <= not a(1) and a(0); f(2) <= a(1) and not a(0); f(3) <= a(1) and a(0); end d;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有