From 54a7b198182349d82ed0bd894ed50e30782643df Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Mon, 8 Apr 2013 14:21:35 -0800 Subject: Updating mem_fetch::get_num_flits() to work with atomics [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15760] --- src/gpgpu-sim/mem_fetch.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gpgpu-sim/mem_fetch.cc b/src/gpgpu-sim/mem_fetch.cc index 1de10a5..580c051 100644 --- a/src/gpgpu-sim/mem_fetch.cc +++ b/src/gpgpu-sim/mem_fetch.cc @@ -124,7 +124,8 @@ bool mem_fetch::isconst() const /// Returns number of flits traversing interconnect. simt_to_mem specifies the direction unsigned mem_fetch::get_num_flits(bool simt_to_mem){ unsigned sz=0; - if( (simt_to_mem && get_is_write()) || !(simt_to_mem || get_is_write()) ) + // If atomic, write going to memory, or read coming back from memory, size = ctrl + data. Else, only ctrl + if( isatomic() || (simt_to_mem && get_is_write()) || !(simt_to_mem || get_is_write()) ) sz = size(); else sz = get_ctrl_size(); -- cgit v1.3