]> git.zerfleddert.de Git - raggedstone/blob - heartbeat/Makefile
powercore
[raggedstone] / heartbeat / Makefile
1 PWD := $(shell pwd)
2
3 XST := $(shell which xst)
4
5 TMP = tmp/
6 $(shell mkdir tmp)
7
8 PROJECT := pci_7seg
9
10 all: xst ngdbuild map par trace prom mcs final
11
12 log:
13 time make all &>build.log
14
15 xst: $(PROJECT).ngc
16
17 ngdbuild: $(PROJECT).ngc $(PROJECT).ngd
18
19 $(PROJECT).ngc:
20 @# echo synclib > $(PROJECT).lso # hmm. things are different in ise 9.1
21 echo work > $(PROJECT).lso
22 xst -intstyle ise -ifn $(PROJECT).xst -ofn $(PROJECT).syr &> tmp/build.xst.log
23 #cat $(PROJECT).syr
24 mv $(PROJECT).syr $(TMP)
25 mv $(PROJECT).ngr $(PROJECT).lso $(TMP)
26 mv xst $(TMP)
27
28 $(PROJECT).ngd:
29 ngdbuild -intstyle ise -dd "$(PWD)/_ngo" -nt timestamp -uc $(PROJECT).ucf -p xc3s1500-fg456-4 $(PROJECT).ngc $(PROJECT).ngd &> tmp/build.ngdbuild.log
30 mv $(PROJECT).bld $(TMP)
31 mv _ngo $(TMP)
32
33 map:
34 map -intstyle ise -p xc3s1500-fg456-4 -cm area -pr b -k 4 -c 100 -o $(PROJECT)_map.ncd $(PROJECT).ngd $(PROJECT).pcf &> tmp/build.map.log
35 mv $(PROJECT)_map.mrp $(PROJECT)_map.ngm $(PROJECT).ngc $(TMP)
36
37 par:
38 @#par -w -intstyle ise -ol std -n 4 -t 1 $(PROJECT)_map.ncd $(PROJECT).dir $(PROJECT).pcf &> tmp/build.par.log
39 par -w -intstyle ise -ol std -t 1 $(PROJECT)_map.ncd $(PROJECT).ncd $(PROJECT).pcf &> tmp/build.par.log
40 mv $(PROJECT).xpi $(PROJECT).par $(PROJECT).pad $(TMP)
41 mv $(PROJECT)_pad.csv $(PROJECT)_pad.txt $(TMP)
42
43 trace:
44 trce -intstyle ise -e 3 -l 3 -s 4 -xml $(PROJECT) $(PROJECT).ncd -o $(PROJECT).twr $(PROJECT).pcf &> tmp/build.trce.log
45 #cat $(PROJECT).twr
46 mv $(PROJECT).twr $(TMP)
47 mv $(PROJECT).twx $(TMP)
48 mv $(PROJECT)_map.ncd $(PROJECT).ngd $(PROJECT).pcf $(TMP)
49
50 prom:
51 bitgen -intstyle ise -f $(PROJECT).ut $(PROJECT).ncd &> tmp/build.bitgen.log
52 # cp $(PROJECT).bit ../jcarr_last.bit
53 #cat $(PROJECT).drc
54 mv $(PROJECT).drc $(TMP)
55 #cat $(PROJECT).bgn
56 mv $(PROJECT).bgn $(TMP)
57
58 mcs:
59 promgen -p mcs -u 0 $(PROJECT) -o pci1 pci2 -x xcf02s xcf04s
60
61 final:
62 -mv $(PROJECT).unroutes *.xml $(TMP)
63 -mv $(PROJECT)*.map $(TMP)
64 -mv $(PROJECT).ncd $(TMP)
65 -grep -A 8 -B 1 ^Selected\ Device tmp/build.xst.log
66 -grep -A 8 -B 1 ^Timing\ Summary tmp/build.xst.log
67 -grep -A 21 -B 1 ^Design\ Summary tmp/build.map.log
68
69 burn:
70 xc3sprog $(PROJECT).bit
71
72 clean:
73 rm -rf $(TMP)
74 rm -rf *.bit *.bgn *.mcs *.prm *.bld *.drc *.mcs *.ncd *.ngc *.ngd
75 rm -rf *.ngr *.pad *.par *.pcf *.prm *.syr *.twr *.twx *.xpi *.lso *.prm *.mcs
76 rm -rf $(PROJECT)_map.* $(PROJECT)_pad.*
77 rm -rf _ngo xst
78 rm -rf build.log
79 rm -rf $(PROJECT).unroutes *.xml
Impressum, Datenschutz