Commit 1923558
csr.bus: elaborate Multiplexer connections deterministically
Python sets have non-deterministic iteration, however dicts iterate in
insertion order.
Ensuring the Shadow range set is iterated in a deterministic order
causes chunks to be built in a deterministic order and thus
chunks/registers to be processed in a deterministic order inside
`elaborate()`.
If they are processed non-deterministically, then the Case ordering and
various temporary variable names are produced non-deterministically,
causing a non-deterministic final RTLIL output, which is undesirable.
Determinism is one of those things that's rather hard to prove true, but
this nonetheless fixes a tested design's RTLIL output to be
deterministic across all (several dozen) tested runs rather than be
different almost every run.1 parent fe75f40 commit 1923558
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
476 | 479 | | |
477 | 480 | | |
478 | 481 | | |
| |||
0 commit comments