2 VLOGS = Console.nexys2.v \
19 VLOGS_ALL = $(VLOGS) ram.hex ibmpc1.mem scancodes.unshifted.hex scancodes.shifted.hex
25 -g DebugBitstream:No \
34 -g UnusedPin:PullDown \
35 -g UserID:0xFFFFFFFF \
45 fpga_target: $(TARGET).svf
47 $(TARGET).ngc: $(TARGET).xst $(VLOGS_ALL)
48 @mkdir -p xst/projnav.tmp
49 @echo work > $(TARGET).lso
51 @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
52 xst -ifn $(TARGET).xst -ofn $(TARGET).syr
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
59 @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
60 xst -ifn $(TARGET)-bare.xst -ofn $(TARGET)-bare.syr
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
68 @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
69 xst -ifn $(TARGET)-memory.xst -ofn $(TARGET)-memory.syr
72 netgen -ofmt verilog -w -dir sim $<
74 $(TARGET).ngd: $(TARGET).ngc $(TARGET).ucf
75 ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p xc3s1200e-fg320-5 "$(TARGET).ngc" $(TARGET).ngd
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
80 $(TARGET).ncd: $(TARGET)_map.ncd
81 par -w -ol std -t 1 $(TARGET)_map.ncd $(TARGET).ncd $(TARGET).pcf
83 $(TARGET).twr: $(TARGET)_map.ncd
84 trce -e 3 -s 5 -xml $(TARGET) $(TARGET).ncd -o $(TARGET).twr $(TARGET).pcf -ucf $(TARGET).ucf
86 $(TARGET).bit: $(TARGET).ncd
87 bitgen $(BITGEN_OPTS) $(TARGET).ncd
89 $(TARGET).svf: $(TARGET).bit impact.cmd
90 sed -e s/XXX/$(subst .bit,,$<)/ < impact.cmd > tmp.cmd
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
101 rm -f _impactbatch.log