cpu-o3: Resolve the skid buffer overflow issue at decode stage

When decode width is larger than fetch width, the skid buffer
overflow happens at decode stage. The decode stage assumes
that fetch stage sends instructions as many as the fetch width,
but it sends them at decode width rate.

This patch makes the decode stage set its skid buffer size
according to the decode width.

Change-Id: I90ee43d16c59a4c9305c77bbfad7e4cdb2b9cffa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67231
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Hanhwi Jang <jang.hanhwi@gmail.com>
Reviewed-by: Tom Rollet <tom.rollet@huawei.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Hanhwi Jang
2023-01-05 14:52:11 +09:00
parent c23d7bb3ee
commit ac54c7ffad

View File

@@ -77,7 +77,7 @@ Decode::Decode(CPU *_cpu, const BaseO3CPUParams &params)
decodeWidth, static_cast<int>(MaxWidth));
// @todo: Make into a parameter
skidBufferMax = (fetchToDecodeDelay + 1) * params.fetchWidth;
skidBufferMax = (fetchToDecodeDelay + 1) * params.decodeWidth;
for (int tid = 0; tid < MaxThreads; tid++) {
stalls[tid] = {false};
decodeStatus[tid] = Idle;