programmerjake at gmail.com
Mon Apr 22 18:28:06 BST 2019
On Mon, Apr 22, 2019, 05:27 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> the only thing to watch out for is *not* to use the python variable
> multiple times. the pythonvariable contains nmigen *code fragments*,
> consequently using it more than once will result in DUPLICATION of the
> gates it represents.
Duplication is perfectly fine because yosys's default synthesis script,
synth, runs opt, which includes opt_merge, which is a deduplication pass,
as well as abc, which has a lot of fancy logic optimizations. You need to
see what changes actually result in different output before deciding that a
code pattern is counterproductive. That's like compiling code in debug mode
and expecting benchmarks to be representative of real-world performance,
basically discarding most of the hard work the compiler developers did.
More information about the libre-riscv-dev