Open litghost opened 3 years ago
@litghost I believe that the create_logical_netlist_from_verilog.py
scripts already exists, so the main part to implement here is the test script part in nextpnr, right?
so the main part to implement here is the test script part in nextpnr, right
Yes
See YosysHQ/nextpnr#681
This probably makes most sense in a script that is run --pre-place
or --pre-route
(in the latter case, first ripping up the existing placement), with --no-route
also passed to nextpnr.
The relevant Python functions will be:
ctx.remove_site_routing()
ctx.bindBel('<bel name>', ctx.cells['<cell name>'], STRENGTH_WEAK)
ctx.isBelLocationValid('<bel name>')
ctx.unbindBel('<bel name>')
One of the more fragile but critical pieces of logic in the FPGA interchange nextpnr arch is the site routing logic. For clarity, this is the collection of code that implements the isBelLocationValid part of the nextpnr Arch API. This implementation must both be fast (amortized over the entire placement step) and precise and accurate. That is a mixture that means that it should be well tested, so that as complexity increases or speed improvements are done, there is a way to verify that it is still correct.
The suggested site routing test framework would consists of 3 parts:
Example:
Netlist:
Test case:
Invocation might look like:
Alternate designs are welcome and accepted.