-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dedicated output for LUT in GENERIC_SLICE
- Loading branch information
1 parent
21c09c8
commit 7c362f2
Showing
6 changed files
with
31 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
yosys -p "tcl ../synth/synth_generic.tcl 4 blinky.json" blinky.v | ||
${NEXTPNR:-../../nextpnr-generic} --pre-pack simple.py --pre-place simple_timing.py --json blinky.json --post-route bitstream.py | ||
${NEXTPNR:-../../nextpnr-generic} --pre-pack simple.py --pre-place simple_timing.py --json blinky.json --post-route bitstream.py --write pnrblinky.json | ||
yosys -p "read_verilog -lib ../synth/prims.v; read_json pnrblinky.json; dump -o blinky.il; show -format png -prefix blinky" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
for cname, cell in ctx.cells: | ||
if cell.type != "GENERIC_SLICE": | ||
continue | ||
if cname in ("$PACKER_GND", "$PACKER_VCC"): | ||
continue | ||
K = int(cell.params["K"]) | ||
if int(cell.params["FF_USED"], 2) == 1: | ||
ctx.addCellTimingClock(cell=cname, port="CLK") | ||
for i in range(K): | ||
ctx.addCellTimingSetupHold(cell=cname, port="I[%d]" % i, clock="CLK", | ||
setup=ctx.getDelayFromNS(0.2), hold=ctx.getDelayFromNS(0)) | ||
ctx.addCellTimingClockToOut(cell=cname, port="Q", clock="CLK", clktoq=ctx.getDelayFromNS(0.2)) | ||
else: | ||
for i in range(K): | ||
ctx.addCellTimingDelay(cell=cname, fromPort="I[%d]" % i, toPort="Q", delay=ctx.getDelayFromNS(0.2)) | ||
if cell.type != "GENERIC_SLICE": | ||
continue | ||
if cname in ("$PACKER_GND", "$PACKER_VCC"): | ||
continue | ||
K = int(cell.params["K"]) | ||
ctx.addCellTimingClock(cell=cname, port="CLK") | ||
for i in range(K): | ||
ctx.addCellTimingSetupHold(cell=cname, port="I[%d]" % i, clock="CLK", | ||
setup=ctx.getDelayFromNS(0.2), hold=ctx.getDelayFromNS(0)) | ||
ctx.addCellTimingClockToOut(cell=cname, port="Q", clock="CLK", clktoq=ctx.getDelayFromNS(0.2)) | ||
for i in range(K): | ||
ctx.addCellTimingDelay(cell=cname, fromPort="I[%d]" % i, toPort="F", delay=ctx.getDelayFromNS(0.2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters