diff --git a/lib/CPUs/MIPS/src/core/mips_types.vhd b/lib/CPUs/MIPS/src/core/mips_types.vhd index 9b55bcc..fd83491 100644 --- a/lib/CPUs/MIPS/src/core/mips_types.vhd +++ b/lib/CPUs/MIPS/src/core/mips_types.vhd @@ -213,7 +213,7 @@ package mips_types is end record; type event_t is record - Int : unsigned(5 downto 0); + Int : STD_LOGIC; data_load_err : STD_LOGIC; data_store_err : STD_LOGIC; inst_load_err : STD_LOGIC; @@ -259,11 +259,13 @@ package mips_types is epc_wb : word_t; imem_addr : word_t; dmem_addr : word_t; - exc_left : STD_LOGIC; + exc_req : STD_LOGIC; + exc_ack : STD_LOGIC; end record; type cop0_ctrl_out_t is record RE : STD_LOGIC; + exc_inject : STD_LOGIC; exc_commit : STD_LOGIC; exc_pending : STD_LOGIC; exc_exit : STD_LOGIC; @@ -393,8 +395,9 @@ package mips_types is type WB_t is record nop : STD_LOGIC; + exc : std_logic; + events : event_t; op : op_t; - epc : word_t; reg_wptr : reg_ptr_t; wreg_we : STD_LOGIC; data : word_t; @@ -593,7 +596,7 @@ package body mips_types is function events_clr return event_t is variable result : event_t; begin - result.Int := (others => '0'); + result.Int := '0'; result.data_load_err := '0'; result.data_store_err := '0'; result.inst_load_err := '0'; @@ -614,10 +617,7 @@ package body mips_types is begin result := '0'; - for i in e.Int'range loop - result := result or e.Int(i); - end loop; - + result := result or e.Int; result := result or e.data_load_err; result := result or e.data_store_err; result := result or e.inst_load_err; @@ -636,9 +636,7 @@ package body mips_types is function "or" (a, b : event_t) return event_t is variable result : event_t; begin - for i in a.Int'range loop - result.Int(i) := a.Int(i) or b.Int(i); - end loop; + result.Int := a.Int or b.Int; result.data_load_err := a.data_load_err or b.data_load_err; result.data_store_err := a.data_store_err or b.data_store_err; result.inst_load_err := a.inst_load_err or b.inst_load_err;