From 14eb888195e37c1116e93d4e2e2090d8ed33a277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89der=20F=2E=20Zulian?= Date: Thu, 14 Jan 2016 10:34:27 -0200 Subject: [PATCH] Minor changes to improve code readability --- DRAMSys/simulator/src/controller/core/Slots.cpp | 6 ++---- DRAMSys/simulator/src/controller/core/Slots.h | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/DRAMSys/simulator/src/controller/core/Slots.cpp b/DRAMSys/simulator/src/controller/core/Slots.cpp index 4bc524e0..87909571 100644 --- a/DRAMSys/simulator/src/controller/core/Slots.cpp +++ b/DRAMSys/simulator/src/controller/core/Slots.cpp @@ -81,10 +81,8 @@ void Slots::blockSlots(sc_time begin, sc_time end, bool excludeBorders) end -= clk; } - for (sc_time time = begin; time <= end; time += clk) - { - slotSet.insert(time); + for (sc_time time = begin; time <= end; time += clk) { + blockSlot(time); } - } diff --git a/DRAMSys/simulator/src/controller/core/Slots.h b/DRAMSys/simulator/src/controller/core/Slots.h index 0f4bbed3..49b03b5b 100644 --- a/DRAMSys/simulator/src/controller/core/Slots.h +++ b/DRAMSys/simulator/src/controller/core/Slots.h @@ -46,15 +46,16 @@ class Slots public: Slots(sc_time clk); virtual ~Slots(); + void moveCommandToNextFreeSlot(ScheduledCommand& command); void cleanUpSlots(sc_time time); - void blockSlots(sc_time begin, sc_time end, bool excludeBorders); void blockSlot(sc_time time); bool isFree(sc_time); - std::set slotSet; private: sc_time clk; + std::set slotSet; + void blockSlots(sc_time begin, sc_time end, bool excludeBorders); };