diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-18 20:17:21 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-08-18 20:17:21 +0200 |
commit | 1afe3af452212b424a96d2e0d1b89aab0259e50e (patch) | |
tree | f559ab70953809400e1bf90c2dc382d19926c25e /picosoc/Makefile | |
parent | b634224ccb9581ffde6f7ecde4553f743c03588c (diff) | |
download | picorv32-1afe3af452212b424a96d2e0d1b89aab0259e50e.tar.gz picorv32-1afe3af452212b424a96d2e0d1b89aab0259e50e.zip |
Add PicoSoC IceBreaker demo
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'picosoc/Makefile')
-rw-r--r-- | picosoc/Makefile | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/picosoc/Makefile b/picosoc/Makefile index 0faf167..3615f91 100644 --- a/picosoc/Makefile +++ b/picosoc/Makefile @@ -33,10 +33,44 @@ hx8kprog: hx8kdemo.bin firmware.bin hx8kprog_fw: firmware.bin iceprog -o 1M firmware.bin +# ---- iCE40 IceBreaker Board ---- + +icebsim: icebreaker_tb.vvp firmware.hex + vvp -N $< + +icebsynsim: icebreaker_syn_tb.vvp firmware.hex + vvp -N $< + +icebreaker.json: icebreaker.v spimemio.v simpleuart.v picosoc.v ../picorv32.v + yosys -ql icebreaker.log -p 'synth_ice40 -top icebreaker -json icebreaker.json' $^ + +icebreaker_tb.vvp: icebreaker_tb.v icebreaker.v spimemio.v simpleuart.v picosoc.v ../picorv32.v spiflash.v + iverilog -s testbench -o $@ $^ `yosys-config --datdir/ice40/cells_sim.v` + +icebreaker_syn_tb.vvp: icebreaker_tb.v icebreaker_syn.v spiflash.v + iverilog -s testbench -o $@ $^ `yosys-config --datdir/ice40/cells_sim.v` + +icebreaker_syn.v: icebreaker.json + yosys -p 'read_json icebreaker.json; write_verilog icebreaker_syn.v' + +icebreaker.asc: icebreaker.pcf icebreaker.json + nextpnr-ice40 --freq 13 --up5k --asc icebreaker.asc --pcf icebreaker.pcf --json icebreaker.json + +icebreaker.bin: icebreaker.asc + icetime -d up5k -c 12 -mtr icebreaker.rpt icebreaker.asc + icepack icebreaker.asc icebreaker.bin + +icebprog: icebreaker.bin firmware.bin + iceprog icebreaker.bin + iceprog -o 1M firmware.bin + +icebprog_fw: firmware.bin + iceprog -o 1M firmware.bin + # ---- Example Firmware ---- firmware.elf: sections.lds start.s firmware.c - riscv32-unknown-elf-gcc -march=rv32imc -Wl,-Bstatic,-T,sections.lds,--strip-debug -ffreestanding -nostdlib -o firmware.elf start.s firmware.c + riscv32-unknown-elf-gcc -march=rv32ic -Wl,-Bstatic,-T,sections.lds,--strip-debug -ffreestanding -nostdlib -o firmware.elf start.s firmware.c firmware.hex: firmware.elf riscv32-unknown-elf-objcopy -O verilog firmware.elf firmware.hex @@ -64,6 +98,9 @@ clean: rm -f firmware.elf firmware.hex firmware.bin cmos.log rm -f hx8kdemo.blif hx8kdemo.log hx8kdemo.asc hx8kdemo.rpt hx8kdemo.bin rm -f hx8kdemo_syn.v hx8kdemo_syn_tb.vvp hx8kdemo_tb.vvp + rm -f icebreaker.json icebreaker.log icebreaker.asc icebreaker.rpt icebreaker.bin + rm -f icebreaker_syn.v icebreaker_syn_tb.vvp icebreaker_tb.vvp -.PHONY: spiflash_tb hx8kprog hx8kprog_fw hx8ksim hx8ksynsim clean - +.PHONY: spiflash_tb clean +.PHONY: hx8kprog hx8kprog_fw hx8ksim hx8ksynsim +.PHONY: icebprog icebprog_fw icebsim icebsynsim |