Add support for CellularRAM on Nexys2.
[firearm.git] / xst / Makefile
CommitLineData
8744c23d 1TARGET = FireARM
1e7ff543 2VLOGS = Console.nexys2.v \
aadd22b9
JW
3 ../ARM_Constants.v \
4 ../BigBlockRAM.v \
5 ../BlockRAM.v \
1e7ff543 6 ../CellularRAM.v \
aadd22b9
JW
7 ../BusArbiter.v \
8 ../DCache.v \
9 ../Decode.v \
10 ../Execute.v \
11 ../Fetch.v \
12 ../ICache.v \
13 ../Issue.v \
14 ../Memory.v \
15 ../RegFile.v \
16 ../system.v \
17 ../Terminal.v \
18 ../Writeback.v
19VLOGS_ALL = $(VLOGS) ram.hex ibmpc1.mem scancodes.unshifted.hex scancodes.shifted.hex
8744c23d
JW
20
21all: fpga_target
22
23BITGEN_OPTS = \
24 -w \
25 -g DebugBitstream:No \
26 -g Binary:no \
27 -g CRC:Enable \
28 -g ProgPin:PullUp \
29 -g DonePin:PullUp \
30 -g TckPin:PullUp \
31 -g TdiPin:PullUp \
32 -g TdoPin:PullUp \
33 -g TmsPin:PullUp \
34 -g UnusedPin:PullDown \
35 -g UserID:0xFFFFFFFF \
36 -g StartUpClk:CClk \
37 -g DONE_cycle:4 \
38 -g GTS_cycle:5 \
39 -g GWE_cycle:6 \
40 -g Security:None \
41 -g DonePipe:No \
42 -g Match_cycle:2 \
43 -g DriveDone:No
44
1e7ff543 45fpga_target: $(TARGET).svf
8744c23d
JW
46
47$(TARGET).ngc: $(TARGET).xst $(VLOGS_ALL)
48 @mkdir -p xst/projnav.tmp
49 @echo work > $(TARGET).lso
50 @rm -f $(TARGET).prj
51 @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
52 xst -ifn $(TARGET).xst -ofn $(TARGET).syr
53
54# for post-synth simulation
55$(TARGET)-bare.ngc: $(TARGET)-bare.xst $(VLOGS_ALL)
56 @mkdir -p xst/projnav.tmp
57 @echo work > $(TARGET).lso
58 @rm -f $(TARGET).prj
59 @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
60 xst -ifn $(TARGET)-bare.xst -ofn $(TARGET)-bare.syr
61
62
63# for synth mismatch diagnostics
64$(TARGET)-memory.ngc: $(TARGET)-memory.xst $(VLOGS_ALL)
65 @mkdir -p xst/projnav.tmp
66 @echo work > $(TARGET).lso
67 @rm -f $(TARGET).prj
68 @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
69 xst -ifn $(TARGET)-memory.xst -ofn $(TARGET)-memory.syr
70
71sim/%.v: %.ngc
72 netgen -ofmt verilog -w -dir sim $<
73
74$(TARGET).ngd: $(TARGET).ngc $(TARGET).ucf
1e7ff543 75 ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p xc3s1200e-fg320-5 "$(TARGET).ngc" $(TARGET).ngd
8744c23d
JW
76
77$(TARGET)_map.ncd: $(TARGET).ngd
1e7ff543 78 map -w -p xc3s1200e-fg320-5 -cm area -pr off -k 4 -c 100 -o $(TARGET)_map.ncd $(TARGET).ngd $(TARGET).pcf
8744c23d
JW
79
80$(TARGET).ncd: $(TARGET)_map.ncd
81 par -w -ol std -t 1 $(TARGET)_map.ncd $(TARGET).ncd $(TARGET).pcf
82
83$(TARGET).twr: $(TARGET)_map.ncd
84 trce -e 3 -s 5 -xml $(TARGET) $(TARGET).ncd -o $(TARGET).twr $(TARGET).pcf -ucf $(TARGET).ucf
85
86$(TARGET).bit: $(TARGET).ncd
87 bitgen $(BITGEN_OPTS) $(TARGET).ncd
88
89$(TARGET).svf: $(TARGET).bit impact.cmd
90 sed -e s/XXX/$(subst .bit,,$<)/ < impact.cmd > tmp.cmd
91 impact -batch tmp.cmd
92
93clean:
94 rm -f $(TARGET).bgn $(TARGET).ngc $(TARGET).svf $(TARGET).ngd $(TARGET).bit $(TARGET).twr $(TARGET).ncd $(TARGET)_map.ncd $(TARGET)_map.*
95 rm -f $(TARGET).bld $(TARGET).drc $(TARGET)_ngdbuild.xrpt $(TARGET)_pad.* $(TARGET).pad $(TARGET).par $(TARGET)_par.xrpt $(TARGET).ngr
96 rm -f $(TARGET).pcf $(TARGET)_summary.xml $(TARGET).unroutes $(TARGET)_usage.xml $(TARGET)_xst.xrpt $(TARGET).syr $(TARGET).ptwx $(TARGET).xpi
97 rm -rf xst
98 rm -rf xlnx_auto_*
99 rm -rf _ngo
100 rm -f tmp.cmd
101 rm -f _impactbatch.log
102 rm -f $(TARGET).prj
103 rm -f $(TARGET).lso
104
This page took 0.024965 seconds and 4 git commands to generate.