From 84f8fe637cbf15c403f39aaa10c0ea66ace6083d Mon Sep 17 00:00:00 2001 From: Dam Sunwoo Date: Wed, 23 Apr 2014 05:18:18 -0400 Subject: cpu: Add O3 CPU width checks O3CPU has a compile-time maximum width set in o3/impl.hh, but checking the configuration against this limit was not implemented anywhere except for fetch. Configuring a wider pipe than the limit can silently cause various issues during the simulation. This patch adds the proper checking in the constructor of the various pipeline stages. --- src/cpu/o3/decode_impl.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cpu/o3/decode_impl.hh') diff --git a/src/cpu/o3/decode_impl.hh b/src/cpu/o3/decode_impl.hh index c78e7f211..c66f488a5 100644 --- a/src/cpu/o3/decode_impl.hh +++ b/src/cpu/o3/decode_impl.hh @@ -68,6 +68,11 @@ DefaultDecode::DefaultDecode(O3CPU *_cpu, DerivO3CPUParams *params) decodeWidth(params->decodeWidth), numThreads(params->numThreads) { + if (decodeWidth > Impl::MaxWidth) + fatal("decodeWidth (%d) is larger than compiled limit (%d),\n" + "\tincrease MaxWidth in src/cpu/o3/impl.hh\n", + decodeWidth, static_cast(Impl::MaxWidth)); + // @todo: Make into a parameter skidBufferMax = (fetchToDecodeDelay + 1) * params->fetchWidth; } -- cgit v1.2.3