From ac54c7ffad6d19820b2b875b58b0e3510d60f7e7 Mon Sep 17 00:00:00 2001 From: Hanhwi Jang Date: Thu, 5 Jan 2023 14:52:11 +0900 Subject: [PATCH] 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 Reviewed-by: Jason Lowe-Power Reviewed-by: Hanhwi Jang Reviewed-by: Tom Rollet Tested-by: kokoro --- src/cpu/o3/decode.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/o3/decode.cc b/src/cpu/o3/decode.cc index 9555e32c23..ac728a2f2c 100644 --- a/src/cpu/o3/decode.cc +++ b/src/cpu/o3/decode.cc @@ -77,7 +77,7 @@ Decode::Decode(CPU *_cpu, const BaseO3CPUParams ¶ms) decodeWidth, static_cast(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;