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