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