OpenCores
URL https://opencores.org/ocsvn/mb-jpeg/mb-jpeg/trunk

Subversion Repositories mb-jpeg

[/] [mb-jpeg/] [tags/] [STEP1_1/] [system.make] - Blame information for rev 66

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 quickwayne
#################################################################
2
# Makefile generated by Xilinx Platform Studio
3
# Project:D:\mb-jpeg\system.xmp
4
#################################################################
5
 
6
# Name of the Microprocessor system
7
# The hardware specification of the system is in file :
8
# D:\mb-jpeg\system.mhs
9
# The software specification of the system is in file :
10
# D:\mb-jpeg\system.mss
11
 
12
include system_incl.make
13
 
14
 
15
#################################################################
16
# EXTERNAL TARGETS
17
#################################################################
18
all:
19
        @echo "Makefile to build a Microprocessor system :"
20
        @echo "Run make with any of the following targets"
21
        @echo " "
22
        @echo "  netlist  : Generates the netlist for the given MHS "
23
        @echo "  bits     : Runs Implementation tools to generate the bitstream"
24
        @echo "  exporttopn:Export to ProjNav"
25
        @echo " "
26
        @echo "  libs     : Configures the sw libraries for this system"
27
        @echo "  program  : Compiles the program sources for all the processor instances"
28
        @echo " "
29
        @echo "  init_bram: Initializes bitstream with BRAM data"
30
        @echo "  ace      : Generate ace file from bitstream and elf"
31
        @echo "  download : Downloads the bitstream onto the board"
32
        @echo " "
33
        @echo "  sim      : Generates HDL simulation models and runs simulator for chosen simulation mode"
34
        @echo "  simmodel : Generates HDL simulation models for chosen simulation mode"
35 5 quickwayne
        @echo "  behavioral:Generates behavioral HDL models with BRAM initialization"
36
        @echo "  structural:Generates structural simulation HDL models with BRAM initialization"
37
        @echo "  timing   : Generates timing simulation HDL models with BRAM initialization"
38 4 quickwayne
        @echo "  vp       : Generates virtual platform model"
39
        @echo " "
40
        @echo "  netlistclean: Deletes netlist"
41
        @echo "  bitsclean: Deletes bit, ncd, bmm files"
42
        @echo "  hwclean  : Deletes implementation dir"
43
        @echo "  libsclean: Deletes sw libraries"
44
        @echo "  programclean: Deletes compiled ELF files"
45
        @echo "  swclean  : Deletes sw libraries and ELF files"
46
        @echo "  simclean : Deletes simulation dir"
47
        @echo "  vpclean  : Deletes virtualplatform dir"
48
        @echo "  clean    : Deletes all generated files/directories"
49
        @echo " "
50
        @echo "  make  : (Default)"
51
        @echo "      Creates a Microprocessor system using default initializations"
52
        @echo "      specified for each processor in MSS file"
53
 
54
 
55
bits: $(SYSTEM_BIT)
56
 
57
ace: $(SYSTEM_ACE)
58
 
59
netlist: $(POSTSYN_NETLIST)
60
 
61
libs: $(LIBRARIES)
62
 
63
program: $(ALL_USER_ELF_FILES)
64
 
65
download: $(DOWNLOAD_BIT) dummy
66
        @echo "*********************************************"
67
        @echo "Downloading Bitstream onto the target board"
68
        @echo "*********************************************"
69
        impact -batch etc/download.cmd
70
 
71
init_bram: $(DOWNLOAD_BIT)
72
 
73
sim: $(DEFAULT_SIM_SCRIPT)
74
        cd simulation/behavioral; \
75
        $(SIM_CMD)  &
76
 
77
simmodel: $(DEFAULT_SIM_SCRIPT)
78
 
79
behavioral_model: $(BEHAVIORAL_SIM_SCRIPT)
80
 
81
structural_model: $(STRUCTURAL_SIM_SCRIPT)
82
 
83
vp: $(VPEXEC)
84
 
85
clean: hwclean libsclean programclean simclean vpclean
86
        rm -f _impact.cmd
87
 
88
hwclean: netlistclean bitsclean
89
        rm -rf implementation synthesis xst hdl
