calling mem_checker in main

This commit is contained in:
Baptiste
2023-02-15 18:01:50 +01:00
parent 4425ac747e
commit 39b7db864a
4 changed files with 75 additions and 66 deletions

View File

@ -155,7 +155,7 @@ impl Machine {
/// - **machine** which contains a table of instructions
pub fn run(machine : Machine){
let mut m = machine;
loop{
for i in 0..MEM_SIZE{
Machine::one_instruction(&mut m);
}
}
@ -190,7 +190,8 @@ impl Machine {
let val = u64::from_le_bytes(val);
let inst : Instruction = decode(val);
print!("executing instruction {}\n", val);
print!("executing instruction {}\n", inst.opcode);
match inst.opcode {
RISCV_LUI => {