unit::alu_branch: implement for LogicalFlagsMOp
Some checks failed
/ test (pull_request) Has been cancelled
Some checks failed
/ test (pull_request) Has been cancelled
This commit is contained in:
parent
99c019431b
commit
3bff2bd224
1 changed files with 3 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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue