From 5187a24d496cd16bfe440f52ff0c45ab0e185306 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Wed, 4 Apr 2018 16:27:04 +0100 Subject: sim,cpu,mem,arch: Introduced MasterInfo data structure With this patch a gem5 System will store more info about its Masters. While it was previously keeping track of the Master name and Master ID only, it is now adding a per-Master pointer to the SimObject related to the Master. This will make it possible for a client to query a System for a Master using either the master's name or the master's pointer. Change-Id: I8b97d328a65cd06f329e2cdd3679451c17d2b8f6 Signed-off-by: Giacomo Travaglini Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/9781 Reviewed-by: Jason Lowe-Power Maintainer: Nikos Nikoleris --- src/gpu-compute/compute_unit.cc | 2 +- src/gpu-compute/dispatcher.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpu-compute') diff --git a/src/gpu-compute/compute_unit.cc b/src/gpu-compute/compute_unit.cc index 87f29eb68..8f2c659b7 100644 --- a/src/gpu-compute/compute_unit.cc +++ b/src/gpu-compute/compute_unit.cc @@ -74,7 +74,7 @@ ComputeUnit::ComputeUnit(const Params *p) : MemObject(p), fetchStage(p), coalescerToVrfBusWidth(p->coalescer_to_vrf_bus_width), req_tick_latency(p->mem_req_latency * p->clk_domain->clockPeriod()), resp_tick_latency(p->mem_resp_latency * p->clk_domain->clockPeriod()), - _masterId(p->system->getMasterId(name() + ".ComputeUnit")), + _masterId(p->system->getMasterId(this, "ComputeUnit")), lds(*p->localDataStore), _cacheLineSize(p->system->cacheLineSize()), globalSeqNum(0), wavefrontSize(p->wfSize), kernelLaunchInst(new KernelLaunchStaticInst()) diff --git a/src/gpu-compute/dispatcher.cc b/src/gpu-compute/dispatcher.cc index 7fd1101b1..a64528193 100644 --- a/src/gpu-compute/dispatcher.cc +++ b/src/gpu-compute/dispatcher.cc @@ -47,7 +47,7 @@ GpuDispatcher *GpuDispatcher::instance = nullptr; GpuDispatcher::GpuDispatcher(const Params *p) - : DmaDevice(p), _masterId(p->system->getMasterId(name() + ".disp")), + : DmaDevice(p), _masterId(p->system->getMasterId(this, "disp")), pioAddr(p->pio_addr), pioSize(4096), pioDelay(p->pio_latency), dispatchCount(0), dispatchActive(false), cpu(p->cpu), shader(p->shader_pointer), driver(p->cl_driver), -- cgit v1.2.3