]>
Commit | Line | Data |
---|---|---|
13350ed5 JW |
1 | TARGET = MandelTop |
2 | VLOGS = pixDCM.v mandelDCM.v Main.v | |
3 | VLOGS_ALL = $(VLOGS) | |
fd517766 | 4 | PART = xc3s1200e-fg320-5 |
13350ed5 JW |
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).svf | |
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 | |
fd517766 | 42 | ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p $(PART) "$(TARGET).ngc" $(TARGET).ngd |
13350ed5 JW |
43 | |
44 | $(TARGET)_map.ncd: $(TARGET).ngd | |
fd517766 | 45 | map -p $(PART) -cm area -pr off -k 4 -c 100 -o $(TARGET)_map.ncd $(TARGET).ngd $(TARGET).pcf |
13350ed5 JW |
46 | |
47 | $(TARGET).ncd: $(TARGET)_map.ncd | |
48 | par -w -ol std -t 1 $(TARGET)_map.ncd $(TARGET).ncd $(TARGET).pcf | |
49 | ||
50 | $(TARGET).twr: $(TARGET)_map.ncd | |
51 | trce -e 3 -s 5 -xml $(TARGET) $(TARGET).ncd -o $(TARGET).twr $(TARGET).pcf -ucf $(TARGET).ucf | |
52 | ||
53 | $(TARGET).bit: $(TARGET).ncd | |
54 | bitgen $(BITGEN_OPTS) $(TARGET).ncd | |
55 | ||
56 | $(TARGET).svf: $(TARGET).bit impact.cmd | |
57 | sed -e s/XXX/$(subst .bit,,$<)/ < impact.cmd > tmp.cmd | |
58 | impact -batch tmp.cmd | |
59 | ||
60 | clean: | |
61 | rm -f $(TARGET).bgn $(TARGET).ngc $(TARGET).svf $(TARGET).ngd $(TARGET).bit $(TARGET).twr $(TARGET).ncd $(TARGET)_map.ncd $(TARGET)_map.* | |
62 | rm -f $(TARGET).bld $(TARGET).drc $(TARGET)_ngdbuild.xrpt $(TARGET)_pad.* $(TARGET).pad $(TARGET).par $(TARGET)_par.xrpt $(TARGET).ngr | |
63 | rm -f $(TARGET).pcf $(TARGET)_summary.xml $(TARGET).unroutes $(TARGET)_usage.xml $(TARGET)_xst.xrpt $(TARGET).syr $(TARGET).ptwx $(TARGET).xpi | |
64 | rm -rf xst | |
65 | rm -rf xlnx_auto_* | |
66 | rm -rf _ngo | |
67 | rm -f tmp.cmd | |
68 | rm -f _impactbatch.log | |
69 | rm -f $(TARGET).prj | |
70 | rm -f $(TARGET).lso | |
71 |