Permalink
Browse files

added debug messages to track dual plane usage

  • Loading branch information...
1 parent 246346c commit 0acde06bb5bea2615b8b730fc9903bf7548d9cdd @watchmaker committed May 1, 2012
Showing with 18 additions and 9 deletions.
  1. +4 −1 src/Die.cpp
  2. +7 −1 src/Plane.cpp
  3. +1 −1 src/TraceBasedSim.cpp
  4. +6 −6 src/ini/samsung_K9XXG08UXM_gc_test.ini
View
@@ -68,6 +68,7 @@ void Die::attachToBuffer(Buffer *buff){
void Die::receiveFromBuffer(ChannelPacket *busPacket){
if (busPacket->busPacketType == DATA){
+ cout << "storing in data for " << busPacket->package << " " << busPacket->die << " " << busPacket->plane << "\n";
planes[busPacket->plane].storeInData(busPacket);
} else if (currentCommands[busPacket->plane] == NULL) {
currentCommands[busPacket->plane] = busPacket;
@@ -206,6 +207,7 @@ void Die::update(void){
// Process each command based on the packet type.
switch (currentCommand->busPacketType){
case READ:
+ cout << "reading data from " << currentCommand->package << " " << currentCommand->die << " " << currentCommand->plane << "\n";
planes[currentCommand->plane].read(currentCommand);
returnDataPackets.push(planes[currentCommand->plane].readFromData());
break;
@@ -214,7 +216,8 @@ void Die::update(void){
returnDataPackets.push(planes[currentCommand->plane].readFromData());
parentNVDIMM->GCReadDone(currentCommand->virtualAddress);
break;
- case WRITE:
+ case WRITE:
+ cout << "writing data to " << currentCommand->package << " " << currentCommand->die << " " << currentCommand->plane << "\n";
planes[currentCommand->plane].write(currentCommand);
parentNVDIMM->numWrites++;
//call write callback
View
@@ -88,6 +88,7 @@ void Plane::write(ChannelPacket *busPacket){
if(dataReg != NULL)
{
blocks[busPacket->block].write(busPacket->page, dataReg->data);
+ cout << "wrote data from the dataReg of plane \n";
// The data packet is now done being used, so it can be deleted.
delete dataReg;
@@ -103,6 +104,7 @@ void Plane::write(ChannelPacket *busPacket){
if(cacheReg != NULL)
{
blocks[busPacket->block].write(busPacket->page, cacheReg->data);
+ cout << "wrote data from the cacheReg of plane \n";
// The data packet is now done being used, so it can be deleted.
delete cacheReg;
@@ -131,11 +133,13 @@ void Plane::erase(ChannelPacket *busPacket){
void Plane::storeInData(ChannelPacket *busPacket){
if(dataReg == NULL && cacheReg == NULL)
{
+ cout << "stored in data to the dataReg \n";
dataReg= busPacket;
write_reg = 1;
}
else if(dataReg != NULL && cacheReg == NULL)
{
+ cout << "stored in data to the cacheReg \n";
cacheReg = busPacket;
if(read_reg == 1)
{
@@ -148,6 +152,7 @@ void Plane::storeInData(ChannelPacket *busPacket){
}
else if(dataReg == NULL && cacheReg != NULL)
{
+ cout << "stored in data to the dataReg \n";
dataReg= busPacket;
if(read_reg == 2)
{
@@ -163,13 +168,13 @@ void Plane::storeInData(ChannelPacket *busPacket){
// no more room in this inn, somebody fucked up and it was probably me
ERROR("tried to add write data to plane "<<busPacket->plane<<" but both of its registers were full");
}
-
}
ChannelPacket *Plane::readFromData(void){
ChannelPacket *temp = NULL; // so we can free the register
if(read_reg == 1)
{
+ cout << "read data from the dataReg \n";
// read no longer needs this register
read_reg = 0;
temp = dataReg;
@@ -178,6 +183,7 @@ ChannelPacket *Plane::readFromData(void){
}
else if(read_reg == 2)
{
+ cout << "read data from the cacheReg \n";
// read no longer needs this register
read_reg = 0;
temp = cacheReg;
@@ -164,7 +164,7 @@ void test_obj::run_test(void){
for (cycle= 0; cycle<SIM_CYCLES; cycle++){
if(writes < NUM_WRITES){
- t = FlashTransaction(DATA_READ, write_addr, (void *)0xdeadbeef);
+ t = FlashTransaction(DATA_WRITE, write_addr, (void *)0xdeadbeef);
result = (*NVDimm).add(t);
if(result == 1)
{
@@ -12,10 +12,10 @@ NV_WRITE_SCRIPT=write_script.txt
DELAY_WRITE=0
DELAY_WRITE_CYCLES=50
-DISK_READ=0
+DISK_READ=1
-BUFFERED=1
-CUT_THROUGH=1
+BUFFERED=0
+CUT_THROUGH=0
IN_BUFFER_SIZE=32768
OUT_BUFFER_SIZE=32768
@@ -32,12 +32,12 @@ READ_ARRIVE_LOG=1
ENABLE_NV_SAVE=0
NV_SAVE_FILE=state/nvdimm_state.txt
-ENABLE_NV_RESTORE=1
+ENABLE_NV_RESTORE=0
NV_RESTORE_FILE=state/nvdimm_state.txt
DEVICE_TYPE=NAND
-NUM_PACKAGES=32
-DIES_PER_PACKAGE=1
+NUM_PACKAGES=2
+DIES_PER_PACKAGE=16
PLANES_PER_DIE=2
VIRTUAL_BLOCKS_PER_PLANE=8192
PAGES_PER_BLOCK=64

0 comments on commit 0acde06

Please sign in to comment.