From 836bacc76fa3bc1784b0103737984e5130df84cd Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Mon, 23 Mar 2015 13:40:24 +0100 Subject: [PATCH] fixed overflow bug in StlPlayer --- dram/src/simulation/StlPlayer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dram/src/simulation/StlPlayer.h b/dram/src/simulation/StlPlayer.h index 46aecb33..2bab13e9 100644 --- a/dram/src/simulation/StlPlayer.h +++ b/dram/src/simulation/StlPlayer.h @@ -32,7 +32,7 @@ public: std::istringstream iss(line); string time, command, address; iss >> time >> command >> address; - long parsedAdress = std::stoi(address.c_str(), 0, 16); + unsigned long long parsedAdress = std::stoull(address.c_str(), 0, 16); gp* payload = this->allocatePayload(); unsigned char * dataElement = new unsigned char[16]; // TODO: column / burst breite @@ -75,7 +75,7 @@ public: (string("Corrupted tracefile, command ") + command + string(" unknown")).c_str()); } - sc_time sendingTime = std::stoi(time.c_str())*clk; + sc_time sendingTime = std::stoull(time.c_str())*clk; if (sendingTime <= sc_time_stamp()) {