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); };