For example to suppress the CMD 029 message use the following command prompt

For example to suppress the cmd 029 message use the

This preview shows page 22 - 25 out of 118 pages.

For example, to suppress the CMD-029 message, use the following command: prompt> suppress_message CMD-029 To display the currently suppressed message IDs, use the print_suppressed_messages command.
Image of page 22
Chapter 1: Introduction to the Tool Interfaces Running Linux Commands Within the Tool 1-9 Using Tcl With Synopsys ® Tools Version N-2017.09 To reenable printing of the suppressed messages, use the unsuppress_message command. To disable printing of error messages, use the suppress_errors variable with a list of error message IDs for which you want messages to be suppressed. Running Linux Commands Within the Tool The tools support some common Linux commands, as listed in Table 1-3 . Although you can use the sh command or exec command to execute operating system commands, it is strongly recommended that you use native Tcl functions or procedures. Table 1-3 Common Tasks and Their System Commands To do this Use this List the current working directory. pwd Change the working directory to a specified directory or, if no directory is specified, to your home directory. cd directory List the specified files, or, if no arguments are specified, list all files in the working directory. ls directory_list Search for a file, using the search path defined by the search_path variable. which filename Return the value of an environment variable. getenv name or set $env( name ) Set the value of an environment variable. Any changes to environment variables apply only to the current process and to any child processes launched by the current process. setenv name value or set env( name ) value Display the value of one or all environment variables. printenv variable_name Execute an operating system command. This Tcl built-in command has some limitations. For example, no file name expansion is performed. exec command Execute an operating system command. Unlike exec , this command performs file name expansion. sh command
Image of page 23
Chapter 1: Introduction to the Tool Interfaces Running Linux Commands Within the Tool 1-10 Using Tcl With Synopsys ® Tools N-2017.09 Using Tcl With Synopsys ® Tools Version N-2017.09 After you have loaded designs and libraries, the tool process might be quite large. In such cases, using the sh or exec commands might be quite slow and on some operating systems, might fail altogether due to insufficient virtual memory. You can use Tcl built-in commands to avoid this problem. For example, to remove a file from within the tool under linux, use the following command: prompt> file delete filename For better performance, replace common linux commands with the Tcl equivalent listed in Table 1-4 . It is often possible to replace common Linux commands with simple Tcl procedures. For example, you can use the following procedure to replace the Linux touch command. Example 1-1 Tcl Procedure to Replace Linux touch Command proc touch {file_name} { if{[file exists $file_name]} { file mtime $file_name [clock seconds] } else { set fp [open $file_name "w"] close $fp } } You can write similar procedures to replace grep , awk , cat , and other external commands.
Image of page 24
Image of page 25

You've reached the end of your free preview.

Want to read all 118 pages?

  • Fall '17
  • Rajini
  • Shell, Filename, Command-line interface, Tcl

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture