diff --git a/mips/src/components/instr_mem.rs b/mips/src/components/instr_mem.rs index d3e22b95..c9508c52 100644 --- a/mips/src/components/instr_mem.rs +++ b/mips/src/components/instr_mem.rs @@ -58,6 +58,10 @@ impl Component for InstrMem { simulator.set_out_value(&self.id, INSTR_MEM_OUT_ID, instr); Ok(()) } + + fn as_any(&self) -> &dyn std::any::Any { + self + } } impl InstrMem { diff --git a/mips/src/components/reg_file.rs b/mips/src/components/reg_file.rs index 56f849a4..4a776f4c 100644 --- a/mips/src/components/reg_file.rs +++ b/mips/src/components/reg_file.rs @@ -263,6 +263,9 @@ impl Component for RegFile { simulator.set_out_value(&self.id, REG_FILE_REG_B_OUT, reg_value_b); Ok(()) } + fn as_any(&self) -> &dyn std::any::Any { + self + } } #[cfg(test)]