Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/Pmods/PmodAD6/cf_ad7091r_zed/system.make

raw
1 #################################################################
2 # Makefile generated by Xilinx Platform Studio
3 # Project:D:\AD\GitHub\no-OS\Pmods\PmodAD6\cf_ad7091r_zed\system.xmp
4 #
5 # WARNING : This file will be re-generated every time a command
6 # to run a make target is invoked. So, any changes made to this
7 # file manually, will be lost when make is invoked next.
8 #################################################################
9
10 # Name of the Microprocessor system
11 # The hardware specification of the system is in file :
12 # D:\AD\GitHub\no-OS\Pmods\PmodAD6\cf_ad7091r_zed\system.mhs
13
14 include system_incl.make
15
16 #################################################################
17 # PHONY TARGETS
18 #################################################################
19 .PHONY: dummy
20 .PHONY: netlistclean
21 .PHONY: bitsclean
22 .PHONY: simclean
23 .PHONY: exporttosdk
24
25 #################################################################
26 # EXTERNAL TARGETS
27 #################################################################
28 all:
29 @echo "Makefile to build a Microprocessor system :"
30 @echo "Run make with any of the following targets"
31 @echo " "
32 @echo " netlist : Generates the netlist for the given MHS "
33 @echo " bits : Runs Implementation tools to generate the bitstream"
34 @echo " exporttosdk: Export files to SDK"
35 @echo " "
36 @echo " init_bram: Initializes bitstream with BRAM data"
37 @echo " ace : Generate ace file from bitstream and elf"
38 @echo " download : Downloads the bitstream onto the board"
39 @echo " "
40 @echo " sim : Generates HDL simulation models and runs simulator for chosen simulation mode"
41 @echo " simmodel : Generates HDL simulation models for chosen simulation mode"
42 @echo " "
43 @echo " netlistclean: Deletes netlist"
44 @echo " bitsclean: Deletes bit, ncd, bmm files"
45 @echo " hwclean : Deletes implementation dir"
46 @echo " simclean : Deletes simulation dir"
47 @echo " clean : Deletes all generated files/directories"
48 @echo " "
49
50 bits: $(SYSTEM_BIT)
51
52 ace: $(SYSTEM_ACE)
53
54 exporttosdk: $(SYSTEM_HW_HANDOFF_DEP)
55
56 netlist: $(POSTSYN_NETLIST)
57
58 download: $(DOWNLOAD_BIT) dummy
59 @echo "*********************************************"
60 @echo "Downloading Bitstream onto the target board"
61 @echo "*********************************************"
62 impact -batch etc/download.cmd
63
64 init_bram: $(DOWNLOAD_BIT)
65
66 sim: $(DEFAULT_SIM_SCRIPT)
67 cd simulation/behavioral & \
68 system_fuse.cmd
69 cd simulation/behavioral & \
70 start /B $(SIM_CMD) -gui -tclbatch system_setup.tcl
71
72 simmodel: $(DEFAULT_SIM_SCRIPT)
73
74 behavioral_model: $(BEHAVIORAL_SIM_SCRIPT)
75
76 structural_model: $(STRUCTURAL_SIM_SCRIPT)
77
78 clean: hwclean simclean
79 rm -f _impact.cmd
80
81 hwclean: netlistclean bitsclean
82 rm -rf implementation synthesis xst hdl
83 rm -rf xst.srp $(SYSTEM).srp
84 rm -f __xps/ise/_xmsgs/bitinit.xmsgs
85 rm -rf __xps/ps7_instance.mhs
86
87 netlistclean:
88 rm -f $(POSTSYN_NETLIST)
89 rm -f $(WRAPPER_NGC_FILES)
90 rm -f platgen.log
91 rm -f __xps/ise/_xmsgs/platgen.xmsgs
92 rm -f $(BMM_FILE)
93 rm -rf implementation/cache
94
95 bitsclean:
96 rm -f $(SYSTEM_BIT)
97 rm -f implementation/$(SYSTEM).ncd
98 rm -f implementation/$(SYSTEM)_bd.bmm
99 rm -f implementation/$(SYSTEM)_map.ncd
100 rm -f implementation/download.bit
101 rm -f __xps/$(SYSTEM)_bits
102
103 simclean:
104 rm -rf simulation/behavioral
105 rm -f simgen.log
106 rm -f __xps/ise/_xmsgs/simgen.xmsgs
107
108 #################################################################
109 # BOOTLOOP ELF FILES
110 #################################################################
111
112
113 $(PROCESSING_SYSTEM7_0_BOOTLOOP):
114 IF NOT EXIST "$(BOOTLOOP_DIR)" @mkdir "$(BOOTLOOP_DIR)"
115 cp -f $(PROCESSING_SYSTEM7_0_BOOTLOOP)
116
117 #################################################################
118 # HARDWARE IMPLEMENTATION FLOW
119 #################################################################
120
121
122 $(BMM_FILE) \
123 $(WRAPPER_NGC_FILES): $(MHSFILE) __xps/platgen.opt $(PCWPRJFILE) \
124 $(CORE_STATE_DEVELOPMENT_FILES)
125 @echo "****************************************************"
126 @echo "Creating system netlist for hardware specification.."
127 @echo "****************************************************"
128 platgen $(PLATGEN_OPTIONS) $(MHSFILE)
129
130 $(POSTSYN_NETLIST): $(WRAPPER_NGC_FILES)
131 @echo "Running synthesis..."
132 cd synthesis & synthesis.cmd
133
134 __xps/$(SYSTEM)_routed: $(FPGA_IMP_DEPENDENCY)
135 @echo "*********************************************"
136 @echo "Running Xilinx Implementation tools.."
137 @echo "*********************************************"
138 @cp -f $(UCF_FILE) implementation/$(SYSTEM).ucf
139 @cp -f etc/fast_runtime.opt implementation/xflow.opt
140 xflow -wd implementation -p $(DEVICE) -implement xflow.opt $(SYSTEM).ngc
141 touch __xps/$(SYSTEM)_routed
142
143 $(SYSTEM_BIT): __xps/$(SYSTEM)_routed $(BITGEN_UT_FILE)
144 xilperl $(XILINX_EDK_DIR)/data/fpga_impl/observe_par.pl $(OBSERVE_PAR_OPTIONS) implementation/$(SYSTEM).par
145 @echo "*********************************************"
146 @echo "Running Bitgen.."
147 @echo "*********************************************"
148 @cp -f $(BITGEN_UT_FILE) implementation/bitgen.ut
149 cd implementation & bitgen -w -f bitgen.ut $(SYSTEM) & cd ..
150
151 $(DOWNLOAD_BIT): $(SYSTEM_BIT) $(BRAMINIT_ELF_IMP_FILES) __xps/bitinit.opt
152 @echo "*********************************************"
153 @echo "Initializing BRAM contents of the bitstream"
154 @echo "*********************************************"
155 bitinit -p $(DEVICE) $(MHSFILE) $(SEARCHPATHOPT) $(BRAMINIT_ELF_IMP_FILE_ARGS) \
156 -bt $(SYSTEM_BIT) -o $(DOWNLOAD_BIT)
157 @rm -f $(SYSTEM)_bd.bmm
158
159 $(SYSTEM_ACE):
160 @echo "In order to generate ace file, you must have:-"
161 @echo "- exactly one processor."
162 @echo "- opb_mdm, if using microblaze."
163
164 #################################################################
165 # EXPORT_TO_SDK FLOW
166 #################################################################
167
168 $(SYSTEM_HW_HANDOFF): $(MHSFILE) $(PCWPRJFILE) __xps/platgen.opt
169 IF NOT EXIST "$(SDK_EXPORT_DIR)" @mkdir "$(SDK_EXPORT_DIR)"
170 pscgen -mhs $(SYSTEM).mhs -expdir $(SDK_EXPORT_DIR)
171 psf2Edward -inp $(SYSTEM).xmp -flat_zynq -dont_run_checkhwsys -dont_add_loginfo -make_inst_lower -edwver 1.2 -xml $(SDK_EXPORT_DIR)/$(SYSTEM).xml $(GLOBAL_SEARCHPATHOPT)
172 xdsgen -inp $(SYSTEM).xmp -report $(SDK_EXPORT_DIR)/$(SYSTEM).html $(GLOBAL_SEARCHPATHOPT) -make_docs_local
173
174 $(SYSTEM_HW_HANDOFF_BIT): $(SYSTEM_BIT)
175 @rm -rf $(SYSTEM_HW_HANDOFF_BIT)
176 @cp -f $(SYSTEM_BIT) $(SDK_EXPORT_DIR)
177
178
179 #################################################################
180 # SIMULATION FLOW
181 #################################################################
182
183
184 ################## BEHAVIORAL SIMULATION ##################
185
186 $(BEHAVIORAL_SIM_SCRIPT): $(MHSFILE) __xps/simgen.opt \
187 $(BRAMINIT_ELF_SIM_FILES)
188 @echo "*********************************************"
189 @echo "Creating behavioral simulation models..."
190 @echo "*********************************************"
191 simgen $(SIMGEN_OPTIONS) -m behavioral $(MHSFILE)
192
193 ################## STRUCTURAL SIMULATION ##################
194
195 $(STRUCTURAL_SIM_SCRIPT): $(WRAPPER_NGC_FILES) __xps/simgen.opt \
196 $(BRAMINIT_ELF_SIM_FILES)
197 @echo "*********************************************"
198 @echo "Creating structural simulation models..."
199 @echo "*********************************************"
200 simgen $(SIMGEN_OPTIONS) -sd implementation -m structural $(MHSFILE)
201
202
203 ################## TIMING SIMULATION ##################
204
205 implementation/$(SYSTEM).ncd: __xps/$(SYSTEM)_routed
206
207 $(TIMING_SIM_SCRIPT): implementation/$(SYSTEM).ncd __xps/simgen.opt \
208 $(BRAMINIT_ELF_SIM_FILES)
209 @echo "*********************************************"
210 @echo "Creating timing simulation models..."
211 @echo "*********************************************"
212 simgen $(SIMGEN_OPTIONS) -sd implementation -m timing $(MHSFILE)
213
214 dummy:
215 @echo ""
216