vivado 映射Makefiles

映射Makefiles
Makefile是一个文本文件,由make命令引用,并控制make
命令编译并链接程序。Makefile由何时执行的规则组成
操作,并包含诸如源级别和构建顺序依赖关系之类的信息。确定
编译命令的序列,Makefile检查依赖的时间戳
文件夹。以下示例显示了如何编写Makefiles。
示例:将ISE Design Suite Makefile映射到
Vivado设计套件Makefile
ISE设计套件中使用的示例Makefile

DESIGN = test
DEVICE = xc7v585tffg1157-2
UCF_FILE = ../Src/${DESIGN}.ucf
EDIF_FILE = ../Src/${DESIGN}.edf
# Make all runs to place & route
all : place_n_route
# bitstream : Creates device bitstream
bitstream : ./${DESIGN}.bit
# place_n_route: Stops after place and route for analysis prior to bitstream
generation
place_n_route : ${DESIGN}.ncd
# translate: Stops after full design elaboration for analysis and
floorplanning prior
to place and route step
translate : ${DESIGN}.ngd
# Following executes the ISE run
${DESIGN}.bit : ${DESIGN}.ncd
bitgen -f ${DESIGN}.ut ${DESIGN}.ncd
${DESIGN}.ncd : ${DESIGN}_map.ncd
par -w -ol high ${DESIGN}_map.ncd ${DESIGN}.ncd ${DESIGN}.pcf
${DESIGN}_map.ncd : ${DESIGN}.ngd
map -w -ol high -o ${DESIGN}_map.ncd ${DESIGN}.ngd ${DESIGN}.pcf
${DESIGN}.ngd : ${EDIF_FILE} ${UCF_FILE}
ngdbuild -uc ${UCF_FILE} -p ${DEVICE} ${EDIF_FILE} ${DESIGN}.ngd
# Clean up all the files from the Vivado run
clean :
rm -rf *.ncd *.ngd *.bit *.mrp *.map *.par *.bld *.pcf *.xml *.bgn *.html \
*.lst *.ngo *.xrpt *.unroutes *.xpi *.txt *.pad *.csv *.ngm xlnx_auto* \
_xmsgs *.ptwx
# Tar and compress all the files
tar :
tar -zcvf ${DESIGN}.tar.gz *.ncd *.ngd *.mrp *.map *.par *.bld *.pcf *.bgn \
Makefile
Equivalent Makefile Used in the Vivado Design Suite
DESIGN = test
DEVICE = xc7v585tffg1157-2
XDC_FILE = ../Src/${DESIGN}.xdc
EDIF_FILE = ../Src/${DESIGN}.edf
# Make all runs to place & route
all : place_n_route
# bitstream : Creates device bitstream
bitstream : ./${DESIGN}.bit
# place_n_route: Stops after place and route for analysis prior to bitstream
generation
place_n_route : ./${DESIGN}_route.dcp
# translate: Stops after full design elaboration and initial optimization
for
analysis and floorplanning prior to place and route step
translate : ./${DESIGN}_opt.dcp
# Following calls Tcl files for each desired portion of the Vivado run
# Design checkpoint files and bit file used for dependency management
./${DESIGN}.bit : ./run_vivado_place_n_route.tcl ./${DESIGN}_route.dcp
vivado -mode batch -source run_vivado_bitstream.tcl -tclargs ${DESIGN}
./${DESIGN}_route.dcp : ./run_vivado_place_n_route.tcl ./${DESIGN}_opt.dcp
vivado -mode batch -source run_vivado_place_n_route.tcl -tclargs \
${DESIGN}
./${DESIGN}_opt.dcp : ./run_vivado_opt.tcl ${EDIF_FILE} ${XDC_FILE}
vivado -mode batch -source run_vivado_opt.tcl -tclargs ${DESIGN} ${DEVICE}
${EDIF_FILE} ${XDC_FILE}
# Clean up all the files from the Vivado run
clean :
rm -f *.jou *.log *.rpt *.dcp *.bit *.xml *.html
# Tar and compress all the files
tar :
tar -zcvf ${DESIGN}.tar.gz *.jou *.log *.rpt *.dcp *.tcl Makefile
Associated Tcl Files for the Vivado Design Suite
Makefile
run_vivado_opt.tcl
# Gathering TCL Args
set DESIGN [lindex $argv 0]
set DEVICE [lindex $argv 1]
set EDIF_FILE [lindex $argv 2]
set XDC_FILE [lindex $argv 3]
# Reading EDIF/NGC file
read_edif ../Src/${DESIGN}.edf
# Linking Design
link_design -part ${DEVICE} -edif_top_file ../Src/${DESIGN}.edf
# Running Logic Optimization
opt_design
# Adding Constraints
read_xdc ${XDC_FILE}
# Saving Run
write_checkpoint -force ./${DESIGN}_opt.dcp
# Creating opt reports
report_utilization -file ${DESIGN}_utilization_opt.rpt
report_timing_summary -max_paths 10 -nworst 1 -input_pins
report_io -file ${DESIGN}_io_opt.rpt
report_clock_interaction -file ${DESIGN}_clock_interaction_opt.rpt
exit
run_vivado_place_n_route.tcl
# Gathering TCL Arg
set DESIGN [lindex $argv 0]
read_checkpoint ./${DESIGN}_opt.dcp
link_design
# Placing Design
place_design
write_checkpoint -force ./${DESIGN}_place.dcp
# Routing Design
route_design
# Saving Run
write_checkpoint -force ./${DESIGN}_route.dcp
# Creating route reports
report_timing_summary -max_paths 10 -nworst 1 -input_pins
report_drc -file ${DESIGN}_drc_route.rpt
exit
run_vivado_bitstream.tcl
# Gathering TCL Arg
set DESIGN [lindex $argv 0]
read_checkpoint ./${DESIGN}_route.dcp
# Create bitstream
write_bitstream -force ${DESIGN}.bit
exit
注意:此流退出并重新进入Makefile中定义步骤的Vivado工具。虽然这允许
make基础结构的运行控制能力更强,它在执行时间上不是最高效的,因为
必须退出并重新启动软件,然后为每个定义的步骤重新加载设计。构建整个
在Tcl中运行在运行时可能更高效,因为如果
这比让Makefile控制步骤更可取
  • 15
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cckkppll

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值