Fix various compile warnings
This commit is contained in:
@@ -86,14 +86,8 @@ Simulator::instantiateInitiator(const DRAMSys::Config::Initiator& initiator)
|
||||
uint64_t memorySize = dramSys->getMemSpec().getSimMemSizeInBytes();
|
||||
sc_core::sc_time interfaceClk = dramSys->getMemSpec().tCK;
|
||||
|
||||
// To support non-power-of-two values for the burst length and width, we round the BL
|
||||
// down to the smaller-or-equal power-of-two.
|
||||
unsigned int burstBits = std::log2(dramSys->getMemSpec().defaultBurstLength);
|
||||
unsigned int widthBits = std::log2(dramSys->getMemSpec().dataBusWidth);
|
||||
unsigned int defaultDataLength = std::pow(2, burstBits) * std::pow(2, widthBits) / 8;
|
||||
|
||||
return std::visit(
|
||||
[=](auto&& config) -> std::unique_ptr<RequestIssuer>
|
||||
[this, memorySize, interfaceClk](auto&& config) -> std::unique_ptr<RequestIssuer>
|
||||
{
|
||||
using T = std::decay_t<decltype(config)>;
|
||||
if constexpr (std::is_same_v<T, DRAMSys::Config::TrafficGenerator> ||
|
||||
|
||||
@@ -49,7 +49,7 @@ TrafficGenerator::TrafficGenerator(DRAMSys::Config::TrafficGeneratorStateMachine
|
||||
for (auto const& state : config.states)
|
||||
{
|
||||
std::visit(
|
||||
[=, &config](auto&& arg)
|
||||
[this, memorySize, dataLength, dataAlignment, &config](auto&& arg)
|
||||
{
|
||||
using DRAMSys::Config::TrafficGeneratorActiveState;
|
||||
using DRAMSys::Config::TrafficGeneratorIdleState;
|
||||
@@ -132,7 +132,7 @@ TrafficGenerator::TrafficGenerator(DRAMSys::Config::TrafficGenerator const& conf
|
||||
Request TrafficGenerator::nextRequest()
|
||||
{
|
||||
if (currentState == STOP_STATE)
|
||||
return Request{Request::Command::Stop};
|
||||
return Request{Request::Command::Stop, 0, 0, {}};
|
||||
|
||||
Request request = producers[currentState]->nextRequest();
|
||||
requestsInState++;
|
||||
|
||||
@@ -46,7 +46,7 @@ RowHammer::RowHammer(DRAMSys::Config::RowHammer const& config) :
|
||||
Request RowHammer::nextRequest()
|
||||
{
|
||||
if (generatedRequests >= numberOfRequests)
|
||||
return Request{Request::Command::Stop};
|
||||
return Request{Request::Command::Stop, 0, 0, {}};
|
||||
|
||||
generatedRequests++;
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ Request StlPlayer::nextRequest()
|
||||
if (!currentLineContent.has_value())
|
||||
{
|
||||
// The file is read in completely. Nothing more to do.
|
||||
return Request{Request::Command::Stop};
|
||||
return Request{Request::Command::Stop, 0, 0, {}};
|
||||
}
|
||||
|
||||
auto command = currentLineContent->command == LineContent::Command::Read
|
||||
|
||||
Reference in New Issue
Block a user