Skip to content

convert all Display() arguments to nmigen Values

Jacob Lifshay requested to merge programmerjake/nmigen:fix-display into master

this fixes a bug where there are Display instances with Python int arguments, but dsl.py expects all arguments to be nmigen Values.

Example:

values = [Signal(name=f"value_{i}") for i in range(16)]
last = 0
for i, cur in enumerate(values):
    m.d.comb += [
        # note how we're passing an int into Display, not a nmigen Value
        Display("i:%i cur:%i last:%i", i, cur, last),
        cur.eq(last ^ inp[i]),
    ]
    last = cur

Merge request reports