TCL 2 2015.00 LG 03
TCL 2 2015.00 LG 03
TCL 2 2015.00 LG 03
3 Reports
Learning Objectives
Lab Duration:
35 minutes
Lab Overview
This lab continues the building of a complex Tcl procedure to clean duplicate timing
reports from a log file.
There are two levels of help available in the Answer/Solutions section at the end of
this lab for each task – starting from a flow diagram to the complete procedure.
Lab Tasks
Start the procedure clean_log by
Apply file I/O commands and
reading and writing a log file
define procedure attributes
LAB 1
File Locations
Directory Structure
design_data ORCA netlist
scripts Run scripts
libs Technology libraries
tcl_procs Solution directory
log Log file directory
.synopsys_dc.setup Setup file for Design Compiler
.synopsys_pt.setup Setup file for PrimeTime
Relevant Files
scripts/
clean_log.tcl Continuation for clean_log proc
runtiming.tcl To regenerate timing.log file
tcl_procs/
clean_log4.tcl Solution for lab 2
clean_log5.tcl Solution for lab 3
clean_log.tcl Final solution
log/
timing.log Log file to be cleaned
Lab Instructions
Your goal is to continue building clean_log that strips out the duplicate timing
reports and returns a clean log file for more efficient analysis.
Question 1. What does the gets command do with the end of line
character (the newline)?
....................................................................................................
Question 2. By default, will puts add a newline to the end of the string
written to a file?
....................................................................................................
....................................................................................................
After each complete timing report is captured, write the complete report to
the out file.
The command clean_log should return the total number of timing reports
in the in file.
2. Source the modified procedure into either Design Compiler or PrimeTime and
verify the following:
Answers / Solutions
Question 1. What does the gets command do with the end of line
character (the newline)?
It will strip the end of line character (the newline) from each
full line in the file being read.
Question 2. By default, will puts add a newline to the end of the string
being written to a file?
Yes.
close $in_file_handle
close $out_file_handle
return $infile_count