18 VLOGS_ALL = $(VLOGS) ram.hex ibmpc1.mem scancodes.unshifted.hex scancodes.shifted.hex
 
  24         -g DebugBitstream:No \
 
  33         -g UnusedPin:PullDown \
 
  34         -g UserID:0xFFFFFFFF \
 
  44 fpga_target: $(TARGET).bit
 
  46 $(TARGET).ngc: $(TARGET).xst $(VLOGS_ALL)
 
  47         @mkdir -p xst/projnav.tmp
 
  48         @echo work > $(TARGET).lso
 
  50         @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
 
  51         xst -ifn $(TARGET).xst -ofn $(TARGET).syr
 
  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
 
  58         @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
 
  59         xst -ifn $(TARGET)-bare.xst -ofn $(TARGET)-bare.syr
 
  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
 
  67         @for i in $(VLOGS); do echo verilog work '"'$$i'"' >> $(TARGET).prj; done
 
  68         xst -ifn $(TARGET)-memory.xst -ofn $(TARGET)-memory.syr
 
  71         netgen -ofmt verilog -w -dir sim $<
 
  73 $(TARGET).ngd: $(TARGET).ngc $(TARGET).ucf
 
  74         ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p xc5vlx110t-ff1136-1 "$(TARGET).ngc" $(TARGET).ngd
 
  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
 
  79 $(TARGET).ncd: $(TARGET)_map.ncd
 
  80         par -w -ol std -t 1 $(TARGET)_map.ncd $(TARGET).ncd $(TARGET).pcf
 
  82 $(TARGET).twr: $(TARGET)_map.ncd
 
  83         trce -e 3 -s 5 -xml $(TARGET) $(TARGET).ncd -o $(TARGET).twr $(TARGET).pcf -ucf $(TARGET).ucf
 
  85 $(TARGET).bit: $(TARGET).ncd
 
  86         bitgen $(BITGEN_OPTS) $(TARGET).ncd
 
  88 $(TARGET).svf: $(TARGET).bit impact.cmd
 
  89         sed -e s/XXX/$(subst .bit,,$<)/ < impact.cmd > tmp.cmd
 
  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
 
 100         rm -f _impactbatch.log