我用VHDL写个4选1多路选择器,用MAX+PLUS的,老是报错,大家帮我看看呀。谢谢大家。
library ieee; use ieee.std_logic_1164.all; entity mux41 is port ( s1,s0,a,b,c,d: in std_logic; y: out std_logic); end entity mux41; architecture one of mux41 is signal H1,H0: std_logic_vector(1 to 0); begin process (H1,H0) begin if H1='0' and H0='0' then y <= a; end if; if H1='0' and H0='1' then y <= b; end if; if H1='1' and H0='0' then y <= c; end if; if H1='1' and H0='1' then y <= d; end if ; end process; end architecture one;
|