]>
Commit | Line | Data |
---|---|---|
1 | TARGET = FireARM | |
2 | VLOGS = Console.nexys2.v \ | |
3 | ../ARM_Constants.v \ | |
4 | ../BigBlockRAM.v \ | |
5 | ../BlockRAM.v \ | |
6 | ../CellularRAM.v \ | |
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 | |
19 | VLOGS_ALL = $(VLOGS) ram.hex ibmpc1.mem scancodes.unshifted.hex scancodes.shifted.hex | |
20 | ||
21 | all: fpga_target | |
22 | ||
23 | BITGEN_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 | ||
45 | fpga_target: $(TARGET).svf | |
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 | ||
71 | sim/%.v: %.ngc | |
72 | netgen -ofmt verilog -w -dir sim $< | |
73 | ||
74 | $(TARGET).ngd: $(TARGET).ngc $(TARGET).ucf | |
75 | ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p xc3s1200e-fg320-5 "$(TARGET).ngc" $(TARGET).ngd | |
76 | ||
77 | $(TARGET)_map.ncd: $(TARGET).ngd | |
78 | map -w -p xc3s1200e-fg320-5 -cm area -pr off -k 4 -c 100 -o $(TARGET)_map.ncd $(TARGET).ngd $(TARGET).pcf | |
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 | ||
93 | clean: | |
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 |