标签:
做一个ASIC项目,基本结构是MCU+ROM+RAM。目前想把单片机程序下载到ROM中,然后在ModelSim中仿真程序,得到运行结果。好二哥给出的Tcl下载文件如下,细细研读中...
puts "===================================================================" puts " XXX: loadprogram.tcl" puts "===================================================================" upvar #0 sourceargs args set ifl "...程序文件路径..." if { [llength $args] < 1 }
{ append ifl "rom.dat" }
else
{ append ifl [lindex $args 0] } if { [llength $args] < 2 }
{ set inst "pmem" }
else
{ set inst [lindex $args 1] } if { [llength [find instances ${inst} ]] > 0 }
{ set msg "load pmem data from file: " append msg $ifl puts $msg mem load -format hex -filldata 16‘HDEAD ${inst} mem load -infile $ifl -format hex ${inst} }
标签:
原文地址:http://www.cnblogs.com/mengdie/p/4385718.html