90
        rm -rf xst.srp $(SYSTEM).srp
91
 
92
netlistclean:
93
        rm -f $(POSTSYN_NETLIST)
94
        rm -f $(BMM_FILE)
95
 
96
bitsclean:
97
        rm -f $(SYSTEM_BIT)
98
        rm -f implementation/$(SYSTEM).ncd
99
        rm -f implementation/$(SYSTEM)_bd.bmm
100
 
101
bitsclean:
102
 
103
simclean:
104
        rm -rf simulation/behavioral
105
 
106
swclean: libsclean programclean
107
        @echo ""
108
 
109
libsclean: $(LIBSCLEAN_TARGETS)
110
 
111
programclean: $(PROGRAMCLEAN_TARGETS)
112
 
113
vpclean:
114
        rm -rf virtualplatform
115
 
116
#################################################################
117
# SOFTWARE PLATFORM FLOW
118
#################################################################
119
 
120
 
121
$(LIBRARIES): $(MHSFILE) $(MSSFILE) __xps/libgen.opt
122
        @echo "*********************************************"
123
        @echo "Creating software libraries..."
124
        @echo "*********************************************"
125
        libgen $(LIBGEN_OPTIONS) $(MSSFILE)
126
 
127
 
128
microblaze_0_libsclean:
129
        rm -rf microblaze_0/lib/
130
 
131
$(MICROBLAZE_0_XMDSTUB): $(LIBRARIES)
132
 
133
#################################################################
134 12 quickwayne
# SOFTWARE APPLICATION TESTBENCH1
135 4 quickwayne
#################################################################
136
 
137 12 quickwayne
Testbench1_program: $(TESTBENCH1_OUTPUT)
138 4 quickwayne
 
139 12 quickwayne
$(TESTBENCH1_OUTPUT) : $(TESTBENCH1_SOURCES) $(TESTBENCH1_HEADERS) $(TESTBENCH1_LINKER_SCRIPT) \
140
                    $(LIBRARIES) __xps/testbench1_compiler.opt
141
        @mkdir -p $(TESTBENCH1_OUTPUT_DIR)
142
        $(TESTBENCH1_CC) $(TESTBENCH1_CC_OPT) $(TESTBENCH1_SOURCES) -o $(TESTBENCH1_OUTPUT) \
143
        $(TESTBENCH1_OTHER_CC_FLAGS) $(TESTBENCH1_INCLUDES) $(TESTBENCH1_LIBPATH) \
144
        $(TESTBENCH1_CFLAGS) $(TESTBENCH1_LFLAGS)
145
        $(TESTBENCH1_CC_SIZE) $(TESTBENCH1_OUTPUT)
146 4 quickwayne
 
147 12 quickwayne
Testbench1_programclean:
148
        rm -f $(TESTBENCH1_OUTPUT)
149 4 quickwayne
 
150
#################################################################
151
# BOOTLOOP ELF FILES
152
#################################################################
153
 
154
 
155
 
156
$(MICROBLAZE_0_BOOTLOOP): $(MICROBLAZE_BOOTLOOP)
157
        @mkdir -p $(BOOTLOOP_DIR)
158
        cp -f $(MICROBLAZE_BOOTLOOP) $(MICROBLAZE_0_BOOTLOOP)
159
 
160
#################################################################
161
# HARDWARE IMPLEMENTATION FLOW
162
#################################################################
163
 
164
 
165
$(BMM_FILE) \
166
$(WRAPPER_NGC_FILES): $(MHSFILE) __xps/platgen.opt \
167
                      $(CORE_STATE_DEVELOPMENT_FILES)
168
        @echo "****************************************************"
169
        @echo "Creating system netlist for hardware specification.."
170
        @echo "****************************************************"
171
        platgen $(PLATGEN_OPTIONS) -st xst $(MHSFILE)
172
 
173
$(POSTSYN_NETLIST): $(WRAPPER_NGC_FILES)
174
        @echo "Running synthesis..."
175 5 quickwayne
        bash -c "cd synthesis; ./synthesis.sh"
176 4 quickwayne
 
177 5 quickwayne
$(SYSTEM_BIT): $(FPGA_IMP_DEPENDENCY)
178 4 quickwayne
        @echo "*********************************************"
