1 #################################################################
\r
2 # Makefile generated by Xilinx Platform Studio
\r
3 # Project:C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\PPC440_Xilinx_Virtex5_GCC\system.xmp
\r
5 # WARNING : This file will be re-generated every time a command
\r
6 # to run a make target is invoked. So, any changes made to this
\r
7 # file manually, will be lost when make is invoked next.
\r
8 #################################################################
\r
10 # Name of the Microprocessor system
\r
11 # The hardware specification of the system is in file :
\r
12 # C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\PPC440_Xilinx_Virtex5_GCC\system.mhs
\r
13 # The software specification of the system is in file :
\r
14 # C:\E\Dev\FreeRTOS\WorkingCopy3\Demo\PPC440_Xilinx_Virtex5_GCC\system.mss
\r
16 include system_incl.make
\r
18 #################################################################
\r
20 #################################################################
\r
22 .PHONY: netlistclean
\r
27 #################################################################
\r
29 #################################################################
\r
31 @echo "Makefile to build a Microprocessor system :"
\r
32 @echo "Run make with any of the following targets"
\r
34 @echo " netlist : Generates the netlist for the given MHS "
\r
35 @echo " bits : Runs Implementation tools to generate the bitstream"
\r
36 @echo " exporttosdk: Export files to SDK"
\r
38 @echo " libs : Configures the sw libraries for this system"
\r
39 @echo " program : Compiles the program sources for all the processor instances"
\r
41 @echo " init_bram: Initializes bitstream with BRAM data"
\r
42 @echo " ace : Generate ace file from bitstream and elf"
\r
43 @echo " download : Downloads the bitstream onto the board"
\r
45 @echo " sim : Generates HDL simulation models and runs simulator for chosen simulation mode"
\r
46 @echo " simmodel : Generates HDL simulation models for chosen simulation mode"
\r
47 @echo " behavioral_model : Generates behavioral HDL models with BRAM initialization"
\r
48 @echo " structural_model : Generates structural simulation HDL models with BRAM initialization"
\r
49 @echo " timing : Generates timing simulation HDL models with BRAM initialization"
\r
51 @echo " netlistclean: Deletes netlist"
\r
52 @echo " bitsclean: Deletes bit, ncd, bmm files"
\r
53 @echo " hwclean : Deletes implementation dir"
\r
54 @echo " libsclean: Deletes sw libraries"
\r
55 @echo " programclean: Deletes compiled ELF files"
\r
56 @echo " swclean : Deletes sw libraries and ELF files"
\r
57 @echo " simclean : Deletes simulation dir"
\r
58 @echo " clean : Deletes all generated files/directories"
\r
60 @echo " make <target> : (Default)"
\r
61 @echo " Creates a Microprocessor system using default initializations"
\r
62 @echo " specified for each processor in MSS file"
\r
69 exporttosdk: $(SYSTEM_HW_HANDOFF_DEP)
\r
71 netlist: $(POSTSYN_NETLIST)
\r
75 program: $(ALL_USER_ELF_FILES)
\r
77 download: $(DOWNLOAD_BIT) dummy
\r
78 @echo "*********************************************"
\r
79 @echo "Downloading Bitstream onto the target board"
\r
80 @echo "*********************************************"
\r
81 impact -batch etc/download.cmd
\r
83 init_bram: $(DOWNLOAD_BIT)
\r
85 sim: $(DEFAULT_SIM_SCRIPT)
\r
86 cd simulation/behavioral; \
\r
89 simmodel: $(DEFAULT_SIM_SCRIPT)
\r
91 behavioral_model: $(BEHAVIORAL_SIM_SCRIPT)
\r
93 structural_model: $(STRUCTURAL_SIM_SCRIPT)
\r
95 clean: hwclean libsclean programclean simclean
\r
98 hwclean: netlistclean bitsclean
\r
99 rm -rf implementation synthesis xst hdl
\r
100 rm -rf xst.srp $(SYSTEM).srp
\r
101 rm -f __xps/ise/_xmsgs/bitinit.xmsgs
\r
104 rm -f $(POSTSYN_NETLIST)
\r
106 rm -f __xps/ise/_xmsgs/platgen.xmsgs
\r
110 rm -f $(SYSTEM_BIT)
\r
111 rm -f implementation/$(SYSTEM).ncd
\r
112 rm -f implementation/$(SYSTEM)_bd.bmm
\r
113 rm -f implementation/$(SYSTEM)_map.ncd
\r
114 rm -f __xps/$(SYSTEM)_routed
\r
117 rm -rf simulation/behavioral
\r
119 rm -f __xps/ise/_xmsgs/simgen.xmsgs
\r
121 swclean: libsclean programclean
\r
124 libsclean: $(LIBSCLEAN_TARGETS)
\r
126 rm -f __xps/ise/_xmsgs/libgen.xmsgs
\r
128 programclean: $(PROGRAMCLEAN_TARGETS)
\r
130 #################################################################
\r
131 # SOFTWARE PLATFORM FLOW
\r
132 #################################################################
\r
135 $(LIBRARIES): $(MHSFILE) $(MSSFILE) __xps/libgen.opt
\r
136 @echo "*********************************************"
\r
137 @echo "Creating software libraries..."
\r
138 @echo "*********************************************"
\r
139 libgen $(LIBGEN_OPTIONS) $(MSSFILE)
\r
142 ppc440_0_libsclean:
\r
145 #################################################################
\r
146 # SOFTWARE APPLICATION RTOSDEMO
\r
147 #################################################################
\r
149 RTOSDemo_program: $(RTOSDEMO_OUTPUT)
\r
151 $(RTOSDEMO_OUTPUT) : $(RTOSDEMO_SOURCES) $(RTOSDEMO_HEADERS) $(RTOSDEMO_LINKER_SCRIPT) \
\r
152 $(LIBRARIES) __xps/rtosdemo_compiler.opt
\r
153 @mkdir -p $(RTOSDEMO_OUTPUT_DIR)
\r
154 $(RTOSDEMO_CC) $(RTOSDEMO_CC_OPT) $(RTOSDEMO_SOURCES) -o $(RTOSDEMO_OUTPUT) \
\r
155 $(RTOSDEMO_OTHER_CC_FLAGS) $(RTOSDEMO_INCLUDES) $(RTOSDEMO_LIBPATH) \
\r
156 $(RTOSDEMO_CFLAGS) $(RTOSDEMO_LFLAGS)
\r
157 $(RTOSDEMO_CC_SIZE) $(RTOSDEMO_OUTPUT)
\r
160 RTOSDemo_programclean:
\r
161 rm -f $(RTOSDEMO_OUTPUT)
\r
163 #################################################################
\r
164 # BOOTLOOP ELF FILES
\r
165 #################################################################
\r
169 $(PPC440_0_BOOTLOOP): $(PPC440_BOOTLOOP)
\r
170 @mkdir -p $(BOOTLOOP_DIR)
\r
171 cp -f $(PPC440_BOOTLOOP) $(PPC440_0_BOOTLOOP)
\r
173 #################################################################
\r
174 # HARDWARE IMPLEMENTATION FLOW
\r
175 #################################################################
\r
179 $(WRAPPER_NGC_FILES): $(MHSFILE) __xps/platgen.opt \
\r
180 $(CORE_STATE_DEVELOPMENT_FILES)
\r
181 @echo "****************************************************"
\r
182 @echo "Creating system netlist for hardware specification.."
\r
183 @echo "****************************************************"
\r
184 platgen $(PLATGEN_OPTIONS) $(MHSFILE)
\r
186 $(POSTSYN_NETLIST): $(WRAPPER_NGC_FILES)
\r
187 @echo "Running synthesis..."
\r
188 bash -c "cd synthesis; ./synthesis.sh"
\r
190 __xps/$(SYSTEM)_routed: $(FPGA_IMP_DEPENDENCY)
\r
191 @echo "*********************************************"
\r
192 @echo "Running Xilinx Implementation tools.."
\r
193 @echo "*********************************************"
\r
194 @cp -f $(UCF_FILE) implementation/$(SYSTEM).ucf
\r
195 @cp -f etc/fast_runtime.opt implementation/xflow.opt
\r
196 xflow -wd implementation -p $(DEVICE) -implement xflow.opt -ise ../__xps/ise/$(SYSTEM).ise $(SYSTEM).ngc
\r
197 touch __xps/$(SYSTEM)_routed
\r
199 $(SYSTEM_BIT): __xps/$(SYSTEM)_routed $(BITGEN_UT_FILE)
\r
200 xilperl $(NON_CYG_XILINX_EDK_DIR)/data/fpga_impl/observe_par.pl $(OBSERVE_PAR_OPTIONS) implementation/$(SYSTEM).par
\r
201 @echo "*********************************************"
\r
202 @echo "Running Bitgen.."
\r
203 @echo "*********************************************"
\r
204 @cp -f $(BITGEN_UT_FILE) implementation/bitgen.ut
\r
205 cd implementation; bitgen -w -f bitgen.ut $(SYSTEM); cd ..
\r
207 $(DOWNLOAD_BIT): $(SYSTEM_BIT) $(BRAMINIT_ELF_FILES) __xps/bitinit.opt
\r
208 @cp -f implementation/$(SYSTEM)_bd.bmm .
\r
209 @echo "*********************************************"
\r
210 @echo "Initializing BRAM contents of the bitstream"
\r
211 @echo "*********************************************"
\r
212 bitinit -p $(DEVICE) $(MHSFILE) $(SEARCHPATHOPT) $(BRAMINIT_ELF_FILE_ARGS) \
\r
213 -bt $(SYSTEM_BIT) -o $(DOWNLOAD_BIT)
\r
214 @rm -f $(SYSTEM)_bd.bmm
\r
216 $(SYSTEM_ACE): $(DOWNLOAD_BIT) $(RTOSDEMO_OUTPUT)
\r
217 @echo "*********************************************"
\r
218 @echo "Creating system ace file"
\r
219 @echo "*********************************************"
\r
220 xmd -tcl genace.tcl -jprog -hw $(DOWNLOAD_BIT) -elf $(RTOSDEMO_OUTPUT) -target ppc_hw -ace $(SYSTEM_ACE)
\r
222 #################################################################
\r
223 # EXPORT_TO_SDK FLOW
\r
224 #################################################################
\r
227 $(SYSTEM_HW_HANDOFF): $(MHSFILE) __xps/platgen.opt
\r
228 mkdir -p $(SDK_EXPORT_DIR)
\r
229 psf2Edward.exe -inp $(SYSTEM).xmp -xml $(SDK_EXPORT_DIR)/$(SYSTEM).xml $(SEARCHPATHOPT)
\r
230 xdsgen.exe -inp $(SYSTEM).xmp -report $(SDK_EXPORT_DIR)/$(SYSTEM).html $(SEARCHPATHOPT) -make_docs_local
\r
232 $(SYSTEM_HW_HANDOFF_BIT): $(SYSTEM_BIT)
\r
233 @rm -rf $(SYSTEM_HW_HANDOFF_BIT)
\r
234 @cp -f $(SYSTEM_BIT) $(SDK_EXPORT_DIR)/
\r
236 $(SYSTEM_HW_HANDOFF_BMM): implementation/$(SYSTEM)_bd.bmm
\r
237 @rm -rf $(SYSTEM_HW_HANDOFF_BMM)
\r
238 @cp -f implementation/$(SYSTEM)_bd.bmm $(SDK_EXPORT_DIR)/
\r
240 #################################################################
\r
242 #################################################################
\r
245 ################## BEHAVIORAL SIMULATION ##################
\r
247 $(BEHAVIORAL_SIM_SCRIPT): $(MHSFILE) __xps/simgen.opt \
\r
248 $(BRAMINIT_ELF_FILES)
\r
249 @echo "*********************************************"
\r
250 @echo "Creating behavioral simulation models..."
\r
251 @echo "*********************************************"
\r
252 simgen $(SIMGEN_OPTIONS) -m behavioral $(MHSFILE)
\r
254 ################## STRUCTURAL SIMULATION ##################
\r
256 $(STRUCTURAL_SIM_SCRIPT): $(WRAPPER_NGC_FILES) __xps/simgen.opt \
\r
257 $(BRAMINIT_ELF_FILES)
\r
258 @echo "*********************************************"
\r
259 @echo "Creating structural simulation models..."
\r
260 @echo "*********************************************"
\r
261 simgen $(SIMGEN_OPTIONS) -sd implementation -m structural $(MHSFILE)
\r
264 ################## TIMING SIMULATION ##################
\r
266 implementation/$(SYSTEM).ncd: __xps/$(SYSTEM)_routed
\r
268 $(TIMING_SIM_SCRIPT): implementation/$(SYSTEM).ncd __xps/simgen.opt \
\r
269 $(BRAMINIT_ELF_FILES)
\r
270 @echo "*********************************************"
\r
271 @echo "Creating timing simulation models..."
\r
272 @echo "*********************************************"
\r
273 simgen $(SIMGEN_OPTIONS) -sd implementation -m timing $(MHSFILE)
\r