rename_execute_retire: don't include completed instructions in space used by a unit
This commit is contained in:
parent
0d69666b00
commit
e502dfe574
5 changed files with 82592 additions and 85181 deletions
|
|
@ -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
56945
crates/cpu/tests/expected/rename_execute_retire_head_n1.vcd
generated
56945
crates/cpu/tests/expected/rename_execute_retire_head_n1.vcd
generated
File diff suppressed because it is too large
Load diff
42569
crates/cpu/tests/expected/rename_execute_retire_slow_loop.vcd
generated
42569
crates/cpu/tests/expected/rename_execute_retire_slow_loop.vcd
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue