From b872f02ab12ea3ea2054f3742901fecb78752205 Mon Sep 17 00:00:00 2001 From: Kyle Roarty Date: Thu, 13 Aug 2020 17:27:06 -0500 Subject: [PATCH] configs,gpu-compute,mem-ruby: connect gmTokenPorts in apu_se This patch adds gmTokenPorts to the ComputeUnit and RubyGPUCoalescer python classes so the gmTokenPorts can be connected in apu_se. Change-Id: Icf3cb05c757754d6935b46f14e4b1b1d5072c4ca Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32677 Reviewed-by: Matt Sinclair Reviewed-by: Anthony Gutierrez Maintainer: Anthony Gutierrez Tested-by: kokoro --- configs/example/apu_se.py | 2 ++ src/gpu-compute/GPU.py | 1 + src/mem/ruby/system/GPUCoalescer.py | 2 ++ 3 files changed, 5 insertions(+) diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py index b629058f0..59dd4c5f7 100644 --- a/configs/example/apu_se.py +++ b/configs/example/apu_se.py @@ -569,6 +569,8 @@ for i in range(n_cu): for j in range(wavefront_size): system.cpu[shader_idx].CUs[i].memory_port[j] = \ system.ruby._cpu_ports[gpu_port_idx].slave[j] + system.cpu[shader_idx].CUs[i].gmTokenPort = \ + system.ruby._cpu_ports[gpu_port_idx].gmTokenPort gpu_port_idx += 1 for i in range(n_cu): diff --git a/src/gpu-compute/GPU.py b/src/gpu-compute/GPU.py index 7408bf963..aec4f4806 100644 --- a/src/gpu-compute/GPU.py +++ b/src/gpu-compute/GPU.py @@ -165,6 +165,7 @@ class ComputeUnit(ClockedObject): sqc_tlb_port = MasterPort("Port to the TLB for the SQC (I-cache)") scalar_port = MasterPort("Port to the scalar data cache") scalar_tlb_port = MasterPort("Port to the TLB for the scalar data cache") + gmTokenPort = MasterPort("Port to the GPU coalesecer for sharing tokens") perLaneTLB = Param.Bool(False, "enable per-lane TLB") prefetch_depth = Param.Int(0, "Number of prefetches triggered at a time"\ "(0 turns off prefetching)") diff --git a/src/mem/ruby/system/GPUCoalescer.py b/src/mem/ruby/system/GPUCoalescer.py index 3345f7f94..9d4a76bdd 100644 --- a/src/mem/ruby/system/GPUCoalescer.py +++ b/src/mem/ruby/system/GPUCoalescer.py @@ -52,3 +52,5 @@ class RubyGPUCoalescer(RubyPort): "max outstanding cycles for a request before " \ "deadlock/livelock declared") garnet_standalone = Param.Bool(False, "") + + gmTokenPort = SlavePort("Port to the CU for sharing tokens") -- 2.30.2