library ieee;
use ieee.std_logic_1164.all;
-- **********************************************
-- ************* entity ****************
-- **********************************************
entity MUX21 is
port
(
-- Input ports
a : in std_logic;
b : in std_logic;
s : in std_logic;
y : out std_logic
);
end MUX21;
-- **********************************************
-- ************* architecture ****************
-- **********************************************
architecture MUX21_a of MUX21 is
begin
y <= a when s='0' else
b when s='1';
end MUX21_a;
Warning: LATCH primitive "y$latch" is permanently enabled
将y <= a when s='0' else
b when s='1';
改成
y <= a when s='1' else
b when s='0';
后就没有警告了,为什么?警告的内容是什么意思? |