unit::alu_branch: implement for LogicalFlagsMOp
All checks were successful
/ test (pull_request) Successful in 6m41s
All checks were successful
/ test (pull_request) Successful in 6m41s
This commit is contained in:
parent
99c019431b
commit
b25448a275
5 changed files with 34028 additions and 8 deletions
|
|
@ -245,14 +245,12 @@ fn add_sub<C: PhantomConstCpuConfig, SrcCount: KnownSize>(
|
||||||
#[hdl]
|
#[hdl]
|
||||||
fn logical_flags<C: PhantomConstCpuConfig>(
|
fn logical_flags<C: PhantomConstCpuConfig>(
|
||||||
global_state: Expr<GlobalState>,
|
global_state: Expr<GlobalState>,
|
||||||
pc: Expr<UInt<64>>,
|
|
||||||
mop: Expr<LogicalFlagsMOp<PRegNum<C>, PRegNum<C>>>,
|
mop: Expr<LogicalFlagsMOp<PRegNum<C>, PRegNum<C>>>,
|
||||||
src_values: Expr<Array<TraceAsString<PRegValue>, { COMMON_MOP_SRC_LEN }>>,
|
src_values: Expr<Array<TraceAsString<PRegValue>, { COMMON_MOP_SRC_LEN }>>,
|
||||||
) -> Expr<TraceAsString<PRegValue>> {
|
) -> Expr<TraceAsString<PRegValue>> {
|
||||||
#[hdl]
|
#[hdl]
|
||||||
let GlobalState { flags_mode } = global_state;
|
let GlobalState { flags_mode: _ } = global_state;
|
||||||
// TODO: finish
|
LogicalFlagsMOp::operation(mop, src_values.map(|v| *v)).to_trace_as_string()
|
||||||
PRegValue::zeroed().to_trace_as_string()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[hdl]
|
#[hdl]
|
||||||
|
|
@ -896,10 +894,7 @@ pub fn alu_branch(config: PhantomConst<CpuConfig>, unit_index: usize) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
AluBranchMOp::<_, _>::LogicalFlags(mop) => {
|
AluBranchMOp::<_, _>::LogicalFlags(mop) => {
|
||||||
connect(
|
connect(dest_value, logical_flags(global_state, mop, src_values));
|
||||||
dest_value,
|
|
||||||
logical_flags(global_state, mop_instance.pc, mop, src_values),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
AluBranchMOp::<_, _>::Logical(mop) => {
|
AluBranchMOp::<_, _>::Logical(mop) => {
|
||||||
connect(
|
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