From ac5e82d9944f5b7475eb13546affd1bc03d57f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=2E=20Preu=C3=9Fer?= Date: Thu, 21 Sep 2023 13:03:27 +0100 Subject: [PATCH] Ensure a minimum of two buffer slots even for length-1 sequences. --- finn-rtllib/mvu/replay_buffer.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finn-rtllib/mvu/replay_buffer.sv b/finn-rtllib/mvu/replay_buffer.sv index 942f1823ca..d4342f705c 100644 --- a/finn-rtllib/mvu/replay_buffer.sv +++ b/finn-rtllib/mvu/replay_buffer.sv @@ -111,7 +111,7 @@ module replay_buffer #( assign last_rep = RepLst; end : blkRep - localparam int unsigned AWIDTH = $clog2(LEN); + localparam int unsigned AWIDTH = LEN < 2? 1 : $clog2(LEN); typedef logic [AWIDTH :0] ptr_t; // pointers with additional generational MSB typedef logic [W -1:0] data_t;