Set dataLength in TrafficGenerator to bytesPerBurst MemSpec
This commit is contained in:
@@ -80,8 +80,6 @@ private:
|
||||
std::ifstream file;
|
||||
uint64_t lineCnt;
|
||||
|
||||
unsigned int burstLength;
|
||||
unsigned int dataLength;
|
||||
sc_time playerClk; // May be different from the memory clock!
|
||||
|
||||
static constexpr unsigned lineBufferSize = 10000;
|
||||
|
||||
@@ -49,7 +49,8 @@ TrafficGenerator::TrafficGenerator(const sc_module_name &name,
|
||||
TrafficInitiator(name, setup), tCK(tCK),
|
||||
numRequests(numRequests), rwRatio(rwRatio)
|
||||
{
|
||||
burstlenght = Configuration::getInstance().memSpec->burstLength;
|
||||
burstLength = Configuration::getInstance().memSpec->burstLength;
|
||||
dataLength = Configuration::getInstance().memSpec->bytesPerBurst;
|
||||
|
||||
this->maxPendingReadRequests = maxPendingReadRequests;
|
||||
this->maxPendingWriteRequests = maxPendingWriteRequests;
|
||||
@@ -67,7 +68,7 @@ void TrafficGenerator::nextPayload()
|
||||
|
||||
tlm::tlm_generic_payload *payload = setup->allocatePayload();
|
||||
payload->acquire();
|
||||
unsigned char *dataElement = new unsigned char[16];
|
||||
|
||||
// TODO: column / burst breite
|
||||
|
||||
uint64_t address = getNextAddress();
|
||||
@@ -86,9 +87,8 @@ void TrafficGenerator::nextPayload()
|
||||
payload->set_response_status(tlm::TLM_INCOMPLETE_RESPONSE);
|
||||
payload->set_dmi_allowed(false);
|
||||
payload->set_byte_enable_length(0);
|
||||
payload->set_streaming_width(burstlenght);
|
||||
payload->set_data_ptr(dataElement);
|
||||
payload->set_data_length(16);
|
||||
payload->set_streaming_width(burstLength);
|
||||
payload->set_data_length(dataLength);
|
||||
payload->set_command(command);
|
||||
|
||||
sc_time sendingOffset;
|
||||
|
||||
@@ -62,7 +62,6 @@ protected:
|
||||
std::default_random_engine randomGenerator;
|
||||
|
||||
private:
|
||||
unsigned int burstlenght;
|
||||
sc_time tCK;
|
||||
uint64_t numRequests;
|
||||
float rwRatio;
|
||||
|
||||
@@ -76,6 +76,9 @@ protected:
|
||||
bool payloadPostponed = false;
|
||||
bool finished = false;
|
||||
|
||||
unsigned int burstLength;
|
||||
unsigned int dataLength;
|
||||
|
||||
sc_event transactionFinished;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user