pim-simulator dump inst function
This commit is contained in:
@@ -46,6 +46,10 @@ impl Instruction {
|
||||
.with_context(|| format!("Error in core: {}", self.data.core_indx() - 1))
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub(crate) fn dump(&self) {
|
||||
eprintln!("\t{}", functor_to_name(self.functor as usize));
|
||||
}
|
||||
}
|
||||
|
||||
pub type Instructions = Vec<Instruction>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#![allow(unused)]
|
||||
|
||||
use crate::{
|
||||
cpu::CPU, instruction_set::{Instruction, InstructionStatus, Instructions}, memory_manager::type_traits::TryToUsize, send_recv::{SendRecv, handle_send_recv}, tracing::TRACER
|
||||
cpu::CPU, instruction_set::{Instruction, InstructionStatus, Instructions, isa::functor_to_name}, memory_manager::type_traits::TryToUsize, send_recv::{SendRecv, handle_send_recv}, tracing::TRACER
|
||||
};
|
||||
pub mod cpu;
|
||||
pub mod instruction_set;
|
||||
@@ -131,6 +131,16 @@ impl Executable {
|
||||
pub fn cpu_mut(&mut self) -> &mut CPU {
|
||||
&mut self.cpu
|
||||
}
|
||||
|
||||
pub fn dump(&self) {
|
||||
let core_instructions = &self.core_instructions;
|
||||
for (i, core_instruction) in core_instructions.iter().enumerate() {
|
||||
eprintln!("INST OF CORE {}:", i);
|
||||
for inst in &core_instruction.instructions {
|
||||
inst.dump();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_wait_sync(cpu: &mut CPU, core_instructions: &mut [CoreInstruction], core_result: InstructionStatus) {
|
||||
|
||||
Reference in New Issue
Block a user