【VCS】debug hang

  1. Compile the design using -debug_all switch.
    >> vcs -debug_all <other options>
  2. Load the executable in UCLI/GUI
    >> simv -ucli (or -gui)
  3. source the loop_detect.tcl
    ucli> source (or do) ./loop_detect.tcl
  4. Run the simulations till the exact point where simulation hangs
    ucli> run <time> #point where simulation hangs
  5. Execute the loop_detect procedure
    ucli> loop_detect <no. of iterations>

    其中,loop_detect.tcl的内容为

#!/usr/bin/tclsh


proc loop_detect(args) {

    set help "-help"
    if{[string equal $args $help] != 1} {
       config followactivescope on
       set i 0;
       while {$i < $args} {
         run_step
         incr i
       }
    } 
    else {
      puts "Usage: loop_detect <no. of iteration>"
    }
}

proc run_step{} {
  redirect -f loop.txt -a {set x [step]};  
  redirect -f loop.txt -a {set y [scope]};  
  puts $x;
  puts $y;
}

猜你喜欢

转载自blog.csdn.net/lbt_dvshare/article/details/82689757
VCS