TARGET = POSLink
VLOGS = POSLink.v
VLOGS_ALL = $(VLOGS)
+CHIP = xc9572xl-7-vq44
all: fpga_target
-scancodes.unshifted.hex: scancodes.txt
- cut -f3 -d, scancodes.txt > scancodes.unshifted.hex
-
-scancodes.shifted.hex: scancodes.txt
- cut -f4 -d, scancodes.txt > scancodes.shifted.hex
-
BITGEN_OPTS = \
-w \
-g DebugBitstream:No \
-g DonePipe:No \
-g DriveDone:No
-fpga_target: $(TARGET).svf
+fpga_target: $(TARGET).jed
$(TARGET).ngc: $(TARGET).xst $(VLOGS_ALL)
@mkdir -p xst/projnav.tmp
xst -ifn $(TARGET).xst -ofn $(TARGET).syr
$(TARGET).ngd: $(TARGET).ngc $(TARGET).ucf
- ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p xc3s1200e-fg320-5 "$(TARGET).ngc" $(TARGET).ngd
+ ngdbuild -dd _ngo -uc $(TARGET).ucf -nt timestamp -p $(CHIP) "$(TARGET).ngc" $(TARGET).ngd
+
+$(TARGET).vm6: $(TARGET).ngd
+ cpldfit -p $(CHIP) -power std $(TARGET).ngd -inputs 10
+
+$(TARGET).jed: $(TARGET).vm6
+ hprep6 -i $(TARGET).vm6
$(TARGET)_map.ncd: $(TARGET).ngd
- map -p xc3s1200e-fg320-5 -cm area -pr off -k 4 -c 100 -o $(TARGET)_map.ncd $(TARGET).ngd $(TARGET).pcf
+ map -p $(CHIP) -cm area -pr off -k 4 -c 100 -o $(TARGET)_map.ncd $(TARGET).ngd $(TARGET).pcf
$(TARGET).ncd: $(TARGET)_map.ncd
par -w -ol std -t 1 $(TARGET)_map.ncd $(TARGET).ncd $(TARGET).pcf