]> Joshua Wise's Git repositories - vterm.git/blob - Makefile
Add a cursor. Add backspace.
[vterm.git] / Makefile
1 TARGET = VTerm
2 VLOGS = VTerm.v
3 VLOGS_ALL = $(VLOGS) scancodes.shifted.hex scancodes.unshifted.hex
4
5 all: fpga_target
6
7 scancodes.unshifted.hex: scancodes.txt
8         cut -f3 -d, scancodes.txt > scancodes.unshifted.hex
9
10 scancodes.shifted.hex: scancodes.txt
11         cut -f4 -d, scancodes.txt > scancodes.shifted.hex
12
13 BITGEN_OPTS = \
14         -w \
15         -g DebugBitstream:No \
16         -g Binary:no \
17         -g CRC:Enable \
18         -g ConfigRate:1 \
19         -g ProgPin:PullUp \
20         -g DonePin:PullUp \
21         -g TckPin:PullUp \
22         -g TdiPin:PullUp \
23         -g TdoPin:PullUp \
24         -g TmsPin:PullUp \
25         -g UnusedPin:PullDown \
26         -g UserID:0xFFFFFFFF \
27         -g DCMShutdown:Disable \
28         -g StartUpClk:CClk \
29         -g DONE_cycle:4 \
30         -g GTS_cycle:5 \
31         -g GWE_cycle:6 \
32         -g LCK_cycle:NoWait \
33         -g Security:None \
34         -g DonePipe:No \
35         -g DriveDone:No
36
37 fpga_target: $(TARGET).svf
38
39 $(TARGET).ngc: $(TARGET).xst $(VLOGS_ALL)
40         @mkdir -p xst/projnav.tmp
41         @echo work > $(TARGET).lso
42         @rm -f $(TARGET).prj
43         @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
44         xst -ifn $(TARGET).xst -ofn $(TARGET).syr
45
46 $(TARGET).ngd: $(TARGET).ngc $(TARGET).ucf
47         ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p xc3s500e-fg320-5 "$(TARGET).ngc" $(TARGET).ngd
48
49 $(TARGET)_map.ncd: $(TARGET).ngd
50         map -p xc3s500e-fg320-5 -cm area -pr off -k 4 -c 100 -o $(TARGET)_map.ncd $(TARGET).ngd $(TARGET).pcf
51
52 $(TARGET).ncd: $(TARGET)_map.ncd
53         par -w -ol std -t 1 $(TARGET)_map.ncd $(TARGET).ncd $(TARGET).pcf
54
55 $(TARGET).twr: $(TARGET)_map.ncd
56         trce -e 3 -s 5 -xml $(TARGET) $(TARGET).ncd -o $(TARGET).twr $(TARGET).pcf -ucf $(TARGET).ucf
57
58 $(TARGET).bit: $(TARGET).ncd
59         bitgen $(BITGEN_OPTS) $(TARGET).ncd
60
61 $(TARGET).svf: $(TARGET).bit impact.cmd
62         sed -e s/XXX/$(subst .bit,,$<)/ < impact.cmd > tmp.cmd
63         impact -batch tmp.cmd
64
65 clean:
66         rm -f $(TARGET).bgn $(TARGET).ngc $(TARGET).svf $(TARGET).ngd $(TARGET).bit $(TARGET).twr $(TARGET).ncd $(TARGET)_map.ncd $(TARGET)_map.*
67         rm -f $(TARGET).bld $(TARGET).drc $(TARGET)_ngdbuild.xrpt $(TARGET)_pad.* $(TARGET).pad $(TARGET).par $(TARGET)_par.xrpt $(TARGET).ngr
68         rm -f $(TARGET).pcf $(TARGET)_summary.xml $(TARGET).unroutes $(TARGET)_usage.xml $(TARGET)_xst.xrpt $(TARGET).syr $(TARGET).ptwx $(TARGET).xpi
69         rm -rf xst
70         rm -rf xlnx_auto_*
71         rm -rf _ngo
72         rm -f tmp.cmd
73         rm -f _impactbatch.log
74         rm -f $(TARGET).prj
75         rm -f $(TARGET).lso
76
This page took 0.037619 seconds and 4 git commands to generate.