@ -7,6 +7,10 @@ use work.common.all;
use work.decode_types.all;
use work.decode_types.all;
entity decode1 is
entity decode1 is
generic (
-- Non-zero to enable log data collection
LOG_LENGTH : natural := 0
);
port (
port (
clk : in std_ulogic;
clk : in std_ulogic;
rst : in std_ulogic;
rst : in std_ulogic;
@ -357,8 +361,6 @@ architecture behaviour of decode1 is
constant nop_instr : decode_rom_t := (ALU, OP_NOP, NONE, NONE, NONE, NONE, '0', '0', '0', '0', ZERO, '0', NONE, '0', '0', '0', '0', '0', '0', NONE, '0', '0');
constant nop_instr : decode_rom_t := (ALU, OP_NOP, NONE, NONE, NONE, NONE, '0', '0', '0', '0', ZERO, '0', NONE, '0', '0', '0', '0', '0', '0', NONE, '0', '0');
constant fetch_fail_inst: decode_rom_t := (LDST, OP_FETCH_FAILED, NONE, NONE, NONE, NONE, '0', '0', '0', '0', ZERO, '0', NONE, '0', '0', '0', '0', '0', '0', NONE, '0', '0');
constant fetch_fail_inst: decode_rom_t := (LDST, OP_FETCH_FAILED, NONE, NONE, NONE, NONE, '0', '0', '0', '0', ZERO, '0', NONE, '0', '0', '0', '0', '0', '0', NONE, '0', '0');
signal log_data : std_ulogic_vector(12 downto 0);
begin
begin
decode1_0: process(clk)
decode1_0: process(clk)
begin
begin
@ -524,6 +526,9 @@ begin
flush_out <= f.redirect;
flush_out <= f.redirect;
end process;
end process;
d1_log: if LOG_LENGTH > 0 generate
signal log_data : std_ulogic_vector(12 downto 0);
begin
dec1_log : process(clk)
dec1_log : process(clk)
begin
begin
if rising_edge(clk) then
if rising_edge(clk) then
@ -534,5 +539,6 @@ begin
end if;
end if;
end process;
end process;
log_out <= log_data;
log_out <= log_data;
end generate;
end architecture behaviour;
end architecture behaviour;