-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
37 lines (26 loc) · 815 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
PYTHON=python3.6
MODULES=deflate.py test_deflate.py
all: build test
build: $(MODULES)
for p in $?; do $(PYTHON) $$p; done
test: icarus
test_fast_bench.v: $(MODULES)
for p in $?; do $(PYTHON) $$p; done
icarus: test_fast_bench.v
iverilog -o test_deflate test_fast_bench.v dump.v
vvp test_deflate
yosys:
-mv test40.log test40.old.log
sed -e '/disable MYHDL/d' -e '/\$$finish/d' < test_deflate_bench.v > test40.v
yosys -p "synth_ice40 -blif test40.blif" test40.v 2>&1 > test40.log
tail -20 test40.log
place:
#arachne-pnr -d 5k -P sg48 -p upduino_v2.pcf chip.blif -o chip.txt
arachne-pnr -d 5k -P sg48 test40.blif -o test40.txt
next:
yosys -p "synth_ice40 -json test40.json" test40.v
nextpnr-ice40 --up5k --json test40.json --asc test40.asc
time:
icetime -tmd up5k test40.asc
clean:
rm -f *.vcd