mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-05-11 17:47:08 +00:00
* generic: Fix Python path not including the examples/ directory in the example
It seems that at some point, the embedded Python stopped including the
directory that nextpnr-generic was executed in inside of its sys.path.
This likely happened by de3d5be8 specifying an explicit argv to
the interpreter init function.
* generic: Improve the example for K != 4
Configuring K < 4 used to result in "dangling" inputs to the cells being
generated (those are just not driven by anything in the resulting Verilog/JSON).
Configuring K > 4 used to result in an assertion crash in cells.cc.
The ctx.setLutK call fixes both cases.
10 lines
524 B
Bash
Executable File
10 lines
524 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -ex
|
|
export PYTHONPATH=$(dirname $0)
|
|
K=$(python3 -c "import simple_config; print(simple_config.K)")
|
|
yosys -p "tcl ../synth/synth_generic.tcl $K blinky.json" blinky.v
|
|
${NEXTPNR:-../../nextpnr-generic} --no-iobs --pre-pack simple.py --pre-place simple_timing.py --json blinky.json --post-route bitstream.py --write pnrblinky.json
|
|
yosys -p "read_json pnrblinky.json; write_verilog -noattr -norename pnrblinky.v"
|
|
iverilog -o blinky_simtest ../synth/prims.v blinky_tb.v pnrblinky.v
|
|
vvp -N ./blinky_simtest
|