adapt code for new fayalite features

This commit is contained in:
Jacob Lifshay 2026-05-03 18:22:21 -07:00
parent 1229d9c758
commit ba9ec3bd29
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
9 changed files with 56 additions and 544 deletions

View file

@ -1817,20 +1817,8 @@ impl<C: PhantomConstCpuConfig> MockUnitOp<C> {
mop,
src_values,
sent_cant_cause_cancel,
output_ready: if let Some(output_ready) = output_ready {
#[hdl(sim)]
output_ready_ty.HdlSome(output_ready)
} else {
#[hdl(sim)]
output_ready_ty.HdlNone()
},
caused_cancel: if let Some(caused_cancel) = caused_cancel {
#[hdl(sim)]
caused_cancel_ty.HdlSome(caused_cancel)
} else {
#[hdl(sim)]
caused_cancel_ty.HdlNone()
},
output_ready: output_ready.into_sim_value_with_type(output_ready_ty),
caused_cancel: caused_cancel.into_sim_value_with_type(caused_cancel_ty),
config,
}
}
@ -1985,20 +1973,8 @@ impl<C: PhantomConstCpuConfig, E: MockExecutionStateTrait> MockUnitState<C, E> {
if op.output_ready.is_none() && op.caused_cancel.is_none() {
continue;
}
let output_ready = if let Some(output_ready) = &op.output_ready {
#[hdl(sim)]
output_ready_ty.HdlSome(output_ready)
} else {
#[hdl(sim)]
output_ready_ty.HdlNone()
};
let caused_cancel = if let Some(caused_cancel) = &op.caused_cancel {
#[hdl(sim)]
caused_cancel_ty.HdlSome(caused_cancel)
} else {
#[hdl(sim)]
caused_cancel_ty.HdlNone()
};
let output_ready = op.output_ready.to_sim_value_with_type(output_ready_ty);
let caused_cancel = op.caused_cancel.to_sim_value_with_type(caused_cancel_ty);
// TODO: add delay
return (
output_ready,
@ -2301,20 +2277,8 @@ impl<C: PhantomConstCpuConfig> MockLoadStoreOp<C> {
MockLoadStoreOpDebugState::<_> {
mop,
is_speculative,
src_values: if let Some(v) = src_values {
#[hdl(sim)]
HdlSome(v)
} else {
#[hdl(sim)]
HdlNone()
},
dest_value: if let Some(v) = dest_value {
#[hdl(sim)]
HdlSome(v)
} else {
#[hdl(sim)]
HdlNone()
},
src_values,
dest_value,
ran_nonspeculatively,
sent_cant_cause_cancel,
sent_output_ready,