Commit 2423404b authored by whitequark's avatar whitequark
Browse files

fhdl.verilog: fix nondeterminism in _printcomb.

parent 0aa76fa3
......@@ -271,11 +271,11 @@ def _printcomb(f, ns,
if display_run:
r += "\t$display(\"Running comb block #" + str(n) + "\");\n"
if blocking_assign:
for t in g[0]:
for t in sorted(g[0], key=lambda x: x.duid):
r += "\t" + ns.get_name(t) + " = " + _printexpr(ns, t.reset)[0] + ";\n"
r += _printnode(ns, _AT_BLOCKING, 1, g[1])
else:
for t in g[0]:
for t in sorted(g[0], key=lambda x: x.duid):
r += "\t" + ns.get_name(t) + " <= " + _printexpr(ns, t.reset)[0] + ";\n"
r += _printnode(ns, _AT_NONBLOCKING, 1, g[1])
if dummy_signal:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment