Skip to content

Commit

Permalink
Renamed "MemoryCommand" to "BankCommand"
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrazzle committed Feb 6, 2024
1 parent 388842e commit d05ff36
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/MemoryTypes/Component/Bank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void NVM::ComponentType::Bank::setResponseConnection(
}

void NVM::ComponentType::Bank::setCommandConnection(
Connection<MemoryCommand>* connection) {
Connection<BankCommand>* connection) {
commandConnection = connection;
}

Expand Down
6 changes: 3 additions & 3 deletions src/MemoryTypes/Component/Bank.h
Original file line number Diff line number Diff line change
@@ -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 {

Expand All @@ -28,13 +28,13 @@ class Bank : public Component {

void setResponseConnection(Connection<BankResponse>* connection);

void setCommandConnection(Connection<MemoryCommand>* connection);
void setCommandConnection(Connection<BankCommand>* connection);

bool busy() const;

private:
Connection<BankResponse>* responseConnection;
Connection<MemoryCommand>* commandConnection;
Connection<BankCommand>* commandConnection;
};

} // namespace NVM::ComponentType
3 changes: 3 additions & 0 deletions src/MemoryTypes/Component/BankCommand.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "MemoryTypes/Component/BankCommand.h"

NVM::ComponentType::BankCommand::BankCommand(Opcode) {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace NVM::ComponentType {

class MemoryCommand {
class BankCommand {
public:
enum class Opcode { NO_OP };

MemoryCommand(Opcode);
BankCommand(Opcode);
};

} // namespace NVM::ComponentType
2 changes: 1 addition & 1 deletion src/MemoryTypes/Component/Bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Connection<BankResponse>* NVM::ComponentType::Bus::getResponseConnection() {
return &bankConnection;
}

Connection<MemoryCommand>* NVM::ComponentType::Bus::getCommandConnection() {
Connection<BankCommand>* NVM::ComponentType::Bus::getCommandConnection() {
return &commandConnection;
}
6 changes: 3 additions & 3 deletions src/MemoryTypes/Component/Bus.h
Original file line number Diff line number Diff line change
@@ -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 {

Expand All @@ -29,11 +29,11 @@ class Bus : public Component {
bool busy() const;

Connection<BankResponse>* getResponseConnection();
Connection<MemoryCommand>* getCommandConnection();
Connection<BankCommand>* getCommandConnection();

private:
Connection<BankResponse> bankConnection;
Connection<MemoryCommand> commandConnection;
Connection<BankCommand> commandConnection;
};

} // namespace NVM::ComponentType
2 changes: 1 addition & 1 deletion src/MemoryTypes/Component/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
3 changes: 0 additions & 3 deletions src/MemoryTypes/Component/MemoryCommand.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion src/MemoryTypes/Component/MemoryController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ NVM::Stats::StatBlock NVM::ComponentType::MemoryController::getStats() {
}

void NVM::ComponentType::MemoryController::setCommandConnection(
Connection<MemoryCommand>* connection) {
Connection<BankCommand>* connection) {
commandConnection = connection;
}

Expand Down
6 changes: 3 additions & 3 deletions src/MemoryTypes/Component/MemoryController.h
Original file line number Diff line number Diff line change
@@ -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 {

Expand All @@ -25,12 +25,12 @@ class MemoryController : public Component {
*/
Stats::StatBlock getStats();

void setCommandConnection(Connection<MemoryCommand>* connection);
void setCommandConnection(Connection<BankCommand>* connection);

bool busy() const;

private:
Connection<MemoryCommand>* commandConnection;
Connection<BankCommand>* commandConnection;
};

} // namespace NVM::ComponentType

0 comments on commit d05ff36

Please sign in to comment.