首次提交
This commit is contained in:
80
new_project_rtl_template/sim/runone.tcl
Normal file
80
new_project_rtl_template/sim/runone.tcl
Normal file
@@ -0,0 +1,80 @@
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
#ATTTION : DO NOT MODIFY THE WHOLE FILE
|
||||
|
||||
|
||||
#clear the simulator transcript window and make the wave,data & coverage director
|
||||
do clear.tcl
|
||||
#preset envieroment variables
|
||||
do globalset.tcl
|
||||
set ROOT_PATH [pwd];
|
||||
|
||||
|
||||
#import common routines
|
||||
source functions.tcl
|
||||
source parse_args.tcl;
|
||||
|
||||
|
||||
set CASE_DIR ${SIM_TYPE}${CASE_NUM}
|
||||
|
||||
#we discard the case_num,thus all cases use the same case name.
|
||||
#thus the signal_name in the lastwave.tcl will be case independent
|
||||
#it's convinient to share and inherit lastwave in different case
|
||||
set CASE_NAME ${SIM_TYPE}${CASE_NUM}
|
||||
|
||||
|
||||
#puts "SIM_TYPE = $SIM_TYPE "
|
||||
#puts "CASE_NUM = $CASE_NUM "
|
||||
#puts "SIM_TIME = $SIM_TIME "
|
||||
#puts "CORNER_TYPE = $CORNER_TYPE"
|
||||
#puts "CASE_NAME = $CASE_NAME "
|
||||
|
||||
#copy modelsim.ini to case dir,and enter the case dependent directory
|
||||
file copy -force modelsim.ini ./${CASE_DIR}
|
||||
|
||||
|
||||
#by default,all cases use the same run.tcl
|
||||
#we can make trivial change to each case
|
||||
|
||||
|
||||
file copy -force run_template.tcl ./${CASE_DIR}/run.tcl
|
||||
|
||||
#we can use -c command to override run.tcl
|
||||
puts "---->check if override the run.tcl commandary..............."
|
||||
if {[string equal $COPY_RUN_TEMPLATE "yes" ]} {
|
||||
file copy -force run_template.tcl ./${CASE_DIR}/run.tcl
|
||||
puts "<<<<<<<<<<force copy run_template.tcl to ${CASE_DIR} dirctory>>>>>>>>>"
|
||||
}
|
||||
|
||||
#force generate instantiate_top.sv and override exist file
|
||||
if {[info exists GEN_INSTANTIATE_TOP] && [string equal $GEN_INSTANTIATE_TOP "yes" ]} {
|
||||
exec python ../../../../../python/gen_instantiate_top.py ../../01_source/01_func/${TOP_FILE}
|
||||
}
|
||||
|
||||
if {![file exists ./instantiate_top.sv]} {
|
||||
exec python ../../../../../python/gen_instantiate_top.py ../../01_source/01_func/${TOP_FILE}
|
||||
}
|
||||
|
||||
cd ${CASE_DIR}
|
||||
if { [ catch {do run.tcl -t $SIM_TIME -type $SIM_TYPE -corner $CORNER_TYPE} result ] } {
|
||||
|
||||
quit -sim
|
||||
cd ${ROOT_PATH}
|
||||
|
||||
}
|
||||
|
||||
set current_path [pwd]
|
||||
puts "+++++++++++++++++++++++++++current path=$current_path++++++++++++++++++++++++++++++++"
|
||||
|
||||
Reference in New Issue
Block a user