rename_execute_retire: don't include completed instructions in space used by a unit

This commit is contained in:
Jacob Lifshay 2026-05-20 16:48:45 -07:00
parent 0d69666b00
commit e502dfe574
Signed by: programmerjake
SSH key fingerprint: SHA256:HnFTLGpSm4Q4Fj502oCFisjZSoakwEuTsJJMSke63RQ
5 changed files with 82592 additions and 85181 deletions

View file

@ -581,6 +581,15 @@ impl MOpInUnitState {
Self::FinishedAndOrCausedCancel => None,
}
}
fn is_completed(self) -> bool {
match self {
Self::NotYetEnqueued => false,
Self::InputsNotReadySpeculative { .. } => false,
Self::InputsReady { .. } => false,
Self::OutputReady { .. } => false,
Self::FinishedAndOrCausedCancel => true,
}
}
}
impl fmt::Debug for MOpInUnitState {
@ -1213,7 +1222,7 @@ impl<C: PhantomConstCpuConfig> RenameExecuteRetireState<C> {
fn space_available_for_unit(&self, unit_index: usize) -> usize {
let mut retval = self.config.get().unit_max_in_flight(unit_index);
for renamed in self.rob.renamed() {
if renamed.unit_index == unit_index {
if renamed.unit_index == unit_index && !renamed.mop_in_unit_state.is_completed() {
let Some(v) = NonZero::new(retval.get() - 1) else {
return 0;
};

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

File diff suppressed because it is too large Load diff