summaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/dram.cc
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2011-01-02 12:23:52 -0800
committerTor Aamodt <[email protected]>2011-01-02 12:23:52 -0800
commit36397be09f07bf5cdb47913a7e5e1790d32c00ed (patch)
tree94c02395ff8fbb62ee780e88db33d472336e1f2d /src/gpgpu-sim/dram.cc
parent30022ecfff2ac894c0477f0ab3aac00708ac0550 (diff)
integrate bug fix (passes fast regression)
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8310]
Diffstat (limited to 'src/gpgpu-sim/dram.cc')
-rw-r--r--src/gpgpu-sim/dram.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gpgpu-sim/dram.cc b/src/gpgpu-sim/dram.cc
index bd6758b..288baaa 100644
--- a/src/gpgpu-sim/dram.cc
+++ b/src/gpgpu-sim/dram.cc
@@ -70,6 +70,7 @@
#include "mem_latency_stat.h"
#include "dram_sched.h"
#include "mem_fetch.h"
+#include "l2cache.h"
#ifdef DRAM_VERIFY
int PRINT_CYCLE = 0;
@@ -78,9 +79,11 @@ int PRINT_CYCLE = 0;
template class fifo_pipeline<mem_fetch>;
template class fifo_pipeline<dram_req_t>;
-dram_t::dram_t( unsigned int partition_id, const struct memory_config *config, memory_stats_t *stats )
+dram_t::dram_t( unsigned int partition_id, const struct memory_config *config, memory_stats_t *stats,
+ memory_partition_unit *mp )
{
id = partition_id;
+ m_memory_partition_unit = mp;
m_stats = stats;
m_config = config;
@@ -237,8 +240,13 @@ void dram_t::cycle()
if (cmd->dqbytes >= cmd->nbytes) {
mem_fetch *data = cmd->data;
data->set_status(IN_PARTITION_MC_RETURNQ,gpu_sim_cycle+gpu_tot_sim_cycle);
- data->set_reply();
- returnq->push(data);
+ if( data->get_access_type() != L1_WRBK_ACC && data->get_access_type() != L2_WRBK_ACC ) {
+ data->set_reply();
+ returnq->push(data);
+ } else {
+ m_memory_partition_unit->set_done(data);
+ delete data;
+ }
delete cmd;
}
#ifdef DRAM_VIEWCMD