小弟是初学者,才写的1位全加器的代码,用MAX+plus的,老是报这样的错:node'\mux21a:u2\:23.in1' missing source, 麻烦大家帮忙看看<br />,谢谢!<br />library ieee;<br />use ieee.std_logic_1164.all;<br />entity muxk is <br />port (a1,a2,a3,s0,s1: in std_logic;<br /> outy : out std_logic);<br />end entity muxk;<br />architecture a of muxk is <br />component mux21a<br />port ( a,b,s: in std_logic;<br /> y: out std_logic);<br />end component ;<br />signal tmp: std_logic;<br />begin<br />u1: mux21a port map ( a=>a2, b=>a3,s=>s0);<br />u2: mux21a port map ( a=>a1, b=>tmp, s=>s1,y=>outy);<br />end architecture a;<br /><br />library ieee;<br />use ieee.std_logic_1164.all;<br />entity mux21a is<br />port(a,b : in std_logic;<br /> s: in std_logic;<br /> y: out std_logic);<br />end mux21a ;<br />architecture b_mux21a of mux21a is<br />begin<br /> y<=(a and (not s)) or (b and s);<br />end b_mux21a;<br /><br />library ieee;<br />use ieee.std_logic_1164.all;<br />entity mux21a is<br />port(a,b : in std_logic;<br /> s: in std_logic;<br /> y: out std_logic);<br />end mux21a ;<br />architecture b_mux21a of mux21a is<br />begin<br /> process (a,b,s)<br />begin<br />if s='0' then y<=a;<br />else y<=b;<br />end if;<br />end process;<br />end b_mux21a;<br /> |
|