From bd67ff34394984eb87f054ec240eb4195655139e Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Wed, 13 Mar 2024 20:43:27 -0700 Subject: [PATCH] Fix creating bogus mem reqs when commit is stalled When commit stage is stalled, LSU ready is deasserted for mem writes since stores commit immediately; however, the same was not applied to valid, creating duplicate memory write requests. Fix by guarding both ready and valid properly. --- hw/rtl/core/VX_lsu_unit.sv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/rtl/core/VX_lsu_unit.sv b/hw/rtl/core/VX_lsu_unit.sv index 5a57db4c..7624cd11 100644 --- a/hw/rtl/core/VX_lsu_unit.sv +++ b/hw/rtl/core/VX_lsu_unit.sv @@ -155,7 +155,9 @@ module VX_lsu_unit import VX_gpu_pkg::*; #( wire mem_rsp_eop; wire mem_rsp_ready; - assign mem_req_valid = lsu_valid; + // don't stay up and create bogus valids when LSU is not ready due to + // st_rsp_ready + assign mem_req_valid = lsu_valid && (~mem_req_rw || st_rsp_ready); assign lsu_ready = mem_req_ready && (~mem_req_rw || st_rsp_ready); // writes commit directly