用quartus 做的4选1选择器 求指导啊。。 老是报错。。

library ieee;
use ieee.std_logic_1164.all;

entity when_else is
port ( s0,s1 : in bit;
a,b,c,d : in std_logic;
y : out std_logic);
end;

architecture bhv of when_else is

begin
process(s0,s1)
begin
y<=a when s0<='0' and s1<='0' else
b when s0<='0' and s1<='1' else
c when s0<='1' and s1<='0' else
d;
end process;
end bhv;

报错提示是什么?error还是waring?而且,你这段话若不是截取的话,确实存在问题啊追问

Error (10500): VHDL syntax error at if_then.vhd(5) near text "port"; expecting "is" 报错是这个

不是截取的 我才学 不是很懂。。 存在的问题是什么呢?初学。。 麻烦详细点 谢谢了。

温馨提示:答案为网友推荐,仅供参考