Skip to content

Commit

Permalink
Moved more files into Simple
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrazzle committed Jan 28, 2024
1 parent c5bc28f commit 03e97a9
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 49 deletions.
13 changes: 0 additions & 13 deletions src/Event/EventQueue.h

This file was deleted.

13 changes: 4 additions & 9 deletions src/Memory/Event/CommandEventQueue.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#pragma once

#include "Event/EventQueue.h"

#include <queue>
#include <functional>
#include <queue>

namespace NVM::Memory {

template <typename Receiver>
class CommandEventQueue : public NVM::Event::EventQueue {
template<typename Receiver> class CommandEventQueue {
public:
using Cmd = std::function<bool(Receiver&)>;

Expand All @@ -24,9 +21,7 @@ class CommandEventQueue : public NVM::Event::EventQueue {
return false;
}

void enqueue(Cmd cmd) {
commands.push(cmd);
}
void enqueue(Cmd cmd) { commands.push(cmd); }

bool isEmpty() const { return commands.empty(); }

Expand All @@ -35,4 +30,4 @@ class CommandEventQueue : public NVM::Event::EventQueue {
std::queue<Cmd> commands;
};

}
} // namespace NVM::Memory
2 changes: 1 addition & 1 deletion src/Memory/MemoryFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "Memory/MemoryFactory.h"

#include "Memory/ConfigParser.h"
#include "MemoryTypes/Simple/Bank/SimpleBank.h"
#include "MemoryTypes/Simple/Interconnect/SimpleInterconnect.h"
#include "MemoryTypes/Simple/MemoryController/SimpleController.h"
#include "MemoryTypes/Simple/MemorySystem/SimpleSystem.h"
#include "MemoryTypes/Simple/Rank/SimpleRank.h"
#include "MemoryTypes/Simple/SubArray/SimpleSubArray.h"
#include "MemoryTypes/Simple/Timing/Timer/ConfigurableTimer.h"
#include "Utils/ConfigParser.h"

using namespace NVM::Memory;

Expand Down
12 changes: 1 addition & 11 deletions src/MemoryTypes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
set(MEMORY_SOURCES
MemoryController.cpp
Interconnect.cpp
Rank.cpp
Bank.cpp )

add_subdirectory(Simple)

add_library(RTSim_MemoryType ${MEMORY_SOURCES})
target_include_directories(RTSim_MemoryType PUBLIC ${RTSIM_DIR}/include PRIVATE ${RTSIM_DIR}/src)
target_link_libraries(RTSim_MemoryType PUBLIC RTSim_MemoryType_Simple RTSim_Logging RTSim_Modeling RTSim_Scheduling RTSim_Parsing RTSim_Timing RTSim_Stats)
add_subdirectory(Simple)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "MemoryTypes/Bank.h"
#include "MemoryTypes/Simple/Bank.h"

using namespace NVM::Memory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "Command.h"
#include "MemoryTypes/SubArray.h"
#include "MemoryTypes/Simple/SubArray.h"

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion src/MemoryTypes/Simple/Bank/SimpleBank.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "MemoryTypes/Bank.h"
#include "MemoryTypes/Simple/Bank.h"

namespace NVM::Memory {

Expand Down
6 changes: 5 additions & 1 deletion src/MemoryTypes/Simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ add_subdirectory(Scheduling)
add_subdirectory(Timing)

set(MEMORY_SOURCES
MemoryController.cpp
Interconnect.cpp
Rank.cpp
Bank.cpp
FaultModel.cpp
Bank/SimpleBank.cpp
Interconnect/SimpleInterconnect.cpp
Expand All @@ -14,4 +18,4 @@ set(MEMORY_SOURCES

add_library(RTSim_MemoryType_Simple ${MEMORY_SOURCES})
target_include_directories(RTSim_MemoryType_Simple PUBLIC ${RTSIM_DIR}/include PRIVATE ${RTSIM_DIR}/src)
target_link_libraries(RTSim_MemoryType_Simple PUBLIC RTSim_MemoryType RTSim_Logging RTSim_Modeling RTSim_Scheduling RTSim_Parsing RTSim_Timing RTSim_Stats)
target_link_libraries(RTSim_MemoryType_Simple PUBLIC RTSim_Logging RTSim_Modeling RTSim_Scheduling RTSim_Parsing RTSim_Timing RTSim_Stats)
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "MemoryTypes/Interconnect.h"
#include "MemoryTypes/Simple/Interconnect.h"

using namespace NVM::Memory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "MemoryTypes/Rank.h"
#include "MemoryTypes/Simple/Rank.h"

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion src/MemoryTypes/Simple/Interconnect/SimpleInterconnect.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "MemoryTypes/Interconnect.h"
#include "MemoryTypes/Simple/Interconnect.h"

namespace NVM::Memory {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "MemoryTypes/MemoryController.h"
#include "MemoryTypes/Simple/MemoryController.h"

using namespace NVM::Memory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "MemoryTypes/Interconnect.h"
#include "MemoryTypes/Simple/Interconnect.h"

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion src/MemoryTypes/Simple/MemoryController/SimpleController.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "MemoryTypes/MemoryController.h"
#include "MemoryTypes/Simple/MemoryController.h"
#include "MemoryTypes/Simple/Modeling/System/SimpleSystem.h"
#include "MemoryTypes/Simple/Parsing/Parser/SimpleParser.h"
#include "MemoryTypes/Simple/Scheduling/Scheduler/RBScheduler.h"
Expand Down
2 changes: 1 addition & 1 deletion src/MemoryTypes/Simple/MemorySystem/SimpleSystem.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "Memory/MemorySystem.h"
#include "MemoryTypes/MemoryController.h"
#include "MemoryTypes/Simple/MemoryController.h"

#include <memory>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "MemoryTypes/Rank.h"
#include "MemoryTypes/Simple/Rank.h"

using namespace NVM::Memory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "Command.h"
#include "MemoryTypes/Bank.h"
#include "MemoryTypes/Simple/Bank.h"

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion src/MemoryTypes/Simple/Rank/SimpleRank.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "MemoryTypes/Rank.h"
#include "MemoryTypes/Simple/Rank.h"

namespace NVM::Memory {

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/MemoryTypes/Simple/SubArray/SimpleSubArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Memory/Timing/CommandTimer.h"
#include "MemoryTypes/Simple/FaultModel.h"
#include "MemoryTypes/SubArray.h"
#include "MemoryTypes/Simple/SubArray.h"

#include <memory>

Expand Down
File renamed without changes.

0 comments on commit 03e97a9

Please sign in to comment.