Skip to content

Commit

Permalink
as_any impl for mips components
Browse files Browse the repository at this point in the history
  • Loading branch information
onsdagens committed Jun 7, 2024
1 parent 3819153 commit 1a58ef7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mips/src/components/instr_mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions mips/src/components/reg_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit 1a58ef7

Please sign in to comment.