WIP: add cpu::test::decode_and_run_single_insn and some formal tests of running PowerISA instructions #15

Draft
programmerjake wants to merge 7 commits from programmerjake/cpu:decode-and-test-harness into master
Showing only changes of commit 9cecc6aaa0 - Show all commits

View file

@ -13,7 +13,7 @@ use crate::{
COMMON_MOP_SRC_LEN, L2RegNum, MOp, MOpDestReg, MOpRegNum, MOpTrait, PRegNum, ReadL2RegMOp,
UnitNum, UnitOutRegNum, WriteL2RegMOp,
},
next_pc::{CallStackOp, SimValueDefault},
next_pc::{CallStackOp, FETCH_BLOCK_ID_WIDTH, SimValueDefault},
register::{FlagsMode, PRegFlagsPowerISA, PRegValue},
rename_execute_retire::{
rename_table::{RenameTable, RenameTableDebugState, RenameTableEntry, RenameTableUpdate},
@ -42,7 +42,7 @@ pub type MOpId = UInt<{ MOP_ID_WIDTH }>;
#[hdl(custom_debug(sim))]
/// A &micro;Op along with the state needed for this instance of the &micro;Op.
pub struct MOpInstance<MOp> {
pub fetch_block_id: UInt<8>,
pub fetch_block_id: UInt<{ FETCH_BLOCK_ID_WIDTH }>,
pub id: MOpId,
pub pc: UInt<64>,
/// initialized to 0 by decoder, overwritten by `next_pc()`