程序很简单,但是可以引申到很多小的细节 library IEEE; use IEEE.std_logic_1164.all; entity parity is port ( a: in STD_LOGIC_VECTOR (8 downto 0); b: out STD_LOGIC ); end parity; architecture parity_arch of parity is begin process(a) variable even:std_logic; begin even:='0'; for i in a'range loop if a(i)='1' then eve ..
[
查看全文]