WIP: implement more instructions in unit::alu_branch #14
5 changed files with 34028 additions and 8 deletions
|
|
@ -245,14 +245,12 @@ fn add_sub<C: PhantomConstCpuConfig, SrcCount: KnownSize>(
|
|||
#[hdl]
|
||||
fn logical_flags<C: PhantomConstCpuConfig>(
|
||||
global_state: Expr<GlobalState>,
|
||||
pc: Expr<UInt<64>>,
|
||||
mop: Expr<LogicalFlagsMOp<PRegNum<C>, PRegNum<C>>>,
|
||||
src_values: Expr<Array<TraceAsString<PRegValue>, { COMMON_MOP_SRC_LEN }>>,
|
||||
) -> Expr<TraceAsString<PRegValue>> {
|
||||
#[hdl]
|
||||
let GlobalState { flags_mode } = global_state;
|
||||
// TODO: finish
|
||||
PRegValue::zeroed().to_trace_as_string()
|
||||
let GlobalState { flags_mode: _ } = global_state;
|
||||
LogicalFlagsMOp::operation(mop, src_values.map(|v| *v)).to_trace_as_string()
|
||||
}
|
||||
|
||||
#[hdl]
|
||||
|
|
@ -896,10 +894,7 @@ pub fn alu_branch(config: PhantomConst<CpuConfig>, unit_index: usize) {
|
|||
);
|
||||
}
|
||||
AluBranchMOp::<_, _>::LogicalFlags(mop) => {
|
||||
connect(
|
||||
dest_value,
|
||||
logical_flags(global_state, mop_instance.pc, mop, src_values),
|
||||
);
|
||||
connect(dest_value, logical_flags(global_state, mop, src_values));
|
||||
}
|
||||
AluBranchMOp::<_, _>::Logical(mop) => {
|
||||
connect(
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
14369
crates/cpu/tests/expected/rename_execute_retire_head_n1_real.vcd
generated
14369
crates/cpu/tests/expected/rename_execute_retire_head_n1_real.vcd
generated
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue