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