Skip to content

Commit 076a2c8

Browse files
committed
Add redundant Mux for easy debugging. It will be removed by the synthesis optimizer.
1 parent 5d70678 commit 076a2c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

veriloggen/types/util.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def log2(value, maxsize=32):
5454
def add_mux(targ, cond, value):
5555
prev_assign = targ._get_assign()
5656
if not prev_assign:
57-
targ.assign(value)
57+
# targ.assign(value)
58+
# for easy debugging
59+
targ.assign(vtypes.Mux(cond, value, value))
5860
else:
5961
prev_value = prev_assign.statement.right
6062
prev_assign.overwrite_right(

0 commit comments

Comments
 (0)