fix(generator): honor minAddress and maxAddress
This commit is contained in:
@@ -54,13 +54,13 @@ SequentialState::SequentialState(uint64_t numRequests,
|
|||||||
dataLength(dataLength),
|
dataLength(dataLength),
|
||||||
randomGenerator(this->seed)
|
randomGenerator(this->seed)
|
||||||
{
|
{
|
||||||
if (minAddress > memorySize - 1)
|
if (this->minAddress > memorySize - 1)
|
||||||
SC_REPORT_FATAL("TrafficGenerator", "minAddress is out of range.");
|
SC_REPORT_FATAL("TrafficGenerator", "minAddress is out of range.");
|
||||||
|
|
||||||
if (maxAddress > memorySize - 1)
|
if (this->maxAddress > memorySize - 1)
|
||||||
SC_REPORT_FATAL("TrafficGenerator", "maxAddress is out of range.");
|
SC_REPORT_FATAL("TrafficGenerator", "maxAddress is out of range.");
|
||||||
|
|
||||||
if (maxAddress < minAddress)
|
if (this->maxAddress < this->minAddress)
|
||||||
SC_REPORT_FATAL("TrafficGenerator", "maxAddress is smaller than minAddress.");
|
SC_REPORT_FATAL("TrafficGenerator", "maxAddress is smaller than minAddress.");
|
||||||
|
|
||||||
rwRatio = std::clamp(rwRatio, 0.0, 1.0);
|
rwRatio = std::clamp(rwRatio, 0.0, 1.0);
|
||||||
|
|||||||
Reference in New Issue
Block a user