1 # TOP - Name of the top-level module
2 # DEVICE - Name of the FPGA device (device-package-speed)
3 # PRJ - Name of .prj file with names of all source files. See XST manual.
4 # BMM - If design contains initialized memories, softcore MCU, etc., this
5 # file describes mapping of .elf file to these memories. Only one
6 # .bmm file can be used.
7 # ELF - File containing initialization data of memories described by
8 # previously defined .bmm file. Format can be .elf or .mem.
9 # SEARCH_DIRS - Directories to search when searching for netlists (.ngc, ...).
10 # See NGDBUILD manual.
11 # JTAG_POS - Position of device in JTAG chain. Used when downloading bit stream.
12 # INTSTYLE - Style of screen output. (ise | xflow | silent)
16 DEVICE = xc2v1000-fg456
18 PRJ = openMSP430_fpga.prj
21 ELF = software/leds.elf
29 ifneq (${strip ${BMM}},)
30 BITFILE = ${TOP}_rp.bit
35 #===============================================================================
37 .PHONY: all synth ngdbuild map implement download clean
43 #===============================================================================
45 synth ${TOP}.ngc: ${PRJ}
48 ${addprefix -ifn ,${PRJ}} \
59 ngdbuild ${TOP}.ngd: ${TOP}.ngc ${BMM} ${TOP}.ucf
61 ${addprefix -bm ,${BMM}} \
62 -intstyle ${INTSTYLE} \
65 ${addprefix -sd ,${SEARCH_DIRS}} \
70 map ${TOP}.ncd: ${TOP}.ngd
73 -intstyle ${INTSTYLE} \
78 -intstyle ${INTSTYLE} \
83 ${TOP}.bit: ${TOP}.ncd
84 bitgen -w ${TOP}.ncd ${TOP}.bit ${TOP}.pcf
86 ${TOP}_rp.bit: ${TOP}.bit ${ELF}
87 data2mem -bm ${basename ${BMM}}_bd.bmm -bd ${ELF} -bt ${TOP}.bit -o b ${TOP}_rp.bit
93 setCable -port auto \n\
95 assignFile -p ${JTAG_POS} -file ${BITFILE} \n\
96 program -p ${JTAG_POS} \n\
99 #===============================================================================
102 rm -f _impactbatch.log
103 rm -f ${basename ${BMM}}_bd.bmm
123 rm -f ${TOP}_summary.xml
124 rm -f ${TOP}.unroutes
125 rm -f ${TOP}_usage.xml
129 #===============================================================================
133 -e 's/[ \t][ \t]*/ /g' \
134 -e 's/^ //' -e 's/ $$//' \
135 -e 's|\(.*\) \(.*\) \(.*\)|$<: \3|' \
141 include ${PRJ:.prj=.d}