Skip to content

Commit

Permalink
Update FPGA for Tiny VGA
Browse files Browse the repository at this point in the history
  • Loading branch information
mole99 committed Oct 27, 2023
1 parent a77e768 commit ab8883e
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 441 deletions.
35 changes: 7 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ GL = src/gl/primitives.v \
src/gl/tt_um_top_mole99.v

FPGA_ULX3S = fpga/rtl/ulx3s_top.sv \
fpga/rtl/GFX_hdmi.v \
fpga/rtl/GFX_PLL.v \
fpga/rtl/TMDS_encoder.v
fpga/rtl/pll40m.v \
src/tt_um_top_mole99.sv

FPGA_ICEBREAKER = fpga/rtl/icebreaker_top.sv
# Simulation

sim-icarus:
iverilog -g2012 -o top.vvp $(RTL) tb/tb_icarus.sv
Expand All @@ -35,33 +34,15 @@ sim-verilator:
sim-cocotb:
python3 tb/tb_cocotb.py

openlane: $(RTL)
python3 -m openlane --dockerized --flow Classic --pdk sky130A config.json
# Various

sprites:
python3 sprite2bit.py

animation.gif: images/
convert -delay 1.666 -loop 0 images/*.png animation.gif

synth-icebreaker: icebreaker.json

build-icebreaker: icebreaker.bit

upload-icebreaker: icebreaker.bit
openFPGALoader --board=ice40_generic -f icebreaker.bit

icebreaker.json: $(RTL) $(FPGA_ICEBREAKER)
yosys -l $(basename $@)-yosys.log -DSYNTHESIS -DICEBREAKER -p 'synth_ice40 -top icebreaker_top -json $@' $(RTL) $(FPGA_ICEBREAKER)

icebreaker.asc: icebreaker.json fpga/constraints/icebreaker.pcf
nextpnr-ice40 --up5k --json $< \
--pcf fpga/constraints/icebreaker.pcf \
--package sg48 \
--asc $@

icebreaker.bit: icebreaker.asc
icepack $< $@
# FPGA

synth-ulx3s: ulx3s.json

Expand All @@ -80,12 +61,10 @@ ulx3s.config: ulx3s.json fpga/constraints/ulx3s_v20.lpf
--textcfg $@

ulx3s.bit: ulx3s.config
ecppack $< $@
ecppack $< $@ --compress

clean:
rm -f *.vvp *.vcd
rm -rf openlane_run runs
rm -f icebreaker.json icebreaker.asc icebreaker.bit icebreaker-yosys.log
rm -f ulx3s.json ulx3s.config ulx3s.bit ulx3s-yosys.log

.PHONY: clean openlane sim-icarus sim-verilator sprites
.PHONY: clean sim-icarus sim-verilator sim-cocotb sprites
19 changes: 0 additions & 19 deletions config.json

This file was deleted.

83 changes: 0 additions & 83 deletions fpga/rtl/GFX_PLL.v

This file was deleted.

56 changes: 0 additions & 56 deletions fpga/rtl/GFX_hdmi.v

This file was deleted.

51 changes: 0 additions & 51 deletions fpga/rtl/TMDS_encoder.v

This file was deleted.

117 changes: 0 additions & 117 deletions fpga/rtl/icebreaker_top.sv

This file was deleted.

Loading

0 comments on commit ab8883e

Please sign in to comment.