]>
Commit | Line | Data |
---|---|---|
95764a11 | 1 | PWD := $(shell pwd) |
2 | ||
89972609 | 3 | PROJECT := raggedstone |
4 | ||
f8d46fe4 | 5 | INTSTYLE := silent |
95764a11 | 6 | |
89972609 | 7 | SOURCES = $(wildcard sources/*.v source/*.vhd) |
95764a11 | 8 | |
89972609 | 9 | all: $(PROJECT).bit final |
95764a11 | 10 | |
11 | log: | |
12 | time make all &>build.log | |
13 | ||
14 | xst: $(PROJECT).ngc | |
15 | ||
f8d46fe4 | 16 | ngdbuild: $(PROJECT).ngd |
95764a11 | 17 | |
89972609 | 18 | $(PROJECT).ngc: $(SOURCES) |
95764a11 | 19 | @# echo synclib > $(PROJECT).lso # hmm. things are different in ise 9.1 |
20 | echo work > $(PROJECT).lso | |
f8d46fe4 | 21 | xst -intstyle $(INTSTYLE) -ifn $(PROJECT).xst -ofn $(PROJECT).syr |
22 | @#cat $(PROJECT).syr | |
95764a11 | 23 | |
f8d46fe4 | 24 | $(PROJECT).ngd: $(PROJECT).ngc |
25 | ngdbuild -intstyle $(INTSTYLE) -dd "$(PWD)/_ngo" -nt timestamp -uc $(PROJECT).ucf -p xc3s1500-fg456-4 $(PROJECT).ngc $(PROJECT).ngd | |
95764a11 | 26 | |
89972609 | 27 | $(PROJECT)_map.ngm $(PROJECT).pcf: $(PROJECT).ngd |
f8d46fe4 | 28 | map -intstyle $(INTSTYLE) -p xc3s1500-fg456-4 -cm area -pr b -k 4 -c 100 -o $(PROJECT)_map.ncd $(PROJECT).ngd $(PROJECT).pcf |
95764a11 | 29 | |
89972609 | 30 | $(PROJECT).ncd: $(PROJECT)_map.ngm $(PROJECT).pcf |
f8d46fe4 | 31 | @#par -w -intstyle $(INTSTYLE) -ol std -n 4 -t 1 $(PROJECT)_map.ncd $(PROJECT).dir $(PROJECT).pcf |
32 | par -w -intstyle $(INTSTYLE) -ol std -t 1 $(PROJECT)_map.ncd $(PROJECT).ncd $(PROJECT).pcf | |
95764a11 | 33 | |
89972609 | 34 | $(PROJECT).twx: $(PROJECT).ncd |
f8d46fe4 | 35 | trce -intstyle $(INTSTYLE) -e 3 -l 3 -s 4 -xml $(PROJECT) $(PROJECT).ncd -o $(PROJECT).twr $(PROJECT).pcf |
36 | @#cat $(PROJECT).twr | |
95764a11 | 37 | |
89972609 | 38 | $(PROJECT).bit: $(PROJECT).ncd |
f8d46fe4 | 39 | bitgen -intstyle $(INTSTYLE) -f $(PROJECT).ut $(PROJECT).ncd |
40 | @# cp $(PROJECT).bit ../jcarr_last.bit | |
41 | @#cat $(PROJECT).drc | |
42 | @#cat $(PROJECT).bgn | |
95764a11 | 43 | |
44 | mcs: | |
f8d46fe4 | 45 | promgen -intstyle $(INTSTYLE) -w -p mcs -u 0 $(PROJECT) -o pci1 pci2 -x xcf02s xcf04s |
95764a11 | 46 | |
47 | final: | |
f8d46fe4 | 48 | -@grep -A 8 -B 1 ^Selected\ Device $(PROJECT).syr |
49 | -@grep -A 8 -B 1 ^Timing\ Summary $(PROJECT).syr | |
50 | -@grep -A 21 -B 1 ^Design\ Summary $(PROJECT)_map.map | |
95764a11 | 51 | |
52 | burn: | |
53 | xc3sprog $(PROJECT).bit | |
54 | ||
f8d46fe4 | 55 | load: |
56 | impact -batch xc3s1500.batch | |
57 | ||
58 | flash: mcs | |
59 | impact -batch xcf.batch | |
60 | ||
95764a11 | 61 | clean: |
55279288 | 62 | @rm -rf *.bit *.bgn *.mcs *.prm *.bld *.drc *.mcs *.ncd *.ngc *.ngd \ |
63 | *.ngr *.pad *.par *.pcf *.prm *.syr *.twr *.twx *.xpi *.lso *.prm *.mcs _impact* \ | |
64 | $(PROJECT)_map.* $(PROJECT)_pad.* \ | |
65 | _ngo xst \ | |
66 | build.log \ | |
67 | $(PROJECT).unroutes *.xml |