谢谢版主回复, 就是RS Latch. 好象是Synplify要求明确写出Clock和Reset信号才可以, 如果我加了cp 和rst, 那两个warning会消除(会有别的出现, 但似乎不影响功能) . 修改后的代码. library ieee; use ieee.std_logic_1164.all; entity rs_latch is port ( r : in std_logic; s : in std_logic; rst : in std_logic; --clock cp : in std_logic; q : out std_logic; iq : out std_logic); end rs_latch; architecture bhv_latch of rs_latch is begin process(r, s, cp, rst) begin -- level senstive if rst = '0' then q <= '0'; iq <= '1'; elsif rst= '1' then if cp'event and cp = '1' and r = '0' then q <= '0'; iq <= '1'; elsif cp'event and cp = '1' and s = '0' then q <= '1'; iq <= '0'; end if; end if; end process; end bhv_latch; |