From 65d13a0e5027a3df1f545984e1d67a68cae2c842 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 14 Sep 2024 16:40:14 -0700 Subject: [PATCH] vram/VRAM: only expect a response on reads The VRAMCore doesn't generate responses for writes, so demanding one here deadlocks the port the first time it writes something. --- vram/VRAM.bsv | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vram/VRAM.bsv b/vram/VRAM.bsv index a128dc8..09198d0 100644 --- a/vram/VRAM.bsv +++ b/vram/VRAM.bsv @@ -44,9 +44,12 @@ module mkArbitratedVRAMServers(VRAMServer ram, MemArbiter#(n, VRAMAddr) arb, Vec (* fire_when_enabled *) rule submit (awaiting_response[1] matches tagged Invalid); let port = arb.granted_port(); - ram.request.put(requests[port].first); + let req = requests[port].first; + ram.request.put(req); requests[port].deq(); - awaiting_response[1] <= tagged Valid port; + // Only reads generate a response. + if (req.data matches tagged Invalid) + awaiting_response[1] <= tagged Valid port; endrule (* fire_when_enabled *)