Skip to content

Commit

Permalink
examples: Update to latest Yosys/nextpnr/ecppack
Browse files Browse the repository at this point in the history
 - Remove baseconfigs
 - Remove unneeded synth_ecp5 arguments now all features supported
 - Use ecppack --svf instead of bit_to_svf.py

Signed-off-by: David Shah <[email protected]>
  • Loading branch information
gatecat committed Feb 14, 2019
1 parent c6aa27d commit 72418c7
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 460 deletions.
4 changes: 2 additions & 2 deletions examples/ecp5_evn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ PROJ=blinky
all: ${PROJ}.bit

%.json: %.v
yosys -p "synth_ecp5 -noccu2 -nobram -nomux -json $@" $<
yosys -p "synth_ecp5 -json $@" $<

%_out.config: %.json
nextpnr-ecp5 --json $< --basecfg ../../misc/basecfgs/empty_lfe5um5g-85f.config --textcfg $@ --um5g-85k --package CABGA381 --lpf ecp5evn.lpf
nextpnr-ecp5 --json $< --textcfg $@ --um5g-85k --package CABGA381 --lpf ecp5evn.lpf

%.bit: %_out.config
ecppack --svf ${PROJ}.svf $< $@
Expand Down
4 changes: 2 additions & 2 deletions examples/picorv32_tinyfpga/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ attosoc_sim: attosoc_tb.vvp firmware.hex
vvp -N $<

attosoc.json: io_wrapper.v attosoc.v picorv32.v firmware.hex
yosys -p "synth_ecp5 -noccu2 -nomux -nodram -json $@" io_wrapper.v attosoc.v picorv32.v
yosys -p "synth_ecp5 -json $@" io_wrapper.v attosoc.v picorv32.v

attosoc_out.config: attosoc.json
nextpnr-ecp5 --json $< --basecfg ../../misc/basecfgs/empty_lfe5um5g-85f.config --textcfg $@ --85k --package CSFBGA285 --seed 4
nextpnr-ecp5 --json $< --textcfg $@ --85k --package CSFBGA285 --seed 4
attosoc.bit: attosoc_out.config
ecppack $< $@

Expand Down
4 changes: 2 additions & 2 deletions examples/picorv32_ulx3s/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ attosoc_sim: attosoc_tb.vvp firmware.hex
vvp -N $<

attosoc.json: io_wrapper.v attosoc.v picorv32.v firmware.hex
yosys -p "synth_ecp5 -noccu2 -nomux -nodram -json $@" io_wrapper.v attosoc.v picorv32.v
yosys -p "synth_ecp5 -json $@" io_wrapper.v attosoc.v picorv32.v

attosoc_out.config: attosoc.json
nextpnr-ecp5 --json $< --basecfg ../../misc/basecfgs/empty_lfe5u-45f.config --textcfg $@ --45k --no-tmdriv
nextpnr-ecp5 --json $< --textcfg $@ --45k --no-tmdriv

attosoc.bit: attosoc_out.config
ecppack $< $@
Expand Down
5 changes: 2 additions & 3 deletions examples/picorv32_versa5g/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ attosoc_out.config: attosoc.json
nextpnr-ecp5 --json $< --basecfg ../../misc/basecfgs/empty_lfe5um5g-45f.config --textcfg $@ --um5g-45k

attosoc.bit: attosoc_out.config
ecppack $< $@
ecppack --svf-rowsize 100000 --svf attosoc.svf $< $@

%.svf: %.bit
../../tools/bit_to_svf.py $< $@
attosoc.svf: attosoc.bit

prog: attosoc.svf
openocd -f ../../misc/openocd/ecp5-versa5g.cfg -c "transport select jtag; init; svf $<; exit"
Expand Down
5 changes: 2 additions & 3 deletions examples/soc_ecp5_evn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ attosoc.json: top.v attosoc.v picorv32.v pll.v firmware.hex
yosys -p "synth_ecp5 -json $@ -top top" top.v pll.v attosoc.v picorv32.v simpleuart.v

attosoc_out.config: attosoc.json ecp5evn.lpf
nextpnr-ecp5 --json attosoc.json --lpf ecp5evn.lpf --basecfg ../../misc/basecfgs/empty_lfe5um5g-85f.config --textcfg $@ --um5g-85k --freq 50
nextpnr-ecp5 --json attosoc.json --lpf ecp5evn.lpf --textcfg $@ --um5g-85k --freq 50

attosoc.bit: attosoc_out.config
ecppack $< $@
ecppack --svf-rowsize 100000 --svf attosoc.svf $< $@

%.svf: %.bit
../../tools/bit_to_svf.py $< $@

prog: attosoc.svf
openocd -f ../../misc/openocd/ecp5-evn.cfg -c "transport select jtag; init; svf $<; exit"
Expand Down
5 changes: 2 additions & 3 deletions examples/soc_versa5g/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ attosoc.json: top.v pll.v attosoc.v picorv32.v firmware.hex
yosys -p "synth_ecp5 -json $@ -top top" top.v pll.v attosoc.v picorv32.v simpleuart.v

attosoc_out.config: attosoc.json versa.lpf
nextpnr-ecp5 --json attosoc.json --lpf versa.lpf --basecfg ../../misc/basecfgs/empty_lfe5um5g-45f.config --textcfg $@ --um5g-45k --freq 50
nextpnr-ecp5 --json attosoc.json --lpf versa.lpf --textcfg $@ --um5g-45k --freq 50

attosoc.bit: attosoc_out.config
ecppack $< $@
ecppack --svf-rowsize 100000 --svf attosoc.svf $< $@

%.svf: %.bit
../../tools/bit_to_svf.py $< $@

prog: attosoc.svf
openocd -f ../../misc/openocd/ecp5-versa5g.cfg -c "transport select jtag; init; svf $<; exit"
Expand Down
2 changes: 1 addition & 1 deletion examples/tinyfpga_rev1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ all: ${PROJ}.bit
yosys -p "synth_ecp5 -noccu2 -nomux -nodram -json $@" $<

%_out.config: %.json
nextpnr-ecp5 --json $< --basecfg empty_85k.config --textcfg $@ --85k --package CSFBGA285
nextpnr-ecp5 --json $< --textcfg $@ --85k --package CSFBGA285

%.bit: %_out.config
ecppack $< $@
Expand Down
2 changes: 1 addition & 1 deletion examples/tinyfpga_rev2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ all: ${PROJ}.bit
yosys -p "synth_ecp5 -json $@" $<

%_out.config: %.json
nextpnr-ecp5 --json $< --basecfg ../../misc/basecfgs/empty_lfe5um5g-85f.config --textcfg $@ --um5g-85k --package CSFBGA285 --lpf morse.lpf
nextpnr-ecp5 --json $< --textcfg $@ --um5g-85k --package CSFBGA285 --lpf morse.lpf

%.bit: %_out.config
ecppack $< $@
Expand Down
4 changes: 2 additions & 2 deletions examples/ulx3s/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
all: blinky.bit

blinky.json: blinky.v
yosys -p "synth_ecp5 -noccu2 -nomux -nodram -json blinky.json" blinky.v
yosys -p "synth_ecp5 -json blinky.json" blinky.v

blinky_out.config: blinky.json
nextpnr-ecp5 --json blinky.json --basecfg ulx3s_empty.config --textcfg blinky_out.config --45k
nextpnr-ecp5 --json blinky.json --textcfg blinky_out.config --45k

blinky.bit: blinky_out.config
ecppack blinky_out.config blinky.bit
Loading

0 comments on commit 72418c7

Please sign in to comment.