这段VHDL代码实现了什么功能啊

lc123300798   2009-6-11 18:52 楼主
entity test is
  port(A,B:in bit_vector(3 downto 0);
  ALTB_N,AEQB_N,AGTB_N:out bit;
end COMP;
architecture com of test is
signal temp:bit_vector(1 downto 0);
begin
process(A,B)
   begin
   temp<="00";
   if A>B then temp<='1';
     else if A      end if;
    end process;
(ALTB_N,AGTB_N)<=temp;
AEQB_N<=not(temp(1)or temp(0));
end com;


本人刚接触VHDL,望指教

回复评论 (2)

比较器
点赞  2009-6-11 19:31
if A>B then (ALTB_N,AGTB_N) = "01", AEQB_N = 0
if A if A==B then (ALTB_N,AGTB_N) = "00", AEQB_N = 1

就这三种情况。
点赞  2009-6-12 11:09
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复