ex_p5_30_complementer.vhd

来自「This is the course for VHDL programming」· VHDL 代码 · 共 24 行

VHD
24
字号
entity comple_cell is	   port( A,ci: in BIT;           B,co: out BIT) ;	end comple_cell;architecture DF of comple_cell isbegin    co <= A or ci after 5 ns;    B <= A xor ci after 8 ns;end DF;entity comple_new is   generic(N:integer:=8);   port( A: in BIT_VECTOR(N-1 downto 0);           B: out BIT_VECTOR(N-1 downto 0)) ;	end comple_new;architecture struct of comple_new is    signal c:BIT_VECTOR(N downto 0);begin    c(0) <= '0';    G:for i in N-1 downto 0 generate    CM:entity work.comple_cell       port map(A(i),c(i),B(i),c(i+1));    end generate;end struct;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?