buffer我试过了,就是可以在entity内部可以回读的out
entity test_buffer is Port ( clk : in STD_LOGIC; in1 : in STD_LOGIC; out1 : buffer STD_LOGIC); end test_buffer;
architecture Behavioral of test_buffer is
begin p_reg1: process (clk) begin if rising_edge (clk) then out1<= not out1; else null; end if; end process p_reg1;
end Behavioral;
和下面的代码生成的硬件是一样的
entity test_buffer is Port ( clk : in STD_LOGIC; in1 : in STD_LOGIC; out1 : out STD_LOGIC); end test_buffer;
architecture Behavioral of test_buffer is
begin
signal S_out1: std_logic:='0'; p_reg1: process (clk) begin if rising_edge (clk) then S_out1<= not S_out1; else null; end if; end process p_reg1;
out1<=S_out1;
end Behavioral;
|