diff options
author | Dam Sunwoo <dam.sunwoo@arm.com> | 2014-04-23 05:18:18 -0400 |
---|---|---|
committer | Dam Sunwoo <dam.sunwoo@arm.com> | 2014-04-23 05:18:18 -0400 |
commit | 84f8fe637cbf15c403f39aaa10c0ea66ace6083d (patch) | |
tree | 9655f3537e6e8c05806b78b24cfd48cc623100f6 /src/cpu/o3/rename_impl.hh | |
parent | c9071ff95e5835e100e642ceba99a1bce8c3d02d (diff) | |
download | gem5-84f8fe637cbf15c403f39aaa10c0ea66ace6083d.tar.xz |
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.
Diffstat (limited to 'src/cpu/o3/rename_impl.hh')
-rw-r--r-- | src/cpu/o3/rename_impl.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/o3/rename_impl.hh b/src/cpu/o3/rename_impl.hh index 242d5a4e3..dcf1d4c66 100644 --- a/src/cpu/o3/rename_impl.hh +++ b/src/cpu/o3/rename_impl.hh @@ -71,6 +71,11 @@ DefaultRename<Impl>::DefaultRename(O3CPU *_cpu, DerivO3CPUParams *params) maxPhysicalRegs(params->numPhysIntRegs + params->numPhysFloatRegs + params->numPhysCCRegs) { + if (renameWidth > Impl::MaxWidth) + fatal("renameWidth (%d) is larger than compiled limit (%d),\n" + "\tincrease MaxWidth in src/cpu/o3/impl.hh\n", + renameWidth, static_cast<int>(Impl::MaxWidth)); + // @todo: Make into a parameter. skidBufferMax = (2 * (decodeToRenameDelay * params->decodeWidth)) + renameWidth; } |