TCL Scripts
1. TCL Scripts for Physical Design/Tcl_Proc_find Duty Cycle_Frequency_Period from SDC.tcl # Version:1.0 proc DCFTP {in} { set inf [ open " $in " r] while {[ gets $inf line] >= 0} { if {[ regexp -all "period*" $line m] | [ regexp -all "waveform*" $line n]} { set x [ regexp -all {[^period*]+\w+\w+[*.0]+\w} $line match2 ]; puts " Time Period: $match2 ns " puts " Frequency : [ expr 1/ $match2 ] GHz " set y [ regexp -all {\w[^0.]+[*.0]\w} $line match3 ]; # puts "$match3" ; set D [ expr [ lindex $match3 1]/ $match2 ] # set y [regexp -all {\d[^0.]+[*.0]\d} $line match3 ]; set y [ regexp -all {\d[^waveform]+[*.0]\d} $line match3 ]; puts " $match3 " ; set e [ expr [ lindex $match3 0]+[ lindex $match3 1]] set D [ expr $e / $match2 ] puts " Duty Cycle: [ expr $D *100 ] % " break } else {} } # close...