From 928f6d330516f03bdbecd52350bf1b9fb9fcf534 Mon Sep 17 00:00:00 2001 From: Inderpreet Singh Date: Sun, 26 Feb 2012 03:55:38 -0800 Subject: Added fixed latency queue for modeling DRAM latency [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11521] --- src/gpgpu-sim/l2cache.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gpgpu-sim/l2cache.cc') diff --git a/src/gpgpu-sim/l2cache.cc b/src/gpgpu-sim/l2cache.cc index 9bee822..6a39b42 100644 --- a/src/gpgpu-sim/l2cache.cc +++ b/src/gpgpu-sim/l2cache.cc @@ -318,7 +318,19 @@ void memory_partition_unit::dram_cycle() m_dram->dram_log(SAMPLELOG); if( !m_dram->full() && !m_L2_dram_queue->empty() ) { + // L2->DRAM queue to DRAM latency queue mem_fetch *mf = m_L2_dram_queue->pop(); + dram_delay_t d; + d.req = mf; + d.ready_cycle = gpu_sim_cycle+gpu_tot_sim_cycle + 200; + m_dram_latency_queue.push(d); + mf->set_status(IN_PARTITION_DRAM_LATENCY_QUEUE,gpu_sim_cycle+gpu_tot_sim_cycle); + } + + // DRAM latency queue + if( !m_dram_latency_queue.empty() && ( (gpu_sim_cycle+gpu_tot_sim_cycle) >= m_dram_latency_queue.front().ready_cycle ) && !m_dram->full() ) { + mem_fetch* mf = m_dram_latency_queue.front().req; + m_dram_latency_queue.pop(); m_dram->push(mf); } } -- cgit v1.3