fix(generator): honor minAddress and maxAddress

This commit is contained in:
2025-10-27 17:34:46 +01:00
parent 63b0885772
commit 209e6bb34f

View File

@@ -54,13 +54,13 @@ SequentialState::SequentialState(uint64_t numRequests,
dataLength(dataLength),
randomGenerator(this->seed)
{
if (minAddress > memorySize - 1)
if (this->minAddress > memorySize - 1)
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.");
if (maxAddress < minAddress)
if (this->maxAddress < this->minAddress)
SC_REPORT_FATAL("TrafficGenerator", "maxAddress is smaller than minAddress.");
rwRatio = std::clamp(rwRatio, 0.0, 1.0);