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.
This commit is contained in:
@@ -108,6 +108,11 @@ DefaultCommit<Impl>::DefaultCommit(O3CPU *_cpu, DerivO3CPUParams *params)
|
||||
canHandleInterrupts(true),
|
||||
avoidQuiesceLiveLock(false)
|
||||
{
|
||||
if (commitWidth > Impl::MaxWidth)
|
||||
fatal("commitWidth (%d) is larger than compiled limit (%d),\n"
|
||||
"\tincrease MaxWidth in src/cpu/o3/impl.hh\n",
|
||||
commitWidth, static_cast<int>(Impl::MaxWidth));
|
||||
|
||||
_status = Active;
|
||||
_nextStatus = Inactive;
|
||||
std::string policy = params->smtCommitPolicy;
|
||||
|
||||
Reference in New Issue
Block a user