179
        @echo "Running Xilinx Implementation tools.."
180
        @echo "*********************************************"
181 5 quickwayne
        @cp -f $(UCF_FILE) implementation/$(SYSTEM).ucf
182
        @cp -f $(XFLOW_OPT_FILE) implementation/xflow.opt
183
        xflow -wd implementation -p $(DEVICE) -implement xflow.opt $(SYSTEM).ngc
184
        @echo "*********************************************"
185
        @echo "Running Bitgen.."
186
        @echo "*********************************************"
187
        @cp -f $(BITGEN_UT_FILE) implementation/bitgen.ut
188 4 quickwayne
        cd implementation; bitgen -w -f bitgen.ut $(SYSTEM)
189
 
190
exporttopn:
191
        @echo "You have chosen XPS for implementation tool flow."
192
        @echo "Please select ProjNav as your implementation flow in Project Options."
193 5 quickwayne
        @echo "In batch mode, use commad xset pnproj ."
194 4 quickwayne
 
195
$(DOWNLOAD_BIT): $(SYSTEM_BIT) $(BRAMINIT_ELF_FILES) __xps/bitinit.opt
196
        @cp -f implementation/$(SYSTEM)_bd.bmm .
197
        @echo "*********************************************"
198
        @echo "Initializing BRAM contents of the bitstream"
199
        @echo "*********************************************"
200
        bitinit $(MHSFILE) $(SEARCHPATHOPT) $(BRAMINIT_ELF_FILE_ARGS) \
201
        -bt $(SYSTEM_BIT) -o $(DOWNLOAD_BIT)
202
        @rm -f $(SYSTEM)_bd.bmm
203
 
204 12 quickwayne
$(SYSTEM_ACE): $(DOWNLOAD_BIT) $(TESTBENCH1_OUTPUT)
205 4 quickwayne
        @echo "*********************************************"
206
        @echo "Creating system ace file"
207
        @echo "*********************************************"
208 12 quickwayne
        xmd -tcl genace.tcl -jprog -hw $(DOWNLOAD_BIT) -elf $(TESTBENCH1_OUTPUT)  -target mdm  -ace $(SYSTEM_ACE)
209 4 quickwayne
 
210
#################################################################
211
# SIMULATION FLOW
212
#################################################################
213
 
214
 
215
################## BEHAVIORAL SIMULATION ##################
216
 
217
$(BEHAVIORAL_SIM_SCRIPT): $(MHSFILE) __xps/simgen.opt \
218
                          $(BRAMINIT_ELF_FILES)
219
        @echo "*********************************************"
220
        @echo "Creating behavioral simulation models..."
221
        @echo "*********************************************"
222
        simgen $(SIMGEN_OPTIONS) -m behavioral $(MHSFILE)
223
 
224
################## STRUCTURAL SIMULATION ##################
225
 
226
$(STRUCTURAL_SIM_SCRIPT): $(WRAPPER_NGC_FILES) __xps/simgen.opt \
227
                          $(BRAMINIT_ELF_FILES)
228
        @echo "*********************************************"
229
        @echo "Creating structural simulation models..."
230
        @echo "*********************************************"
231
        simgen $(SIMGEN_OPTIONS) -sd implementation -m structural $(MHSFILE)
232
 
233
 
234
################## TIMING SIMULATION ##################
235
 
236
$(TIMING_SIM_SCRIPT): $(SYSTEM_BIT) __xps/simgen.opt \
237
                      $(BRAMINIT_ELF_FILES)
238
        @echo "*********************************************"
239
        @echo "Creating timing simulation models..."
240
        @echo "*********************************************"
241
        simgen $(SIMGEN_OPTIONS) -sd implementation -m timing $(MHSFILE)
242
 
243
#################################################################
244
# VIRTUAL PLATFORM FLOW
245
#################################################################
246
 
247
 
248
$(VPEXEC): $(MHSFILE) __xps/vpgen.opt
249
        @echo "****************************************************"
250
        @echo "Creating virtual platform for hardware specification.."
251
        @echo "****************************************************"
252
        vpgen $(VPGEN_OPTIONS) $(MHSFILE)
253
 
254
dummy:
255
        @echo ""
256
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.