Skip to content

Switching to nextpnr since arachne-pnr is deprecated. #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples/picosoc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ upload: hardware.bin firmware.bin
tinyprog -p hardware.bin -u firmware.bin


hardware.blif: hardware.v spimemio.v simpleuart.v picosoc.v picorv32.v
yosys -ql hardware.log -p 'synth_ice40 -top hardware -blif hardware.blif' $^
hardware.blif hardware.json &: hardware.v spimemio.v simpleuart.v picosoc.v picorv32.v
yosys -ql hardware.log -p 'synth_ice40 -top hardware -blif hardware.blif -json hardware.json' $^

hardware.asc: hardware.pcf hardware.blif
arachne-pnr -d 8k -P cm81 -o hardware.asc -p hardware.pcf hardware.blif
hardware.asc: hardware.pcf hardware.json
nextpnr-ice40 --lp8k --package cm81 --asc hardware.asc --pcf hardware.pcf --json hardware.json

hardware.bin: hardware.asc
icetime -d hx8k -c 12 -mtr hardware.rpt hardware.asc
icepack hardware.asc hardware.bin


firmware.elf: sections.lds start.S firmware.c
riscv32-unknown-elf-gcc -march=rv32imc -nostartfiles -Wl,-Bstatic,-T,sections.lds,--strip-debug,-Map=firmware.map,--cref -ffreestanding -nostdlib -o firmware.elf start.S firmware.c
riscv32-unknown-elf-gcc -march=rv32imc -mabi=ilp32 -nostartfiles -Wl,-Bstatic,-T,sections.lds,--strip-debug,-Map=firmware.map,--cref -ffreestanding -nostdlib -o firmware.elf start.S firmware.c

firmware.bin: firmware.elf
riscv32-unknown-elf-objcopy -O binary firmware.elf /dev/stdout > firmware.bin
Expand Down
10 changes: 5 additions & 5 deletions icestorm_template/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ DEVICE = lp8k

all: $(PROJ).rpt $(PROJ).bin

%.blif: %.v
yosys -p 'synth_ice40 -top $(PROJ) -blif $@' $<
%.blif %.json : %.v
yosys -p 'synth_ice40 -top $(PROJ) -blif $@ -json $*.json' $<

%.asc: $(PIN_DEF) %.blif
arachne-pnr -d 8k -P cm81 -o $@ -p $^
%.asc: $(PIN_DEF) %.blif %.json
nextpnr-ice40 --$(DEVICE) --package cm81 --json $*.json --asc $@ --pcf $(PIN_DEF)

%.bin: %.asc
icepack $< $@
Expand Down Expand Up @@ -56,7 +56,7 @@ sudo-prog: $(PROJ).bin
sudo tinyprog -p $<

clean:
rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin
rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin $(PROJ).json

.SECONDARY:
.PHONY: all prog clean