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