diff --git a/src/MemoryTypes/Component/Bank.cpp b/src/MemoryTypes/Component/Bank.cpp index f9bdaa3..8dd1d1f 100644 --- a/src/MemoryTypes/Component/Bank.cpp +++ b/src/MemoryTypes/Component/Bank.cpp @@ -20,7 +20,7 @@ void NVM::ComponentType::Bank::setResponseConnection( } void NVM::ComponentType::Bank::setCommandConnection( - Connection* connection) { + Connection* connection) { commandConnection = connection; } diff --git a/src/MemoryTypes/Component/Bank.h b/src/MemoryTypes/Component/Bank.h index 511ef52..4ccb583 100644 --- a/src/MemoryTypes/Component/Bank.h +++ b/src/MemoryTypes/Component/Bank.h @@ -1,9 +1,9 @@ #pragma once +#include "MemoryTypes/Component/BankCommand.h" #include "MemoryTypes/Component/BankResponse.h" #include "MemoryTypes/Component/Component.h" #include "MemoryTypes/Component/Connection.h" -#include "MemoryTypes/Component/MemoryCommand.h" namespace NVM::ComponentType { @@ -28,13 +28,13 @@ class Bank : public Component { void setResponseConnection(Connection* connection); - void setCommandConnection(Connection* connection); + void setCommandConnection(Connection* connection); bool busy() const; private: Connection* responseConnection; - Connection* commandConnection; + Connection* commandConnection; }; } // namespace NVM::ComponentType \ No newline at end of file diff --git a/src/MemoryTypes/Component/BankCommand.cpp b/src/MemoryTypes/Component/BankCommand.cpp new file mode 100644 index 0000000..90c3cd4 --- /dev/null +++ b/src/MemoryTypes/Component/BankCommand.cpp @@ -0,0 +1,3 @@ +#include "MemoryTypes/Component/BankCommand.h" + +NVM::ComponentType::BankCommand::BankCommand(Opcode) {} diff --git a/src/MemoryTypes/Component/MemoryCommand.h b/src/MemoryTypes/Component/BankCommand.h similarity index 72% rename from src/MemoryTypes/Component/MemoryCommand.h rename to src/MemoryTypes/Component/BankCommand.h index 9a7e7fa..59f4863 100644 --- a/src/MemoryTypes/Component/MemoryCommand.h +++ b/src/MemoryTypes/Component/BankCommand.h @@ -2,11 +2,11 @@ namespace NVM::ComponentType { -class MemoryCommand { +class BankCommand { public: enum class Opcode { NO_OP }; - MemoryCommand(Opcode); + BankCommand(Opcode); }; } // namespace NVM::ComponentType \ No newline at end of file diff --git a/src/MemoryTypes/Component/Bus.cpp b/src/MemoryTypes/Component/Bus.cpp index c5669b4..7a0e27a 100644 --- a/src/MemoryTypes/Component/Bus.cpp +++ b/src/MemoryTypes/Component/Bus.cpp @@ -20,6 +20,6 @@ Connection* NVM::ComponentType::Bus::getResponseConnection() { return &bankConnection; } -Connection* NVM::ComponentType::Bus::getCommandConnection() { +Connection* NVM::ComponentType::Bus::getCommandConnection() { return &commandConnection; } diff --git a/src/MemoryTypes/Component/Bus.h b/src/MemoryTypes/Component/Bus.h index bc8e968..41a5b6d 100644 --- a/src/MemoryTypes/Component/Bus.h +++ b/src/MemoryTypes/Component/Bus.h @@ -1,9 +1,9 @@ #pragma once +#include "MemoryTypes/Component/BankCommand.h" #include "MemoryTypes/Component/BankResponse.h" #include "MemoryTypes/Component/Component.h" #include "MemoryTypes/Component/Connection.h" -#include "MemoryTypes/Component/MemoryCommand.h" namespace NVM::ComponentType { @@ -29,11 +29,11 @@ class Bus : public Component { bool busy() const; Connection* getResponseConnection(); - Connection* getCommandConnection(); + Connection* getCommandConnection(); private: Connection bankConnection; - Connection commandConnection; + Connection commandConnection; }; } // namespace NVM::ComponentType \ No newline at end of file diff --git a/src/MemoryTypes/Component/CMakeLists.txt b/src/MemoryTypes/Component/CMakeLists.txt index e997456..a6c97d3 100644 --- a/src/MemoryTypes/Component/CMakeLists.txt +++ b/src/MemoryTypes/Component/CMakeLists.txt @@ -3,7 +3,7 @@ set(COMPONENT_SOURCES Bank.cpp Bus.cpp MemoryController.cpp - MemoryCommand.cpp + BankCommand.cpp BankResponse.cpp) add_library(RTSim_MemoryType_Component ${COMPONENT_SOURCES}) diff --git a/src/MemoryTypes/Component/MemoryCommand.cpp b/src/MemoryTypes/Component/MemoryCommand.cpp deleted file mode 100644 index 25e6164..0000000 --- a/src/MemoryTypes/Component/MemoryCommand.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "MemoryTypes/Component/MemoryCommand.h" - -NVM::ComponentType::MemoryCommand::MemoryCommand(Opcode) {} diff --git a/src/MemoryTypes/Component/MemoryController.cpp b/src/MemoryTypes/Component/MemoryController.cpp index 076eef4..47650e9 100644 --- a/src/MemoryTypes/Component/MemoryController.cpp +++ b/src/MemoryTypes/Component/MemoryController.cpp @@ -14,7 +14,7 @@ NVM::Stats::StatBlock NVM::ComponentType::MemoryController::getStats() { } void NVM::ComponentType::MemoryController::setCommandConnection( - Connection* connection) { + Connection* connection) { commandConnection = connection; } diff --git a/src/MemoryTypes/Component/MemoryController.h b/src/MemoryTypes/Component/MemoryController.h index 471baf4..16aba84 100644 --- a/src/MemoryTypes/Component/MemoryController.h +++ b/src/MemoryTypes/Component/MemoryController.h @@ -1,8 +1,8 @@ #pragma once +#include "MemoryTypes/Component/BankCommand.h" #include "MemoryTypes/Component/Component.h" #include "MemoryTypes/Component/Connection.h" -#include "MemoryTypes/Component/MemoryCommand.h" namespace NVM::ComponentType { @@ -25,12 +25,12 @@ class MemoryController : public Component { */ Stats::StatBlock getStats(); - void setCommandConnection(Connection* connection); + void setCommandConnection(Connection* connection); bool busy() const; private: - Connection* commandConnection; + Connection* commandConnection; }; } // namespace NVM::ComponentType \ No newline at end of file