From 08b7de954408e1aa5802a43d75e5c3c2be46b494 Mon Sep 17 00:00:00 2001 From: Dennis Date: Sun, 22 Aug 2021 21:43:53 -0700 Subject: [PATCH] Fix read-multiplexer bug in case a reg is _not_ an array --- srdl2sv/components/register.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srdl2sv/components/register.py b/srdl2sv/components/register.py index 7cc3026..3e80158 100644 --- a/srdl2sv/components/register.py +++ b/srdl2sv/components/register.py @@ -143,7 +143,7 @@ class Register(Component): for i in self.eval_genvars(vec, 0, self.total_array_dimensions): yield (mux_tuple, i) else: - yield(mux_tuple, (mux_tuple[1], '')) + yield(mux_tuple, (0, '')) def eval_genvars(self, vec, depth, dimensions): for i in range(dimensions[depth]):