From 6b8a123675387c5034efe1310ada0ef0a3162ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Mon, 2 Jul 2018 07:59:22 +0200 Subject: [PATCH] coding style --- .../controller/core/configuration/Configuration.cpp | 13 +++++++------ DRAMSys/library/src/controller/core/refresh/RGR.cpp | 7 ++++--- DRAMSys/library/src/controller/core/refresh/RGR.h | 2 +- .../src/controller/core/refresh/RefreshManager.cpp | 4 ++-- .../src/controller/core/refresh/RefreshManager.h | 2 +- .../core/refresh/RefreshManagerBankwise.cpp | 2 +- .../core/refresh/RefreshManagerBankwise.h | 2 +- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/DRAMSys/library/src/controller/core/configuration/Configuration.cpp b/DRAMSys/library/src/controller/core/configuration/Configuration.cpp index 6c726065..d95652b0 100644 --- a/DRAMSys/library/src/controller/core/configuration/Configuration.cpp +++ b/DRAMSys/library/src/controller/core/configuration/Configuration.cpp @@ -153,7 +153,8 @@ void Configuration::setParameter(std::string name, std::string value) ". This parameter must be between 0 and 100.").c_str()); } else { SJFProbability = string2int(value); - } else if (name == "RequestBufferSize") + } + else if (name == "RequestBufferSize") RequestBufferSize = string2int(value); else if (name == "Capsize") Capsize = string2int(value); @@ -202,11 +203,11 @@ void Configuration::setParameter(std::string name, std::string value) else if (name == "ControllerCoreRowGranularRefRowInc")RowInc = string2int( value); else if (name == "ControllerCoreRefMode") { - RefMode = string2int(value); - if (RefMode != 1 && RefMode != 2 && RefMode != 4) - SC_REPORT_FATAL("Configuration", (name + " invalid value.").c_str()); - } - else if (name == "ControllerCoreRowGranularRefNumAR")NumAR = string2int(value); + RefMode = string2int(value); + if (RefMode != 1 && RefMode != 2 && RefMode != 4) + SC_REPORT_FATAL("Configuration", (name + " invalid value.").c_str()); + } else if (name == "ControllerCoreRowGranularRefNumAR")NumAR = string2int( + value); else if (name == "ControllerCoreRowGranularRefB0")RGRB0 = string2bool(value); else if (name == "ControllerCoreRowGranularRefB1")RGRB1 = string2bool(value); else if (name == "ControllerCoreRowGranularRefB2")RGRB2 = string2bool(value); diff --git a/DRAMSys/library/src/controller/core/refresh/RGR.cpp b/DRAMSys/library/src/controller/core/refresh/RGR.cpp index 3def058c..71cdcec1 100644 --- a/DRAMSys/library/src/controller/core/refresh/RGR.cpp +++ b/DRAMSys/library/src/controller/core/refresh/RGR.cpp @@ -43,7 +43,7 @@ RGR::RGR(sc_module_name, ControllerCore &ctrlcore) : ccore(ctrlcore), timing(ctrlcore.config.memSpec.refreshTimings[ccore.getBanks()[0]]) { auto m = ccore.config.getRefMode(); - tREFIx = timing.tREFI / m; + tREFIx = timing.tREFI / m; if (ccore.config.ControllerCoreEnableRefPostpone) maxpostpone = ccore.config.ControllerCoreMaxPostponedARCmd * m; if (ccore.config.ControllerCoreEnableRefPullIn) @@ -51,7 +51,7 @@ RGR::RGR(sc_module_name, ControllerCore &ctrlcore) : ccore(ctrlcore), #if 0 if (ccore.config.BankwiseLogic) { for (Bank b : ccore.getBanks()) { - auto nbs = ccore.config.memSpec.NumberOfBanks; + auto nbs = ccore.config.memSpec.NumberOfBanks; nextPlannedRefreshs[b] = b.ID() * tREFIx / nbs; } } @@ -86,7 +86,8 @@ bool RGR::hasCollision(const ScheduledCommand __attribute__((unused)) &cmd) for (unsigned b = 0; b < nbs; b++) { if (cmd.getStart() < currentRefresh[b] && cmd.getEnd() > currentRefresh[b]) r = true; - if (cmd.getStart() < nextPlannedRefreshs[b] && cmd.getEnd() > nextPlannedRefreshs[b]) + if (cmd.getStart() < nextPlannedRefreshs[b] + && cmd.getEnd() > nextPlannedRefreshs[b]) r = true; } return r; diff --git a/DRAMSys/library/src/controller/core/refresh/RGR.h b/DRAMSys/library/src/controller/core/refresh/RGR.h index 212a0a63..b4dac84e 100644 --- a/DRAMSys/library/src/controller/core/refresh/RGR.h +++ b/DRAMSys/library/src/controller/core/refresh/RGR.h @@ -49,7 +49,7 @@ public: void reInitialize(Bank bank, sc_time time) override; bool isInvalidated(tlm::tlm_generic_payload &payload, sc_time time) override; private: - sc_time tREFIx; + sc_time tREFIx; ControllerCore &ccore; RefreshTiming &timing; std::map rps; diff --git a/DRAMSys/library/src/controller/core/refresh/RefreshManager.cpp b/DRAMSys/library/src/controller/core/refresh/RefreshManager.cpp index 4bbef8e9..14fc5a8c 100644 --- a/DRAMSys/library/src/controller/core/refresh/RefreshManager.cpp +++ b/DRAMSys/library/src/controller/core/refresh/RefreshManager.cpp @@ -51,7 +51,7 @@ RefreshManager::RefreshManager(sc_module_name /*name*/, nextPlannedRefresh(SC_ZERO_TIME) { auto m = controllerCore.config.getRefMode(); - tREFIx = timing.tREFI / m; + tREFIx = timing.tREFI / m; if (controllerCore.config.ControllerCoreEnableRefPostpone) { maxpostpone = controllerCore.config.ControllerCoreMaxPostponedARCmd * m; } @@ -140,7 +140,7 @@ void RefreshManager::scheduleRefresh(tlm::tlm_generic_payload &payload switch (currentState) { case ST_REFRESH: // Regular Refresh. It's possible to migrate from this to the flexible refresh states - // The arCmdCounter should always be equal to zero here + // The arCmdCounter should always be equal to zero here assert(arCmdCounter == 0); if (canPostpone) { diff --git a/DRAMSys/library/src/controller/core/refresh/RefreshManager.h b/DRAMSys/library/src/controller/core/refresh/RefreshManager.h index 858d50b6..12d891a2 100644 --- a/DRAMSys/library/src/controller/core/refresh/RefreshManager.h +++ b/DRAMSys/library/src/controller/core/refresh/RefreshManager.h @@ -59,7 +59,7 @@ private: ControllerCore &controllerCore; RefreshTiming &timing; sc_time nextPlannedRefresh; - sc_time tREFIx; + sc_time tREFIx; std::map refreshPayloads; unsigned int maxpostpone = 0; unsigned int maxpullin = 0; diff --git a/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.cpp b/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.cpp index 9e7bdd3f..7337a436 100644 --- a/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.cpp +++ b/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.cpp @@ -46,7 +46,7 @@ RefreshManagerBankwise::RefreshManagerBankwise(sc_module_name, timing(controller.config.memSpec.refreshTimings[Bank(0)]) { auto m = controllerCore.config.getRefMode(); - tREFIx = timing.tREFI / m; + tREFIx = timing.tREFI / m; if (controllerCore.config.ControllerCoreEnableRefPostpone) maxpostpone = controllerCore.config.ControllerCoreMaxPostponedARCmd * m; if (controllerCore.config.ControllerCoreEnableRefPullIn) diff --git a/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.h b/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.h index b7be78e4..bc85ee97 100644 --- a/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.h +++ b/DRAMSys/library/src/controller/core/refresh/RefreshManagerBankwise.h @@ -59,7 +59,7 @@ public: private: ControllerCore &controllerCore; RefreshTiming &timing; - sc_time tREFIx; + sc_time tREFIx; std::map refreshPayloads; std::map nextPlannedRefreshs; unsigned int maxpostpone = 0;