2 use ieee.std_logic_1164.all;
3 use ieee.numeric_std.all;
7 use work.wishbone_types.all;
14 stall_in : in std_ulogic;
15 stall_out : out std_ulogic;
17 flush_in : in std_ulogic;
19 i_in : in IcacheToFetch2Type;
20 i_out : out Fetch2ToIcacheType;
22 f_in : in Fetch1ToFetch2Type;
24 f_out : out Fetch2ToDecode1Type
28 architecture behaviour of fetch2 is
29 signal r, rin : Fetch2ToDecode1Type;
33 if rising_edge(clk) then
34 -- Output state remains unchanged on stall, unless we are flushing
35 if rst = '1' or flush_in = '1' or stall_in = '0' then
42 variable v : Fetch2ToDecode1Type;
46 -- asynchronous icache lookup
48 i_out.addr <= f_in.nia;
52 stall_out <= not i_in.ack;
55 if flush_in = '1' then
65 end architecture behaviour;