.. | ||
.gitignore | ||
blinky_tb.v | ||
blinky.v | ||
README.md | ||
simple.sh | ||
simtest.sh |
MachXO2 Architecture Example
This contains a simple example of running nextpnr-machxo2
:
simple.sh
generates JSON output (pnrblinky.json
) of a classic blinky example fromblinky.v
.simtest.sh
will useyosys
to generate a Verilog file frompnrblinky.json
, calledpnrblinky.v
. It will then and comparepnrblinky.v
's simulation behavior to the original verilog file (blinky.v
) using theiverilog
compiler andvvp
runtime. This is known as post-place-and-route simulation.
As nextpnr-machxo2
is developed the contents simple.sh
and simtest.sh
are subject to change.
Environment Variables For simple.sh
And simtest.sh
YOSYS
- Set to the location of theyosys
binary to test. Defaults to theyosys
on the path. You may want to set this to ayosys
binary in your source tree if doing development.NEXTPNR
- Set to the location of thenextpnr-machxo2
binary to test. Defaults to thenextpnr-machxo2
binary at the root of thenextpnr
source tree. This should be set, for instance, if doing an out-of-tree build ofnextpnr-machxo2
.CELLS_SIM
- Set to the location ofmachxo2/cells_sim.v
simulation models. Defaults to whateveryosys-config
associated with the aboveYOSYS
binary returns. You may want to set this to/path/to/yosys/src/share/machxo2/cells_sim.v
if doing development;yosys-config
cannot find these "before-installation" simulation models.