diff options
Diffstat (limited to 'src/gpgpu-sim/dram.cc')
| -rw-r--r-- | src/gpgpu-sim/dram.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gpgpu-sim/dram.cc b/src/gpgpu-sim/dram.cc index f86d968..9f76b96 100644 --- a/src/gpgpu-sim/dram.cc +++ b/src/gpgpu-sim/dram.cc @@ -86,6 +86,7 @@ dram_t* dram_create( unsigned int id, unsigned int nbk, unsigned i; dm = (dram_t*)calloc(1,sizeof(dram_t)); + dm = new (dm) dram_t(); dm->id = id; @@ -577,17 +578,6 @@ void dram_print_stat( dram_t* dm, FILE* simFile ) unsigned dram_busy( dram_t* dm) { - unsigned busy = 0; - - switch (dm->scheduler_type) { - case DRAM_FIFO: - busy = (dm->mrqq->length > 0); - break; - case DRAM_IDEAL_FAST: - busy = (fast_scheduler_queue_length(dm) > 0) || (dm->mrqq->length > 0); - break; - } - - return busy; + return !dm->m_request_tracker.empty(); } |
