From df4b21507eae6fe6ee2003e7a6b79e0a7826eac4 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Mon, 18 Mar 2024 14:30:32 -0700 Subject: [PATCH] Customize global barrier response logic for clusters --- hw/rtl/core/VX_schedule.sv | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/rtl/core/VX_schedule.sv b/hw/rtl/core/VX_schedule.sv index 9a074d31..d6172120 100644 --- a/hw/rtl/core/VX_schedule.sv +++ b/hw/rtl/core/VX_schedule.sv @@ -162,10 +162,22 @@ module VX_schedule import VX_gpu_pkg::*; #( stalled_warps_n[warp_ctl_if.wid] = 0; // unlock warp end `ifdef GBAR_ENABLE + `ifdef GBAR_CLUSTER_ENABLE + // don't check req_id == rsp_id, otherwise it limits us to + // 1 outstanding request. instead assume that any response coming + // back contains a valid id + if (gbar_bus_if.rsp_valid) begin + barrier_masks_n[gbar_bus_if.rsp_id] = '0; + // instead of unlocking all warps, only unlock those that requests + // for this barrier + barrier_stalls_n &= ~barrier_masks[gbar_bus_if.rsp_id]; + end + `else if (gbar_bus_if.rsp_valid && (gbar_req_id == gbar_bus_if.rsp_id)) begin barrier_masks_n[gbar_bus_if.rsp_id] = '0; barrier_stalls_n = '0; // unlock all warps end + `endif `endif // Branch handling