⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 runvhdl.do

📁 Full Des Simulation Code
💻 DO
字号:
# Rev:			2.1 24Jan05 TFB - Production

# initialize variables
quietly set lang "vhdl"
#quietly set lang "vlog"
quietly set test_type "user"
quietly set CORENAME "core3des"
quietly set TBWKDIR $CORENAME
quietly append TBWKDIR "_lib"
quietly set exit_script 0
quietly set do_waves 1
quietly set do_waves_str "Capturing waveforms"
quietly set dowavefile "wavetb.do"
quietly set vhdltbench "work_vhdl.tb_vhdl"
quietly set vlogtbench "work_vlog.tb_vlog"
quietly set s1 "+nowarnTFMPC"
quietly set s2 "+nowarnTSCALE"
quietly set s3 "-noglitch"
quietly set s4 ""
quietly set maxargs 4

# process arguments (if any ...)
quietly set nargs $argc
if {$nargs>0 && $nargs<=$maxargs} {
	for {set i 1} {$i <= $nargs} {incr i} {
		#quietly set CurrentArg $1
		#shift
		###################################################################
		# workaround here to explicitly set to $1, $2, etc., since 'shift'
		# command doesn't appear to function properly in MTI OEM version 5.5e
		###################################################################
		switch $i {
			1 { quietly set CurrentArg $1 }
			2 { quietly set CurrentArg $2 }
			3 { quietly set CurrentArg $3 }
			4 { quietly set CurrentArg $4 }
		}
		switch $CurrentArg {
			nowaves {
				quietly set do_waves 0
				quietly set do_waves_str "NOT Capturing waveforms"
			}
		}
	}
}

# set certain actions depending upon language
if {$lang == "vhdl"} {
	if {[file exists $TBWKDIR/_info]} {
		quietly set tbench $vhdltbench
	} else {
	echo "##################################################################"
	echo "ERROR!  The following directory:"
	echo "$TBWKDIR"
	echo "either does not exist or does not contain an MTI compiled simulation"
	echo "library.  Please be sure to copy the $TBWKDIR directory to this"
	echo "directory before running the VHDL simulation."
	echo "Exiting ..."
	echo "##################################################################"
	echo ""
	quietly set exit_script 1
	}
} else {
	quietly set tbench $vlogtbench
}

if {$exit_script == 1} {
	exit
} else {
	echo $do_waves_str
	vsim -t 100ps $s1 $s2 $s3 $s4 $tbench
	if {$do_waves == 1} {do $dowavefile}
	# get rid of annoying Warning messages about arithmetic operands at time 0
	quietly set StdArithNoWarnings 1
	run -all
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -