arch-gcn3: add support for unaligned accesses
authorMatt Sinclair <Matthew.Sinclair@amd.com>
Wed, 7 Mar 2018 22:54:19 +0000 (17:54 -0500)
committerAnthony Gutierrez <anthony.gutierrez@amd.com>
Fri, 19 Jun 2020 20:41:18 +0000 (20:41 +0000)
commit8177fc439229f2caf8f9a6768bb2d7b43dabb4e6
tree2dbc18d911929e01342975b4d2f9da9761ed7541
parentfbcdf880ee23a57ab2bcd5ab796171cdab4f73a1
arch-gcn3: add support for unaligned accesses

Previously, with HSAIL, we were guaranteed by the HSA specification
that the GPU will never issue unaligned accesses.  However, now
that we are directly running GCN this is no longer true.
Accordingly, this commit adds support for unaligned accesses.
Moreover, to reduce the replication of nearly identical
code for the different request types, I also added new helper
functions that are called by all the different memory request
producing instruction types in op_encodings.hh.

Adding support for unaligned instructions requires changing
the statusBitVector used to track the status of the memory
requests for each lane from a bit per lane to an int per lane.
This is necessary because an unaligned access may span multiple
cache lines.  In the worst case, each lane may span multiple
cache lines.  There are corresponding changes in the files that
use the statusBitVector.

Change-Id: I319bf2f0f644083e98ca546d2bfe68cf87a5f967
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29920
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/gcn3/gpu_mem_helpers.hh [new file with mode: 0644]
src/arch/gcn3/insts/op_encodings.hh
src/gpu-compute/compute_unit.cc
src/gpu-compute/gpu_dyn_inst.cc
src/gpu-compute/gpu_dyn_inst.hh
src/mem/ruby/common/DataBlock.cc
src/mem/ruby/system/RubyPort.cc