Skip to content

Commit bbc1ca6

Browse files
committed
Fix init warnings, remove echo from makefile
1 parent d387773 commit bbc1ca6

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

Bank.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ using namespace std;
4040
using namespace DRAMSim;
4141

4242
Bank::Bank(ostream &dramsim_log_):
43-
rowEntries(NUM_COLS),
4443
currentState(dramsim_log_),
44+
rowEntries(NUM_COLS),
4545
dramsim_log(dramsim_log_)
4646
{}
4747

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $(LIB_NAME_MACOS): $(POBJ)
4545
@$(CXX) -M $(CXXFLAGS) $< > $@
4646

4747
%.deppo : %.cpp
48-
$(CXX) -M $(CXXFLAGS) -MT"$*.po" $< > $@
48+
@$(CXX) -M $(CXXFLAGS) -MT"$*.po" $< > $@
4949

5050
# build all .cpp files to .o files
5151
%.o : %.cpp

Rank.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ using namespace std;
3838
using namespace DRAMSim;
3939

4040
Rank::Rank(ostream &dramsim_log_) :
41+
id(-1),
4142
dramsim_log(dramsim_log_),
43+
isPowerDown(false),
44+
refreshWaiting(false),
45+
readReturnCountdown(0),
4246
banks(NUM_BANKS, Bank(dramsim_log_)),
43-
bankStates(NUM_BANKS, BankState(dramsim_log_)),
44-
// store the rank #, mostly for convenience and printing
45-
id(-1),
46-
isPowerDown(false),
47-
refreshWaiting(false),
48-
readReturnCountdown(0)
47+
bankStates(NUM_BANKS, BankState(dramsim_log_))
48+
4949
{
5050

5151
memoryController = NULL;

Rank.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class MemoryController; //forward declaration
4949
class Rank : public SimulatorObject
5050
{
5151
private:
52-
ostream &dramsim_log;
5352
int id;
53+
ostream &dramsim_log;
5454
unsigned incomingWriteBank;
5555
unsigned incomingWriteRow;
5656
unsigned incomingWriteColumn;
@@ -68,7 +68,6 @@ class Rank : public SimulatorObject
6868
void powerDown();
6969

7070
//fields
71-
vector<Bank> banks;
7271
MemoryController *memoryController;
7372
BusPacket *outgoingDataPacket;
7473
unsigned dataCyclesLeft;
@@ -77,7 +76,9 @@ class Rank : public SimulatorObject
7776
//these are vectors so that each element is per-bank
7877
vector<BusPacket *> readReturnPacket;
7978
vector<unsigned> readReturnCountdown;
79+
vector<Bank> banks;
8080
vector<BankState> bankStates;
81+
8182
};
8283
}
8384
#endif

0 commit comments

Comments
 (0)