Fix read-multiplexer bug in case a reg is _not_ an array

This commit is contained in:
Dennis Potter 2021-08-22 21:43:53 -07:00
parent d298e79ec1
commit 08b7de9544
Signed by: Dennis
GPG Key ID: 186A8AD440942BAF

View File

@ -143,7 +143,7 @@ class Register(Component):
for i in self.eval_genvars(vec, 0, self.total_array_dimensions): for i in self.eval_genvars(vec, 0, self.total_array_dimensions):
yield (mux_tuple, i) yield (mux_tuple, i)
else: else:
yield(mux_tuple, (mux_tuple[1], '')) yield(mux_tuple, (0, ''))
def eval_genvars(self, vec, depth, dimensions): def eval_genvars(self, vec, depth, dimensions):
for i in range(dimensions[depth]): for i in range(dimensions[depth]):