SpyGlass TCL Shell Interface
SpyGlass TCL Shell Interface
Interface
Version 4.4.1
October 2010
Atrenta, Inc.
2077 Gateway Place, Suite 300
San Jose, California 95110
1-866-ATRENTA (1-866-287-3682)
http://www.atrenta.com
Preface............................................................................................................................. 7
About This Book .................................................................................................................................7
Contents of This Book ........................................................................................................................7
Typographical Conventions ................................................................................................................8
Syntax Conventions ...........................................................................................................................8
Table of Contents
Table of Contents
Chapter Describes...
Using the Tcl Shell Interface Information on the usage of Tcl shell
interface
SpyGlass Tcl Commands Details of variousTcl commands
Known Problems and Solutions in Tcl The known problems and solutions in the
Shell Tcl Shell
Typographical Conventions
This document uses the following typographical conventions:
Syntax Conventions
This document uses the following syntax conventions for Tcl
commands:
Overview
The Tool Control Language (Tcl) interface of SpyGlass enables you to interactively
control flow of various stages during a design analysis session. It can be used to
perform a variety of operations such as compiling a design, applying constraints,
configuring tool settings, controlling flow, and/or customizing the reports. The Tcl
interface provides the ability to create scripts for your CAD environment, perform
"what-if" analysis, perform interactive debugging, and facilitate the organization of
complex flow into smaller and logical steps for easy execution.
A typical design analysis session can be divided into the following stages:
1. Design Setup stage
During this stage, you set up the design by adding the design files, precompiled
files, and technology files. In addition, you also specify various design read options
that are used during the SpyGlass run. You can read the design at this stage, fix any
issues reported during design read, and identify and fix blackboxes. This ensures
that the basic design read is clean before proceeding ahead with the detailed
analysis.
Project File
As part of various stages during a design debug session within SpyGlass Tcl Shell
Interface (or sg_shell), user works on a project. sg_shell requires that you define a
project which captures all of design and goal setup information. As you update the
design data or goal setup information such as constraints and parameters, the project
holds the latest setup information. For example, if you start a project with two design
files (say top.v and mid.v), and then add another design file (say lower.v), but later
remove mid.v, the project would finally store top.v and lower.v.
Project is a store house of the final setup details and allows you to quickly start your
next sg_shell session from the point where you left it in the earlier debug session. The
project file is a Tcl file with appropriate Tcl commands capturing information about
design setup and goal setup till the point last saved by you.
There is already a notion of project in Console, and user is expected to debug session
within an active project, and the same applies to sg_shell also. However, there are
quite a few changes done in various Tcl commands between earlier project files, and
the ones saved with SpyGlass 4.3.0. sg_shell is fully backward compatible to any
project file created with Console 4.2.0 or 4.2.1. Since there are many commands
changed from earlier releases, you are recommended to open the existing project file
in sg_shell, and immediately save it to get the updated project file with new command
names. Refer to the Deprecated Command Names and Their Corresponding New
Commands to see the old versus new command mapping.
If there are any errors in your project file having old command names, sg_shell reports
the new command names in the error messages instead of old command names as in
the project file.
It is recommended that you open a project in sg_shell, and then update the setup
information, instead of directly updating it in the project file. This would help you to
catch any errors in the setup in an interactive manner.
Some other general information about the project file is listed below:
It is always better to have project file with .prj extension if manually created so as to
easily identify it. If the project is created inside sg_shell, it is automatically
assigned this extension.
There is some basic information in the project file, such as projectcwd etc, which is
used internally by the software. Please ensure that you do not tweak this data while
manually editing this file.
There are Tcl commands to start a new project, open an existing project, save/close
project or query the current project.
If there are any environment variables used while manually editing a project file,
those environment variables are lost when the project is next saved. Please note
that project file stores the final setup information, and any Tcl specific substitution
or constructs are interpreted and lost while loading the project itself. Therefore,
these are not preserved while saving the project.
% sg_shell
NOTE: sg_shell is picked from the same location as spyglass - $SPYGLASS_HOME/bin.
When you specify the above command, SpyGlass displays the sg_shell shell prompt,
as shown below:
+---------------------------------------------------------------------+
| |
| SpyGlass(R) Predictive Analyzer - Version 4.3.0 |
| Last compiled on Sep 14 2009 |
| |
| All Rights Reserved. Use, disclosure or duplication |
| without prior written permission of Atrenta Inc.is prohibited. |
| Technical support:[email protected] or dial 1-866 ATRENTA. |
+---------------------------------------------------------------------+
sg_shell>
Once the above shell prompt appears, you can start the required operations by using
various Tcl commands. As you start typing the Tcl commands, sg_shell records those
commands in a separate Tcl file (sg_shell_command.log) in the current working
directory, which you can use later for regression purpose. If the Tcl file of the same
name (sg_shell_command.log) already exists, sg_shell overwrites it.
Specifying the Tcl Startup file While Invoking the Tcl Shell Interface
You can specify a Tcl startup file while invoking the Tcl Shell interface in the
following manner:
sg_shell -tcl mystartup.tcl
When you specify the above command, sg_shell evaluates the contents of the
mystartup.tcl file as a Tcl script, and then the sg_shell prompt appears. This startup file
can have some alias definitions, procedures, and predefined variables that you want to
use in a given sg_shell session.
If there is any error in this startup file, no further commands from the point of error are
evaluated. However, sg_shell returns to the sg_shell prompt so that you can query
detailed error information. In such situations, apart from querying the error
information, the shell is rendered useless (unless you do not worry about the contents
of your startup files).
Similarly, if you specify the name of a Tcl command that does not exist, sg_shell flags
the following message:
invalid command name "<command-name>"
NOTE: You can specify unambiguous abbreviations for the sg_shell commands to be
used on the sg_shell prompt. Therefore, if you type "new", then it'll be unambiguously
expanded to the new_project command.
Property 1
An argument can accept zero, one, or more values.
Consider the following example:
define_filter -regexp
In the above example, the -regexp argument does not accept any value. Such
arguments can also be considered as boolean switches that are usually used to turn on/
off specific setting(s).
The following example displays different ways of specification in the define_filter
command:
define_filter -name f1 -file f4.v
define_filter -name f1 -file {f1.v f2.v f3.v}
define_filter -name f1 -file "f5.v f6.v f7.v"
define_filter -name f1 -file [list f8.v f9.v]
In the above command, the -file argument can accept only one value. This value
can either be a file name or can be a list.
If it is a list, it should be specified in a particular format (as shown in the above
examples). To reiterate, the format is as follows:
Enclose multiple values, which are space separated inside curly braces
Enclose multiple space separated values inside double quotes
Use Tcl list command with individual values as argument to it. Since we want to
execute this Tcl command, and assign its output to -file argument, it should be
put in square bracket [] as [list <v1> <v2> … <vN>].
If a list value is not specified in the above format, sg_shell considers each element of
the list as a separate value, and thus flags an error. For example, consider the following
command:
define_filter -file f4.v f5.v
For the above command, sg_shell flags an error as the file names are not specified in a
list format (by using " ", {}, or [list ]). In addition, it takes f4.v as argument to
-file and f5.v becomes a positional argument, and is not considered as part of the
-file argument.
Now consider another example, as shown below:
define_filter -file_line f1.v 25
In the above example, the -file_line argument accepts two values, file name and
line number. However, if you specify the value of this argument as a list containing the
file name and line number, sg_shell flags an error as this argument should be provided
with two separate values. Therefore, sg_shell flags an error in the following case:
define_filter -file {f1.v 25}
Property 2
Multiple specifications of an argument are either OVERWRITTEN or APPENDED
depending on the type of argument.
If an argument takes single value (scalar type), and you specify multiple specifications
of that argument, sg_shell retains only the last specification. For example, consider the
following command in which the -name argument takes only a single value:
define_filter -name "n1" -file {f1.v f2.v} -name "n2"
In the above command, multiple -name specifications have been specified. In this
case, sg_shell considers only the last -name specification, that is, -name n2.
If an argument takes multiple values (list type) and you have specified multiple
specifications of that argument, sg_shell considers all the values of each argument. For
example, consider the following command in which the -file argument takes
multiple values:
define_filter -file {f1.v f2.v} -name n1 -file [list f3.v f4.v] -
name n2 -file f5.v
In the above command, there are multiple specifications of the -file argument. In
this case, sg_shell would consolidate all the values of the -file argument in a list
and finally consider the list, {f1.v f2.v f3.v f4.v f5.v}, as the value of the
-file argument.
Property 3
Both Property 1 and Property 2 together make it possible to have arguments, which
can accept a list of tuples.
For example, consider the -file_lineblock argument of the define_filter
command for which the first and second property is as follows:
-file_lineblock (Property 1 : Accepts three values)
-file_lineblock (Property 2: Tagged as list type)
Now, consider the following command:
define_filter -file_lineblock f1.v 24 30 -name n1 -file_lineblock
f2.v 9 20
In the above case, the -file_lineblock argument will have the following final
value:
{ {f1.v 24 30} {f2.v 9 20} }
NOTE: In the above example, if the -file_lineblock argument was tagged as scalar
type, the final value of this argument would have been {f2.v 9 20}.
Property 4
Argument values can have string property.
An argument value can have the string property which means that it should be given a
string value. Further, a string argument can be of scalar or list type accepting single
string value or multiple string values respectively.
You should enclose the string value of an argument in braces ({}). This is done to
prevent the string value from Tcl's built-in backslash/command/variable substitution.
For example, if the value of an argument is a bit vector, U0.data[3], you should
specify this value as {U0.data[3]}. If you do not specify this value in braces, Tcl
would attempt a command substitution and would start looking for a command named
"3".
Consider the -msg argument of the define_filter command:
define_filter -msg {Net 'U0.data[3]}' is not driven}
In the above case, the -msg argument value is of string type, so it should be specified
in the curly braces. Further, if -msg is specified multiple times, then the last value
would be used since it is a scalar type of argument.
your startup files to store your collection of procedures, aliases, or some predefined
variables. Following are some more locations where the startup file can be present:
$HOME/.sg_shell.startup
$CWD/.sg_shell.startup
sg_shell searches and evaluates the startup files in the following order:
1. $SPYGLASS_HOME/.sg_shell.startup
2. $HOME/.sg_shell.startup
3. $CWD/.sg_shell.startup
Since CWD file is evaluated in the end, so any definition in this file overrides any
previous definition for the same variable, alias or procedure. These .sg_shell.startup
files should be Tcl files, and are evaluated as any other Tcl script. Therefore, if there is
an exit command in any of these startup files and if the control reaches to that exit
command, sg_shell exits.
You can also implicitly specify a startup file by using the -tcl command-line option
of sg_shell. Therefore, when you specify sg_shell -tcl mystartup.tcl,
sg_shell evaluates the contents of mystartup.tcl as a Tcl script, and then the sg_shell
prompt appears. If there is any error in the startup file, no further commands from that
file are evaluated. In addition, no other startup files are considered (including -tcl
<startupfile> specification). However, sg_shell returns to the sg_shell prompt so that
you can query for detailed error information. In such situations, apart from querying
the error information, the shell is rendered useless (unless you don't worry about the
contents of your startup files).
custom procedures to achieve some level of automation with your way of using
sg_shell commands.
Following is an example of an error scenario:
[sam@chakra framework_regr]$ sg_shell -32bit
+---------------------------------------------------------------------+
| |
| SpyGlass(R) Predictive Analyzer - Version 4.3.0 |
| Last compiled on Sep 14 2009 |
| |
| All Rights Reserved. Use, disclosure or duplication |
| without prior written permission of Atrenta Inc.is prohibited. |
| Technical support:[email protected] or dial 1-866 ATRENTA. |
+---------------------------------------------------------------------+
|FATAL: errors found in startup file `/u/sam/.sg_shell.startup'
(missing close-brace)
(Use `show_error' for more details)
sg_shell> show_error
Detailed Error Trace
--------------------
missing close-brace
while executing
"proc minus {a} {
return [expr {$a - 5}]
proc verbose {} {
if {$::verbose} { set ::verbose 0 } else { set
::verbose 1 }..."
(file "/u/sam/.sg_shell.startup" line 1)
this startup file. Therefore, you can have your commands till "run_goal" etc. in this
startup file, and when you use this file with the -tcl option, then the whole file is
evaluated, and the sg_shell prompt appears. On the prompt, once the execution of the
"run_goal" command is complete, you can start browsing the message data base and
create your custom reports, etc.
+--------------------------------------------------------------------+
| |
| SpyGlass(R) Predictive Analyzer - Version 4.3.0 |
| Last compiled on Sep 14 2009 |
| |
| All Rights Reserved. Use, disclosure or duplication |
| without prior written permission of Atrenta Inc.is prohibited. |
| Technical support:[email protected] or dial 1-866 ATRENTA. |
+--------------------------------------------------------------------+
INFO: reading project file 'something' ...
open_project: error: found errors in project file
'something.prj'
FATAL: errors found in project file `something'
(oops, _empty_error_string_!)
(Use `show_error' for more details)
sg_shell> show_error
Detailed Error Trace
--------------------
while executing
"open_project something"
sg_shell>
Features of sg_shell
This section contains the following topics:
Using the Help Feature
Using the Tab Completion Feature
Capturing stdout and stderr
History Support in sg_shell
Command Logging in sg_shell
Signal Handling in sg_shell
Using Key Combinations for Performing Actions
Advanced Editing Features in sg_shell Prompt
completions:
If the first word is being completed, sg_shell first searches for the available
commands (both built-in and sg_shell commands). If matches are available, they
are listed. Otherwise, sg_shell displays the matching file/directory names of the
CWD.
If second or later word is being completed, file/directory names completion comes
into effect.
NOTE: The tab completion feature does not work if you give spaces and then type something,
and try to do tab completion. Remove any leading spaces, and then tab completion will work as
expected.
sg_shell uses the ? character whenever you specify an incomplete command as per the
Tcl syntax. For example, in the following case, after sg_shell has encountered the
closing brace, the command is considered as complete and that command is executed:
sg_shell> set files { f1.v
? f2.v f3.v
? f4.v
? }
In addition, sg_shell supports tab completion when you have ?. For example, if you
want to see all the files and folders starting with the character f, you can specify the
following:
? f<TAB>
f1.v f2.v f3.v f4.v files_all/
If you specify the history command, the string literal, such as "!n", will be found, as
against finding the actually substituted command.
If there are any leading or trailing white spaces in any command on the sg_shell
prompt, they will be retained when you use the history command to list them.
NOTE: The leading and trailing white spaces are removed only for up-history/down-history
using arrow keys or other bind keys, so that when you do up-arrow/down-arrow then you get a
open_project urprj
^ur^my^
quit
Command Purpose
CTRL + a To move to the start of the current line
CTRL + e To move to the end of the line
CTRL + f To move forward a character
CTRL + b To move back a character
CTRL + l To clear the screen leaving the current line at the top of the screen.
ESC + f To move forward to the end of the next word
ESC + b To move back to the start or the previous word.
Command Purpose
CTRL + p To fetch the previous command from the history list, or moving back in the list
CTRL + n To fetch the next command from the history list or moving forward in the list
CTRL + r To search backward starting at the current line and moving up through the history as
required.
This is an incremental search.
Command Purpose
CTRL + d To delete the character under the cursor.
If the cursor is at the beginning of the line, or there are no characters in the line, or
the last character typed was not bound to C-d, this command returns EOF.
Rubout To delete the character behind the cursor.
When given a numeric argument, save the deleted text on the kill-ring.
ESC + m To change the current (or the following) to uppercase. With a negative argument, this
command considers the previous word, but does not move the point.
ESC + l To change the current (or the following) to lowercase. With a negative argument, this
command considers the previous word, but does not move the point.
Command Purpose
CTRL + k To kill the text from the current cursor position to the end of the line
CTRL + x To kill backward to the beginning of the line
Rubout
CTRL + u To kill backward from point to the beginning of the line
CTRL + w To kill the word behind the cursor by using white space as a word boundary.
The word boundaries are different from backward-kill-word.
CTRL + y To yank the top of the kill ring into the buffer at the cursor.
ESC + d To kill from the cursor to the end of the current word, or if you are present between
the words then to kill from the cursor to the end of the next word. Word boundaries
are the same as those used by forward-word.
ESC + To kill the word behind the cursor. Word boundaries are the same as those used by
Rubout backward-word.
$if sg_shell
# settings specific to sg_shell
$endif
For more information, visit "man readline" or "info readline".
Following is a quick key bindings listing:
Overview
This chapter describes the Tcl commands currently available in SpyGlass
Tcl Shell Interface (or sg_shell).These commands can be categorized based
on their nature in following groups:
Session Commands
Design Setup Commands
Goal Setup/Run Commands
Reporting Commands
Debug Commands
Miscellaneous Commands
Session Commands
Commands of this group are useful for session management and allow to
encapsulate design/goal setup information inside a user-defined project.
Following are the session commands:
Command Description
new_project Creates a new project
open_project Opens an existing project
save_project Saves the specified project
close_project Closes the currently active project
current_project Displays data of the currently loaded project
exit Quits sg_shell and returns to the unix shell prompt
set_pref Sets the specified preference variable to its specified value
get_pref Displays the value of the specified preference variable (s)
Scope None
Description The new_project command creates a new project with the specified
name.
For design analysis, your first step inside sg_shell should be to create a
project. The project stores design setup information and the goal setup
information, which is defined during an interactive sg_shell session. After
the project is saved, it can be loaded in subsequent sg_shell sessions to start
from where it was left in the earlier session.
As you run various goals inside the given project, sg_shell saves the output
on the disk inside the project working directory. By default, the project
working directory is the same area from where the project file is picked.
However, you can specify a different working directory by using the
-projectwdir argument of this command. Inside the project working
directory, sg_shell creates a directory by the name of the project to store the
output of various runs.
The new_project command fails to execute if some other project is
already open. You should close any existing project by using the
close_project command before executing the new_project command.
<project-name>
Specifies the name of the project to be created
-projectwdir <project-path>
Specifies the name of the project working directory where the project
output would be created. The same project work directory can be used
for multiple projects. sg_shell creates all its output directories inside
the project directory.
All intermediate directories specified by using the -projectwdir
argument should be already present, else the new_project command
would fail. Also, the output area specified with -projectwdir should
have write permission.
-force
Removes an already existing project (both the project file and the project
directory) and starts a new project with the same name.
NOTE: Be careful while using the -force argument as you may loose any
previous run data.
Scope None
Description The open_project command opens an existing project. You can use this
command to open any Tcl compliant project file which is saved in an earlier
sg_shell or Console session.
NOTE: Project file created prior to SpyGlass-4.2.0 release is not supported in
sg_shell as it is not Tcl compliant. To make this file Tcl compliant, open that project
file in Console UI 4.2.0 or 4.2.1 and save it.
When you open an existing project in sg_shell, it brings you back to the
same stage in which you last saved it. For example, in your last session, if
you left at the initial_rtl/lint/simulation goal inside the
GuideWare/New_RTL methodology, the open_project command
would restore the same stage and any data relevant for this goal would be
loaded.
In case you have specified link_design as the last command before saving
the project, sg_shell loads the Design_Read goal on opening that project
because Design_Read is the goal associated with the link_design
command.
You can configure the top setting at the time of using the open_project
command by setting an appropriate top using the set_option top
<top-name> command inside the project file. By default, this command
has the last active top at the time of saving the project. You can work on a
different top by changing this command as required.
It is recommended to open the project from the same directory where it was
last saved. This is required to take care of relative path references because
these would become invalid if the project is opened from a different path. If
there are relative paths in your project and a message is flagged about
directory mismatch while opening it, you should
1. close the project,
2. change your working directory as suggested in the message, and
3. open it again inside the sg_shell
At the time of opening a project, there could be some messages flagged for
dirty goals (goals having run data which is not consistent with the setup
information). This would happen if you have not saved the project in the
last session after changes being made to the goal setup. It is recommended
to re-run dirty goals as their message database is otherwise out-of-sync with
the saved setup information.
If there are any errors in the project file, the open_project command
fails to execute. Note that some command names in project files have
changed in SpyGlass 4.3.0. Project files generated from SpyGlass 4.2.0 or
4.2.1 are still supported, but if there is any error in these older project files,
the error messages would show the name of the new command name only.
Refer to the Deprecated Command Names and Their Corresponding New
Commands section for details of these command name changes. If you have
an old project file, it is recommended to open it in sg_shell and
immediately save it to get the updated project file with new command
names.
<project-name>
Specifies the name of the project file (.prj).
-projectwdir <project-path>
Specifies the project work directory where project run data would be
created. If you do not specify this argument, sg_shell considers the
project work directory as specified in the project file. If no project work
directory is found in the project file, sg_shell considers that
directory where the project file is present.
Scope Project
Description The save_project command saves the active project file. If the active
project file does not have Write permissions, the save_project
command fails to execute. You can specify a destination project file name to
save the current project, else the current project is saved with the same
name as the current project name. The save_project command does not
execute when the leaf level directory of the destination project file provided
does not exist or does not have write permission.
In case a project is saved to a different project file, the current project is
considered as saved only when the project file with which project was
opened does not have Write permissions. Else, the project is considered as
unsaved. When you attempt to close the project or exit the shell without
saving the project, sg_shell prompts you to save the project.
<destination-project-file-name>
Specifies the project file name to be saved
saved
- initial_rtl/lint/structure (Top:
test, Methodology: .)
Run results and settings for these goals
might not match on opening the project
next time
if you still want to close project, specify
close_project -force, or save the project
first
sg_shell> save_project project_copy
# save this project with the name as project_copy.prj
sg_shell> close_project
close_project: warning: project still unsaved
Following goals were run but have not been
saved
- initial_rtl/lint/structure (Top:
test, Methodology: .)
Run results and settings for these goals
might not match on opening the project
next time
if you still want to close project, specify
close_project -force, or save the project
first
sg_shell> save_project
sg_shell> close_project
Scope Project
-force
(Optional) Closes the project forcefully even if it is not saved. If a project
is closed forcefully, any settings done after the last save are lost. If some
goals have been run but not saved, run results and settings for such goals
might not match on opening the project next time.
Scope Project
Scope Any
Description The exit command quits the sg_shell session and returns to the Unix shell
prompt.
If there are any unsaved changes in the currently active project, sg_shell
prompts you to save those changes before closing the session. Further, if
there are any goals which were run but not saved, sg_shell informs the
same at this point. You can either save the project by using the save_project
command or forcefully close the session without saving the changes by
using the -force argument of this command. Optionally, you can specify
the -save argument to save the project while exiting. You will be
prompted if the project could not be saved. At this point, you cannot exit
unless you have specified the -force argument.
-save
Saves the current project if it is not saved
-force
Exits sg_shell even if the current project is not saved.
Example
sg_shell> new_project new
sg_shell> current_methodology $::env(SPYGLASS_HOME)/
GuideWare/IP_netlist
sg_shell> set_parameter abc 1
sg_shell> exit
exit: warning: project `new.prj' is not saved
(Use `save_project' to save it), or
(Use `close_project -force' to close it
forcibly), or (Use `exit -force' to exit
anyway, that is, without saving the project)
sg_shell> exit -save
% ls
Scope Any
Description The set_pref command is used to set the specified preference variable to
the specified value. The effect of the setting done is usually visible
immediately after setting the variable. Though this command can be
specified anywhere, the usual location is in sg_shell's startup file (i.e.,
$HOME/.sg_shell.startup or $CWD/.sg_shell.startup). Usually, the settings done
through set_pref commands are expected to remain for the entire
session of sg_shell, and that's why they make more sense in the startup files.
Currently, sg_shell has only one recognized preference variable, and that is
sh_command_log_file. More preference variables are planned to be added
in the future to provide a greater level of customization. The list of
recognized preference variables can be viewed by using the help -
preferences command. In addition, help for any particular preference
variable can be seen by using help -preferences
<variable_name>. Alternatively, you can enter man
<variable_name> to see the details of a particular preference variable.
<variable-name>
Specifies the name of the variable
<variable-value>
Specifies the value of the variable
NOTE: Both, variable-name and variable-value are mandatory.
Example The following example shows how to set the command log file name to a
unique file name.
Scope Any
Description The get_pref command is used to display the variable/value pairs for
known preference variables. If the variable_name is not specified, then
variable/value pairs for all those preference variables which have been set
either through the startup file, the sg_shell prompt, or any Tcl source file is
returned in a list. Otherwise, if the variable_name is specified, the
variable/value pair for the specified preference variable is returned in a list.
If a preference variable has not been set by the user, then its default value
(as in the software) is returned as variable/value pair in a list. Currently, the
use of wildcards is not supported in variable_name.
<variable-name>
Specifies the name of the variable
Example The following example shows how to display the variable/value pairs.
sg_shell> get_pref
sh_command_log_file ./sg_shell_command.log
sg_shell> get_pref sh_command_log_file
sh_command_log_file ./sg_shell_command.log
sg_shell> set_pref sh_command_log_file ./new_file.log
set_pref: info: command log file is now at `./
new_file.log'
(Previously, it was at `./sg_shell_command.log')
sg_shell> set_pref sh_command_log_file ./new_file.log
sg_shell> get_pref
sh_command_log_file ./new_file.log
sg_shell> get_pref sh*
Command Description
read_file Reads in the specified file for analysis
get_file Displays the names of various type of files added
remove_file Remove files of the specified type
set_option Sets the specified option to the specified value
get_option Displays value(s) set in the project for the specified option
remove_option Removes or unsets the specified option in the project scope
link_design Reads the design to check for design read errors
compile_design Synthesizes the design to check synthesis errors
Description The read_file command reads in the specified file for analysis.
Currently, all files (except the sourcelist type of files) are not read
immediately but rather stored in some object model. These files are read
when you run some goal. Files of the type sourcelist are read at the
time of command execution itself.
All files, except for sgdc files, are applicable to the currently selected
methodology and goal as well as to any methodology or goal that is selected
in future. However, for sgdc files, if you have specified the read_file
command after the current_goal command, sg_shell adds the specified sgdc
file to the currently selected goal only, and not to the other goals. If you
specify the read_file -type sgdc command outside the
current_goal command, sg_shell adds sgdc files to the complete project and
these sgdc files would be applicable to any goal in the current project.
-type
Specifies the type of file to be read. This argument accepts any of the
following values:
Type Description
verilog Specifies verilog files
vhdl Specifies vhdl files
def Specifies a def files
Type Description
hdl Specifies hdl files (verilog/vhdl/def)
gateslib Specifies gateslib files
sglib Specifies sglib files
lef Specifies lef files
plib Specifies plib files
sgdc Specifies sgdc files
waiver Specifies waiver files
sourcelist Specifies command files.
Only option allowed in the set_option command and file types
allowed in the read_file command are read from the files passed. In
case there is any syntax error in some file (due to error in command
file or some undefined variable in the file), contents of this file are
dropped, and no further files passed in the command are read.
<file-list>
Specifies a space-separated list of file names.
The file paths specified in this argument can be relative or absolute. In
case these are relative, the current sg_shell working directory should
match with the project current working directory at the time of opening
the project. The idea is that all relative paths should be relative to a
single base working directory which is the project's current working
directory.
The following sanity checks are performed on files that are specified in
the read_file command:
1. File should exist
2. File path should not be a directory
3. File should have read permissions for the current user
If any of the sanity checks fail, an error is flagged and the current read_file
command is ignored. Any file that has been already added (or any
Return Value An array of strings specifying list of files of the specified type
Description The get_file command displays the names of various types of files
added by using the read_file command.
For any file other than the sgdc type of file, the get_file command
displays the names all the files of given type as present in the project, and is
not context sensitive.
After selecting a goal, if you specify the value of the -type argument as
sgdc, sg_shell displays the names of sgdc files that are valid for the
selected goal only. However, when specified outside a goal, sg_shell
displays the names of all the global sgdc files present in the project.
-type <type>
Specifies the type of the files to be displayed. You can specify any of the
following values to this argument:
Type Description
hdl Displays all the hdl files (verilog/vhdl/def)
gateslib Displays gateslib files
sglib Displays sglib files
lef Displays lef files
plib Displays plib files
sgdc Displays sgdc files in given scope (project or goal)
waiver Displays waiver files
Example
sg_shell> read_file test.v
sg_shell> read_file test1.v
sg_shell> set x [get_file -type hdl]
test.v test1.v
sg_shell> puts $x
test.v test1.v
sg_shell> set y [lindex $x 0]
test.v
sg_shell> puts $y
test.v
Description The remove_file command removes files that have been added earlier
by using the read_file command.
Except for the sgdc type of file, the remove_file command removes all
the files of given type from the project and is not context sensitive.
In case of sgdc type of files, you can optionally provide a list of files
(<file-list>) to be specifically removed and it is context sensitive. If
this command is specified after selecting a goal, sg_shell removes all or
given sgdc files from the selected goal only. However, if this command is
specified outside a goal, sg_shell removes all or the specified sgdc files
from the project and all its goals (sgdc files locally added to specific goals
are not removed).
-type <type>
Specifies the type of files to be removed.
Following is the list of file types that can be specified to the -type
argument:
Type Description
hdl Removes all hdl files (Verilog/vhdl/def).
NOTE: You cannot remove individual hdl file types, such as verilog
or vhdl files. The complete HDL file set is removed.
gateslib Removes gateslib files
sglib Removes sglib files
lef Removes lef files
plib Removes plib files
sgdc Removes all or given sgdc files
waiver Removes waiver files
-<file-list>
Specifies list of sgdc files to be removed. List of files is not allowed with
any other file type other than sgdc. You will be informed in case any of
the file specified as part of file-list has not been already added by a
corresponding read_file command.
Scope Project
Description The set_option command sets the specified option to the specified
value.
The settings specified by this command are applicable for all goals. To set
an option for a particular goal scope, use the set_goal_option command.
The option value can be of the following types:
Type Description
Boolean If the option is of type boolean, the values for that option can be
<true|on|yes|1> which will get evaluated to 'true'. Similarly, the value
<false|off|no|0> will get evaluated to false.
If more than one value is specified for the boolean option, the last
alue would be considered as the final value. You will get a warning
about the multiple values specified in the boolean option.
List If the option is of type list, the values will be appended in the form of
a string list. The option value should be specified in curly braces { }.
String If the option is of type, string, and you specify more than one value
for the given string option, then the last value will be considered as
the final value. You will get a warning about the multiple values
specified in the scalar option.
If the option specified by using the set_option command is already set and
the option is of list type, sg_shell appends the value specified in the
option's value-list. Otherwise, it overwrites the existing option value.
Following sanity checks are performed on value (s) passed before an option
is set:
Invalid value specified in a boolean option
The following table lists various options that you can set by using this Tcl
command. The alias name, if available for a particular option, is written in
parentheses.
Option Description
87 Checks the design for IEEE standard 1076-1987
compliance
DEBUG Decompiles debug information about various
stages during a SpyGlass run
I Specifies the directories search path
LICENSEDEBUG Prints license debug information on the screen
addrules Selectively adds a rule in current goal
(addrule)
allow_celldefine_as_top Specifies to perform rule checking on 'celldefine
module top's hierarchy
allow_module_override Allows duplicate module/UDP definitions
cachedir Specifies the directory where library compilation
will be performed
cell_library Skip rule checking on design units loaded from
(cell_libraries) precompiled libraries
check_celldefine Turns on the rule checking on all the 'celldefine
modules
checkdu Specifies the design hierarchy (level) for rule
checking
checkip Specifies the design units for rule checking
define Adds the specified macro definitions
define_incr_dirmap Provides mapping for different locations of RTL
files
designread_synthesis_mode Specifies mode in which synthesis should be
performed
disable_encrypted_hdl_checks Disables RTL rule checking on the encrypted
design units
Option Description
disable_hdllibdu_lexical_checks Disallows lexical rule checking on precompiled
libraries
disallow_view_delete Disables the Large Design Processing Mode
dump_all_modes Enable both 32-bit and 64-bit pre-compiled HDL
(dump_all_mode) sources creation
dump_precompile_builtin Saves design parsing builtin messages in
precompile dump
elab_precompile Enables elaboration in single step
precompilation
enableSV Enables parsing of SystemVerilog constructs
enable_const_prop_thru_seq Allows constant propagation beyond sequential
elements during logic simulation
enable_gateslib_autocompile Enables automatic compilation of Synopsys
Liberty™ files (.lib files) to a SpyGlass-
compatible library file form (.sglib files)
enable_hdl_encryption Enables encryption of VHDL/Verilog libraries
during compilation
enable_inactive_rtl_checks Enables semantic checking capability in
(enable_inactive_rtl_check) SpyGlass
enable_pass_exit_codes Causes SpyGlass to print more detailed exit
status codes and messages
enable_pgnetlist Enables power and ground pin information to be
taken into consideration from specified physical
libraries
enable_precompile_vlog Enables the Precompiled Verilog library feature
enable_save_restore Enables the Design Save/Restore feature
enable_save_restore_builtin Restores design parsing, elaboration, and
synthesis messages in restore run
enable_sglib_debug Provides SpyGlass Library Compiler debug
Information
Option Description
extractDomainInfo Enables/disables extraction of domain info from
the sdc file during sdc to sgdc translation
force_compile Forces compilation of libhdlfiles
force_gateslib_autocompile Forces autocompilation of Synopsys Synopsys
Liberty™ files (.lib files) to a SpyGlass-
compatible library file form (.sglib files)
handlememory Specified to process memories in an optimized
manner
hdlin_synthesis_off_skip_text Interpret VHDL design code between Synopsys
synthesis_off/synthesis_on pragma pairsas
comments
hdlin_translate_off_skip_text Interpret VHDL design code between Synopsys
translate_off/translate_on pragma pair as
comments
hdllibdu Enables RTL and lexical rule checking on pre-
compiled Verilog/VHDL design units
higher_capacity Disables rules designed for SpyGlass version
3.2.0
ignorelibs Skips the rule checking for modules in the library
(ignorelib) files specified through v/y option
ignorerules Specifies the rule names or rule group names to
(ignorerule) be ignored in rule checking
ignore_undefined_rules Continue after issuing a warning message if an
(ignore_undefined_rule) undefined rule is specified
ignorewaivers Causes SpyGlass to ignore waivers supplied as
(ignorewaiver) embedded SpyGlass Waiver pragmas
incdir Searches the specified path for include files
inferblackbox Infer blackbox module interface based on the
blackbox instances in the synthesized netlist
Option Description
inferblackbox_rtl Infers blackbox module interface based on the
blackbox instances in the RTL description in
addition to the synthesized netlist
lang Specify the display language for messages and
waivers
language_mode Specifies language specification to use
lib Defines the logical to physical mapping for
referenced libraries
libext Specifies library file extensions
libhdlf Specifies mapping between specified logical
library and source-files for precompiled library
use
libhdlfiles Specify mapping between specified logical
(libhdlfile) library and HDL files for precompiled library use
libmap Defines the logical to intermediate library
mapping for referenced libraries
lvpr Specifies the maximum number of messages to
report
macro_synthesis_off Turns off the macro SYNTHESIS during design
read. By default, the macro is set on.
mthresh Specifies the bit-count threshold for the
compilation of net/ variables in a design unit
net_osc_count_limit Overrides the oscillation limits for nets. By
default, the oscillation count is set to 100.
nobb Forces SpyGlass to exit without processing if
any blackbox is found in the design
nodefparam Ignores explicit parameter re-definition given by
defparam Verilog construct
noelab Exit after design analysis and without
elaborating the design
Option Description
noispy Suppresses the generation of module schematic
data
nopreserve Forces SpyGlass to remove hanging/
unconnected instances and nets
noreport Suppresses report generation
norules Suppresses rule checking
(norule)
nosavepolicy Specifies the policy/policies that should not be
(nosavepolicies) saved during design save
nosch Suppresses the generation of schematic data by
rules
operating_mode Enables setting value of special variable
SG_OPERATING_MODE for SGDC conditional
compilation
overloadrules Overloads the severity or weight of a rule
(overloadrule)
param Sets the new user-specified values of the VHDL
generics and Verilog parameters
perflog Specifies to generate the SpyGlass
performance log
pragma Specifies a prefix-string for synthesis directives
preserve_mux Enables SpyGlass to pick mux cells from the
technology library
print Prints the list of sorted VHDL files
relax_hdl_parsing Performs relaxed VHDL semantic checking
remove_work Deletes the contents of the WORK directory
report Specifies the report format type to be generated
report_incr_messages Enables reporting of incremental messages
report_max_size Specifies the maximum number of messages for
sorted reports
Option Description
report_style Enables customization of report format
resetall Resets the Verilog compiler directive
default_nettype to language default which is
wire
rules Specifies the list of rules or rule group names for
(rule) which rule checking should be done
savepolicy Specifies the policy/policies that run during
(savepolicies) design restore
sdc2sgdc Enables the SDC-to-SGDC feature
sdc2sgdc_mode Specifies the mode of the SDC file to be
translated to SGDC
sdc2sgdcfile Specifies the file to save the output of SDC-to-
SGDC translation
sfcu Enables each file to be compiled as a separate
compilation unit
sgsyn_clock_gating Causes SpyGlass to create a simple clock
gating logic instead of creating a MUX-based
enable logic
sgsyn_clock_gating_threshold Specifies threshhold number (default 16) of flip-
flops beyond which SpyGlass creates a simple
clock gating logic
sgsyn_loop_limit Specifies the loop rolling limit during design
synthesis
show_lib Enables generation of messages for each library
module
skip_rules_for_fast_restore Enables skip of design's re-parsing and/or
resynthesis during design restore
sort Sorts & prints the design files before analyzing
sortrule Specifies the sort order for messages in
(sortrules) SpyGlass reports
Option Description
stop Skips rule checking on the specified VHDL
design unit or Verilog Module
stopdir Skips rule checking on all design units located in
a specified directory
stopfile Skips rule checking on all design units described
in a specified file
support_sdc_style_escaped_name Enable Synopsys-style escaped names in
SpyGlass Design Constraints files
target Specifies libraries to be used for technology
mapping out of the specified SGLIB libraries
top Specifies top of the design for sg_shell
translateIODelay Enables/disables translation of
set_input_delay/
set_output_delay in the sdc file to the
sgdc file during the sdc to sgdc translation
use_goal_rule_sort Sorts violation messages in SpyGlass reports
based on the order of rules specified in a goal
file
use_scan_flops Enables SpyGlass to pick scan flops from the
(use_scan_flop) technology library
v Specifies the library file used in the source
design
w Turns on generation of warnings for PERL-level
compilation
work Specifies the logical library directory for
compilation of Verilog/VHDL libraries
y Specifies the library directory containing libraries
<option-name>
Specifies the name of the option to be set
<value>
Specifies the value of the option being set
Example To generate the summary and inline reports, the report option can be set
by using the following command:
sg_shell> set_option report { "summary" "inline" }
To enable System Verilog constructs in verilog files, use the following
command:
sg_shell> set_option enableSV 1
get_option Displays value(s) set in the project for the specified option
Syntax Usage 1
get_option
Usage 2
get_option <option-name>
Scope Project
Description The get_option command displays the value(s) set for the specified
option. In case the option name is not given, sg_shell displays all the
options set in the project scope, otherwise it returns the option value of the
specified option.
If the option value is not set by using the set_option command, sg_shell
displays the default value, if present, for the specified option. If there is no
default value for that option, sg_shell displays an information message on
the screen informing you that the option has not been set. The control is
then returned to the sg_shell prompt. If you specify the wrong option
name, sg_shell displays an error message.
<option-name>
Specifies the name of the option whose value needs to be retrieved
Scope Project
<option>
Specifies the name of the option that needs to be removed or whose
value is to be unset.
Scope Methodology
Description The link_design command reads the complete user design as per
design files and options settings. This includes analyzing RTL files and
performing elaboration of the design.
You cannot execute this command in scope of a goal. You first need to
select the current_goal command with none before executing this
command. The link_design command internally invokes the
Design_Read goal and runs it.
You can configure the design hierarchy to be analyzed by using the
link_design command in the following manner:
If you want to analyze a specific top-level module hierarchy, specify that
top-level module by using the -top argument of this command.
If your design has multiple top-level modules and you want to analyze
all of them, specify the -alltop argument of this command.
If you want to focus on a specific top-level module during the current Tcl
session, it is best to set that top-level module by using the set_option
top <top-name> command. After the top-level module is set, the
link_design or current_goal/run_goal commands automatically
work on this top-level module only. Therefore, you need not explicitly
specify this top-level module in each of these commands.
-top <top-name>
Specifies top-level design modules with which the design needs to be run
-alltop
Specifies that the link_design command should be done with all the
top-level design modules in the design
NOTE: You cannot specify the -top and -alltop arguments together.
compile_design
Synthesizes the design to check synthesis errors
Syntax compile_design
[ -top <top-name> ]
[ -alltop ]
Scope Methodology
current_goal commands.
In case there is a single top-level module in the design, it would be
automatically set as a session top-level module once the
compile_design command gets completed. Subsequent
compile_design or current_goal/run_goal commands automatically
work on this top-level module only, and you need not have to explicitly
specify this top-level module in each of these commands.
When you have defined an implicit top-level module using the
set_option top <top_name> command and you want to alter top-
level module settings during a specific compile_design operation, you
can specify the -top or -alltop arguments, as desired, to work on a top-
level module different from the implicit top-level module or all top-level
modules in the design respectively.
NOTE: You can either synthesize a specific top-level module or all top-level
modules in the design, but not anything in between, such as two top-level modules if
there are ten top-level modules in the design.
You can choose the type of synthesis to be performed in
compile_design by using the following command:
set_option designread_synthesis_mode <synthesis_mode>
Depending on the type of synthesis to be performed,
<synthesis_mode> can take one of the following values :
base: Performs classical synthesis
opt: Performs optimized synthesis
techmap: Enables techmapping during synthesis
You can generate a report after specifying the compile_design
command to view the design read messages, and fix them before proceeding
ahead with the detailed analysis of your design. It is recommended that you
analyze all black boxes and provide appropriate models/constraints for them
to have more meaningful goal runs.
-top <top-name>
Specifies top-level design modules with which the design needs to be
run.
-alltop
Specifies that the compile_design command should be done with all
top-level design modules in the design.
NOTE: You cannot specify the -top and -alltop arguments together.
Command Description
current_methodology Loads the specified methodology
current_goal Loads the specified goals
set_goal_option Sets the specified goal option to the specified value
get_goal_option Get value(s) in the goal scope for the specified option
remove_goal_option Removes or unsets the specified option in the goal scope
get_run_option Gets values for the current run
set_parameter Sets the value of the specified parameter
get_parameter Gets the value of the specified parameter set in the current goal
run_goal Runs the selected goals
current_methodology
Selects a methodology
Syntax Usage 1
current_methodology
Usage 2
current_methodology [ <methodology-name> ]
Scope Project
<methodology-name>
Specifies the name of the methodology to be loaded
Scope Methodology
-goal <goal-list>
Specifies a list of goals to be run as part of the regression run
-top <top-name>
Specifies the top design unit with which goal needs to be run
-alltop
Specifies that goal should be run with all top-level modules in the design.
This option is specifically helpful if there is already a top-level module
set for the current session by using the set_option top <top-
name> command and if you want to run the given goal with all top-level
modules in the design.
NOTE: The -top and -alltop arguments cannot be specified together.
Example # test1.v has top test1 and test2.v has top test2
sg_shell> read_file test1.v test2.v
# run with top test1
sg_shell> current_goal initial_rtl/lint/connectivity -top
test1
sg_shell> run_goal
# run with both top test1 and test2
sg_shell> current_goal initial_rtl/lint/connectivity
-alltop
sg_shell> run_goal
# session top overriden by -alltop, no session top selected
so current_goal would fail
sg_shell> current_goal initial_rtl/lint/connectivity
# set test2 as top for current_goal specified without -top/
-alltop
sg_shell> set_option top test2
# run with top test2
sg_shell> current_goal initial_rtl/lint/connectivity
sg_shell> run_goal
# inform currently active goal
set_goal_option
Sets the specified goal option to the specified value
Syntax set_goal_option <option_name> <value(s)>
Scope Goal
Description The set_goal_option command sets the specified goal option to the
specified value to be used for the current goal.
Before using this command, you must select some goal first. To set an
option, which is not bounded to a goal, use the set_option command.
The option value can be of any of the following types:
Type Description
BOOLEAN If the option is of the type, boolean, the values for the
option can be <true|on|yes|1>, which get evaluated to
true. Similarly, values for this option can be
<false|off|no|0>, which get evaluated to false.
If more than one value is specified for the boolean
option, the last alue would be considered as the final
value. You will get a warning about the multiple values
specified in the boolean option.
LIST If the option is of type, list, the values are appended in
the form of a string list. The option value should be
specified in curly braces { }.
STRING If the option is of type, string, and you specify more than
one value for the given string option, then the last value
will be considered as the final value. You will get a
warning about the multiple values specified in the scalar
option.
If the option specified by the set_goal_option command already
exists and the option is of list type, sg_shell appends the value specified in
The following table lists various options that you can set by using this Tcl
command:
Option Description
DEBUG Decompiles debug information about various
stages during a SpyGlass run
addrules Selectively adds a rule in Current Goal
cell_library Skip rule checking on design units loaded from
precompiled libraries
check_celldefine Turns on the rule checking on all the 'celldefine'
modules
define_incr_dirmap Provides mapping for different locations of RTL
files
define_severity Defines a user-specified severity label
disable_encrypted_hdl_checks Disables RTL rule checking on the encrypted
design units
disable_hdllibdu_lexical_checks Disallows lexical rule checking on precompiled
libraries
dump_precompile_builtin Saves design parsing builtin messages in
precompile dump
enable_const_prop_thru_seq Allows constant propagation beyond sequential
elements during logic simulation
enable_inactive_rtl_checks Enables semantic checking capability in
SpyGlass
enable_pass_exit_codes Causes SpyGlass to print more detailed exit
status codes and messages
enable_save_restore_builtin Restores design parsing, elaboration, and
synthesis messages in restore run
enable_sglib_debug Provides SpyGlass Library Compiler debug
information
extractDomainInfo Enables/Disables extraction of domain info from
the sdc file during the sdc to sgdc translation
Option Description
hdllibdu Enables RTL and lexical rule checking on pre-
compiled Verilog/VHDL design units
ignore_undefined_rules Continue after issuing a warning message if an
undefined rule is specified
ignorelibs Skips the rule checking for modules in the library
files specified through v/y option
ignorerules Specifies the rule names or rule group names to
be ignored in rule checking
ignorewaivers Causes SpyGlass to ignore waivers supplied as
embedded SpyGlass Waiver pragmas
lvpr Specifies the maximum number of messages to
report
net_osc_count_limit Overrides the oscillation count limit for nets. By
default, oscillation count is set to 100
nodefparam Ignores explicit parameter re-definition given by
defparam Verilog construct
noispy Suppresses the generation of module schematic
data
noreport Suppresses report generation
norules Suppresses rule checking
nosch Suppresses the generation of schematic data by
rules
old_vdbfile Specifies path of previous Violation Database
file for consideration in Incremental Mode
operating_mode Enables setting value of special variable
SG_OPERATING_MODE for SGDC
conditional compilation
overload Runs the specified named overloads for all
specified policies
overloadpolicies Runs the specified policies with the overloaded
components
Option Description
overloadpolicy Runs the specified policies with the overloaded
components
overloadrules Overloads the severity or weight of a rule
perflog Specifies to generate the SpyGlass
performance log
preserve_mux Enables SpyGlass to pick mux cells from the
technology library
report Specifies the report format type to be generated
report_incr_messages Enables reporting of incremental messages
report_max_size Specifies the maximum number of messages for
sorted reports
report_style Enables customization of report format
rules List of rules or rule group names for which rule
checking should be done
sdc2sgdc Enables the SDC-to-SGDC feature
sdc2sgdc_mode Specifies the mode of the SDC file to be
translated to SGDC
sdc2sgdcfile Specifies the file to save the output of SDC-to-
SGDC translation
sortrule Specifies the sort order for messages in
SpyGlass reports
sgsyn_clock_gating Causes SpyGlass to create a simple clock
gating logic instead of creating a MUX-based
enable logic
sgsyn_clock_gating_threshold Specifies threshhold number (default 16) of flip-
flops beyond which SpyGlass creates a simple
clock gating logic
support_sdc_style_escaped_name Enable Synopsys-style escaped names in
SpyGlass Design Constraints files
target Specifies libraries to be used for technology
mapping out of the specified SGLIB libraries
Option Description
translateIODelay Enables/disables translation of
set_input_delay/
set_output_delay in the sdc file to the
sgdc file during the sdc to sgdc translation
use_goal_rule_sort Sorts violation messages in SpyGlass reports
based on the order of rules specified in a goal
file
w Turns on generation of warnings for PERL-level
compilation
<option-name>
Specifies the name of the goal option.
<value(s)>
Specifies a space-separated list of values for the goal option.
Example To generate a summary report for the currently selected goal, report option
can be set by using the following command on the sg_shell prompt:
sg_shell> set_goal_option report { "summary" }
To ignore rules W19 and W467 in the currently selected goal, the
ignorerules option can be set as follows:
sg_shell> set_goal_option ignorerules { "W19" "W467" }
get_goal_option
Get value(s) in the goal scope for the specified option
Syntax Usage 1
get_goal_option
Usage 2
get_goal_option <option-name>
Scope Goal
Description The get_goal_option command gets the option value(s) set for the
specified option in current goal. To use this command, some goals must be
selected first. To get option value set at project scope, use the get_option
command. When the <option_name> is not specified, sg_shell
displays all the options set for the current goal scope, otherwise it returns
the value set for the specified option in current goal.
In case the option value is not set by using the set_goal_option command,
sg_shell returns the default value, if present, for the specified option. If the
option does not have a default value, sg_shell does not print anything on
the screen, and returns the control back to the sg_shell prompt. If you
specify the wrong option name, sg_shell displays an error message.
<option-name>
Specifies the name of the option whose value needs to be displayed.
simple drag
sg_shell> set_goal_option report { inline }
sg_shell> puts [ get_goal_option report ]
simple drag inline
remove_goal_option
Removes or unsets the specified option in the goal scope
Syntax remove_goal_option <option-name>
Scope Goal
<option-name>
Specifies the name of the option.
get_run_option
Gets values for the current run
Syntax Usage 1
get_run_option
Usage 2
get_run_option <option-name>
Scope Project
Description The get_run_option command gets the option value(s) that would be
used in the current run for the specified option name. When the
<option_name> is not specified, sg_shell displays all the options
and their values that sg_shell would use for the current run, otherwise it
returns the value (s) for the specified option only.
In case the option value is not set by either using the set_option command or
set_goal_option command, sg_shell returns the default value, if present, for
the specified option. However, if the specified option does not have a
default value, sg_shell does not print anything on the screen and returns
the control back to the sg_shell prompt. If you specify the wrong option
name, sg_shell displays an error message.
The get_run_option command combines the results of the get_option
and get_goal_option commands. If an option can be set by using the
set_option/set_goal_option commands only, the result of this command is
identical to that of the get_option/get_goal_option commands respectively.
<option-name>
Specifies the name of the run option whose value(s) is to be retrieved.
Usage 2:
set_parameter <param-name> -default
Description The set_parameter command sets the value of the specified parameter.
A parameter which is set after selecting a methodology is applicable to all
goals of the selected methodology. A parameter set in methodology scope
can be overridden with a new value after selecting a goal. If the value of the
parameter is changed in goal scope, it does not affect the value of that
parameter in the methodology scope. If a parameter is not set in current
goal, its value is inherited from the methodology scope of the goal.
A parameter may have a default value. You can review the current value
versus the default value for each parameter as part of the report generated
by using the write_report goal_setup command. Alternatively,
you can use the get_parameter ALL command to view this
information. Please note that these commands are valid for goal scope only.
It is recommended to enclose the parameter value in curly braces ({}) so
that any Tcl specific interpretation is not applied on it. Further, the value
should be specified exactly as on SpyGlass command-line. For example,
consider the following command in SpyGlass:
-synchronize_data_cells="sync2sdffcq_f4_d?"
The above command in sg_shell prompt should be specified as follows:
sg_shell> set_parameter synchronize_data_cells
{sync2sdffcq_f4_d?}
If the parameter is boolean, that is, specified with no =<param-value>
<param-name>
Specifies the name of the parameterto be set
<param-value>
Specifies the value of the parameter
-default
Sets default value for the specified parameter in the goal scope. This
option has no meaning in the methodology scope and is therefore not
allowed in the methodology scope.
get_parameter Gets the value of the specified parameter set in the current goal
Syntax Usage 1
get_parameter
Usage 2
get_parameter <param-name>
Description The get_parameter command gets the value of the specified parameter
in the current scope (methodology or goal).
In the methodology scope, this command returns parameter value as
applicable to all goals of the methodology. In the goal scope, this command
returns parameter value as applicable to the current goal. If a parameter is
not set in the current goal, its value is inherited from the methodology
scope. If the parameter name is not specified, the get_parameter
command returns the value for all the parameters applicable in current
scope.
In case the parameter value is not set by using the set_parameter command,
sg_shell returns the default value, if present, for the specified parameter.
However, if the parameter does not have a default value, sg_shell does
not print anything on the screen and returns the control back to the
sg_shell prompt. The same thing happens if you specify a wrong
parameter name as there is no sanity check done on the parameter name.
However, a message is printed on the screen when you specify an
unregistered or obsolete parameter after selecting a goal.
<param-name>
Specifies the name of the parameter whose value needs to be retrieved.
Scope Goal
Description The run_goal command runs the currently selected goal with the
currently selected top. This command runs all the rules as specified in the
goal.
NOTE: By default, the SpyGlass save-restore feature is enabled during
run_goal. To turn off this feature, specify the set_option
enable_save_restore false command. This command turns off the
save-restore feature for the complete project. Therefore, goals will be run with this
feature turned off.
The run_goal command normally prints lots of messages on the screen.
You can re-direct its output to a file by using shell re-direction operator, >,
or capture it in some file by using the capture command.
Reporting Commands
Commands under this group allow you to customize the message set, and
generate custom, standard, or policy specific reports.
Following are the reporting commands:
Command Description
define_filter Defines a criteria to filter a set of messages from the set of
all generated non-waived messages
define_view Defines how the selected output should be displayed
define_report Defines a new report of the specified name
write_report Generates the specified report
write_aggregate_report Generates the specified aggregate report
define_filter Defines a criteria to filter a set of messages from the set of all
generated non-waived messages.
Syntax define_filter
-name <filter-name>
[ -filter <filter-list> ]
[ -du <design-unit-list> ]
[ -ip <ip-list> ]
[ -file <file-list> ]
[ -file_line <file> <line> ]
[ -file_lineblock <file> <start-line> <end-line> ]
[ -severity <severity> ]
[ -rules <rules> ]
[ -msg <message> ]
[ -except <list of rules/groups or keywords> ]
[ -weight <weight> ]
[ -weight_range <weight-start> <weight-end> ]
[ -regexp ]
[ -invert ]
Description The define_filter command filters a set of messages from the pool of
all non-waived messages. The filter can be used to define the schema of a
report or used as an input to consequent filter definitions. It enables to
define set of messages that you want to view in a specific report.
If there is no filtering criteria specified and just define_filter -name
<filter-name> is specified, the specified <filter-name> holds all
non-waived messages. Please note that the filtering works on non-waived
messages only. If there are any messages already waived at the time of
run_goal, those are ignored by this command.
This command has many options which are identical to the waive
command. For example, -du, -ip, -file, -file_line, and others
behave in the same manner as in the waive command. The only difference
is that in the define_filter command, these options allow to get the
message list to be viewed, whereas it is opposite in context of the waive
command.
sg_shell does not perform any sanity check on various options of the
define_filter command. Therefore, you should re-check your
specification if there is any mismatch in the filtered set.
NOTE: Most of the arguments of this command are there in the SpyGlass waive
command also. Please refer to the Waiving Messages section in SpyGlass
Predictive Analyzer User Guide for more details.
-name <filter-name>
Specifies the name of the filter. If the filter with same is already defined,
it is overwritten by the current definition.
-filter <filter-list>
(Optional) Specifies the name of filters defined earlier by using the
define_filter commands. If you want to start from a filtered set,
this argument accepts those previously defined filter names. If you
specify multiple filter names, union of messages filtered by them is
considered as the starting point for further filtering. All generated
messages are considered if this argument is not specified.
-du <design-unit-list>
(Optional) Specifies space-separated lists of design unit names (module
names for Verilog or architecture names in the format
<entity-name>, for the entity and all its architectures, or in the
<entity-name>.<arch-name> format for the entity and the
specified architecture, package names, or configuration names for
VHDL) or the logical library name of a pre-compiled Verilog/VHDL
library. Use the -du argument to filter the rule messages for the
specified design units or all design units in the specified library. Please
note that messages reported on the specified design units are filtered by
this argument.
-ip <ip-list>
(Optional) Specifies space-separated lists of design unit names (module
names for Verilog or architecture names in the <entity-name>
format, for the entity and all its architectures, and in the
<entity-name>.<arch-name> format for the entity and the
specified architecture, package names, or configuration names for
VHDL) or the logical library name of a pre-compiled Verilog/VHDL
library. Use the -ip argument to filter the rule messages for the
specified design units (IP blocks) or all design units in the specified IP
library.
-file <file-list>
(Optional) Specifies a space-separated list of source file names. Use this
argument to filter all messages for the specified files.
-severity <severity>
(Optional) Specifies the actual severity-label or severity class.
-rules <rules>
(Optional) Specifies a space-separated list of rule names, rule group
names, or policy mnemonics. Use this argument to filter messages of the
specified rules, rule groups, policies or by rule type keywords. Following
are allowed keywords:
ALL
ALL_INFO
ALL_ELAB
ALL_SYNTHERR
ALL_SYNTHWRN
ALL_WRN
-msg <message>
(Optional) Specifies the actual rule message. Use this argument to filter a
message. You should specify the message in this argument in curly
braces {} to prevent any Tcl interpretation being applied on it. For
example, a bit-select, top.i1.n1[0], would be taken as command
"0", therefore, always enclose your message in {} for it to read
verbatim.
-except <rule-list>
(Optional) Specifies a space-separated list of rule names, rule group
names, or policy mnemonics. Use this argument to exclude messages of
the specified rules, rule groups, or policies or by rule type keywords
from the filtered set. The allowed keywords are same as in -rules
argument.
-weight <weight>
(Optional) Specifies the actual rule weight value. Use this argument to
filter the messages of the rules with the specified weight.
-regexp
(Optional) Turns on regular expression matching for various fields. This
argument allows the use of regular expressions in many other arguments,
such as -du, -ip, -file, -file_line, -file_lineblock, and
-msg.
-invert
(Optional) Inverts the filtered selection. If the complete message set is
100 messages and set without -invert has 20 messages there would be
remaining 80 messages in the filtered set if the -invert argument is
specified.
Scope Any
Description The define_view command defines the sorting and grouping criteria for
a set of messages selected by the specified filter. This command also defines
the fields to be displayed.
-name <view-name>
Specifies the name of the view. This name is then later used by the
define_report command. If the view with the same name is already
defined, it is overwritten by the current definition.
-header <header-string>
Specifies the header string of the view being created.
-filter <filter-name>
Specifies the name of the filter as created by using the define_filter
command. Messages filtered by the specified filter are part of the current
view. If you do not specify this argument, all messages are considered as
part of current view.
-display <fields-list>
Specifies the list of fields to be displayed. Following are the allowed
values:
policy
rule
alias
severityclass
severitylabel
weight
file
line
message
du
The fields are displayed in the order specified in this argument. If you do
not specify this argument, sg_shell consider the default value as the
following:
1. rule
2. alias
3. severitylabel
4. file
5. line
6. weight
7. message
If there is a grouping criteria specified, you can skip displaying those
fields, as all the messages of a group would have same values for these
grouped fields. In addition, these grouped field values are also displayed
as part of the group header.
-sort <fields-list>
(Optional) Specifies the list of fields on the basis of which the output is
sorted. Following are the allowed values:
message_id
builtin
policy
rulegroup
rule
alias
severityclass
severitylabel
weight
file
line
message
du
By default, sg_shell does no sorting on the messages. For string values,
sorting is done alphabetically ascending (in case-sensitive manner),
whereas it is numerically ascending for numeric fields. However, for
numeric field - weight, sorting is done in descending order of weight. In
case of sorting based on severityclass, the order is FATAL, ERROR,
WARNING, and INFO. This difference is there for weight and
severityclass, so that more severe messages come on the top after
sorting.
If there is grouping done on any of the above fields, you can skip that
field in the sorting criteria, since all messages of any group would have
same value for that field.
-group <fields-list>
(Optional) Specifies the list of fields on the basis of which grouping is
required. Following are the allowed values:
builtin
policy
rulegroup
rule
alias
severityclass
severitylabel
weight
file
line
message
du
goal
The filtered messages are first grouped as per the grouping criteria and
then each group is sorted as per the sorting criteria. If grouping is done
based on multiple fields then each group has messages where those
multiple fields have the same value for all messages. Further, each group
has a header containing the grouped fields values for the current group.
Scope Any
-name <report-name>
Specifies the name of the report. If the report with same name is already
defined, it is overwritten with the current definition.
-view <view-list>
Specifies a list of view names as defined by the define_view command.
You should have previously defined the view names listed here by using
the define_view command.
-helpfile <help-file>
Specifies the name of the help file containing the help of the report.
Scope Goal
clock_reset_integrity
sg_shell> write_report goal_setup
# goal setup report
write_aggregate_report
Used to generate the specified aggregate report
Syntax write_aggregate_report <report_name>
[-config_file <file_path>]
[-reportdir <output_directory>]
Scope Any
-config_file <config_file>
Specifies a configuration file having project files path for which the
aggregate report needs to be generated. If this argument is not specified,
then by default, the aggregate report is generated for the current project.
An error is displayed if you specifiy this argument when there is no current
active project.
Debug Commands
Commands under this group allow you to debug messages. Currently, you
can open the Console UI to debug messages via schematic, waveform etc.
Following are the debug commands:
Command Description
gui_start Invokes SpyGlass Console
help Displays help for a particular command/item
Scope Any
Description The gui_start command invokes Atrenta Console with the currently
active project. This command allows you to go back and forth between the
shell environment and the GUI interface to interactively debug design
issues.
Before launching GUI, current project is saved and closed. If project could
not be saved, this command fails to execute unless you specify the -force
argument. After you exit Console GUI, sg_shell reloads the last active
project at the time of launching GUI. If there are any changes done in the
GUI environment and saved at the time of GUI exit, those changes are
visible when control comes back to the sg_shell prompt.
You can debug messages inside the GUI environment via schematic,
waveform etc., update project settings/fix RTL to resolve these messages,
and come back to the sg_shell prompt once the debugging is over.
-force
(Optional) Closes the current project and starts GUI even if the project
was not saved successfully.
Scope Any
Return Value All the invocations, when done without a pattern but by using the -list
argument, sg_shell returns an array of strings specifying the available
values for the requested category (such as goals and methodology).
Description The help command displays the help for a particular command/item. This
command is like the usual shell's help command. It is used to know the
usage of any sg_shell command/item. The help command can be used
for any of the following purposes:
To show the list of commands under help
To show the usage of a particular command
To show the list of methodologies available
To show the help of a particular methodology
To show the list of goals available
To show the help of a particular goal
To show the list of rules available
To show the help of a particular rule
To show the list of parameters in current scope
To show the help of a particular parameter
To show the list of constraints in current scope
To show the help of a particular constraint
Example
sg_shell> help new_project
new_project # starts a new project
Usage:
new_project <prj_name> [-projectwdir <path>] [-force]
Usage:
new_project <prj_name> [-projectwdir <path>] [-force]
Options:
-force # do not ask user for confirmation
-projectwdir <path> # directory to store all the project
related data
<project> # project file name for the new project
Miscellaneous Commands
This section lists miscellaneous commands related to shell features.
Following are the miscellaneous commands:
Command Description
capture Captures output (stdout/stderr) of script to a file
show_error Displays the last error that occurred during a particular command
invocation along with its trace
alias Creates an alias for a group of word(s)
unalias Removes an alias set for a group of word(s)
benchmark Monitors run-time and memory usage between two designated check
points in sg_shell
Scope Any
Description The capture command redirects the output (stdout/stderr) of the specified
command, <command-string>, to the specified output file,
<output-file>. Here, <command-string> must be provided in
curly braces {}.
If there is any error generated by a command, that error is also captured in
the specified file depending on whether error is flagged on stdout/stderr.
The capture command is useful to store the output of commands
generating voluminous output, such as the link_design, run_goal, and
write_report commands.
-stdout
(Optional) Redirects stdout to the specified output file.
-stderr
(Optional) Redirects stderr to the specified output file.
-append
(Optional) Appends the output to the specified output file. If the
specified output file does not exist, sg_shell creates that output file.
<output-file>
Specifies the output file in which the output is to be stored.
<command-string>
Specifies one or more command strings.
show_error Displays the last error that occurred during a particular command
invocation along with its trace
Syntax show_error
Scope Any
Description The show_error command displays the last error that occurred during a
particular command execution along with its trace.
Scope Any
Description The alias command creates an alias for a group of words, the first of
which should be an existing command. This command is like the usual Unix
shell's alias command.
The alias command can be used in the following ways:
To display the list of existing aliases
Specify the alias command without any argument to display a list of
existing aliases. This command returns nothing.
To display the value of a particular alias
Specify the command, alias <alias-name>, to display the value of
the specified alias (<alias-name>). This command returns nothing.
To create a new alias
Specify the command, alias <alias-name> [ <expansion> ],
to create a new alias of the specified name (<alias-name>), which
expands to the words as specified in the expansion (<expansion>).
This command returns the string, <alias-name>.
sg_shell> ho
sg_shell> alias
[ho] -> help -option
[np] -> new_project start.prj -projectwdir ./start
[quit] -> exit
sg_shell> alias np
[np] -> new_project start.prj -projectwdir ./start
Scope Any
Description The unalias command unalias a previously set alias for a group of words.
This command is similar to the unix shell's unalias command.
Scope Any
Return Value Returns a data object when the -start argument is specified
Returns nothing when the -show argument is specified
Description The benchmark command monitors runtime and memory usage at various
stages. The benchmark data shown is calculated with respect to some
previous check points as marked by the benchmark -start command.
Therefore, sg_shell first determines a check point by using the
benchmark -start point-1 command, and store the result in some
variable. Then, at a later time, whenever you wish to see the details such as
memory usage and runtime, with respect to the check-point "point-1", you
can specify the command, benchmark -show $data.
The invocation benchmark -start point-1 returns a list containing
some data. The contents are like the following:
{ malloc'ed-memory heap-memory user-time system-time
cpu-time elapsed-time check-point-name }
The data in the above list denotes the absolute figures at the time of fetching
this list. This list should be stored in some variable, say
check_point_start_data. This variable should be used to see the
incremental statistics at any later stage by using the command,
benchmark -show $check_point_start_data.
-h
(Optional) Prints memory figures in human readable units, such as KB
and MB).
-show <data-object>
(Optional) Displays the information for the specified data,
<data-object>.
-start <check-point-name>
(Optional) Marks a start check point for benchmarking.
sg_shell> link_design
.
.
.
sg_shell> benchmark -show $lnk_dsg_data
Benchmark (memory/time related) information
-------------------------------------------
check-point: link_design_start
malloc'ed memory = 35426708 bytes ( 24418400 bytes )
heap size = 118157312 bytes ( 29278208 bytes )
user time = 2.480 sec ( 2.370 sec)
system time = 1.060 sec ( 0.950 sec)
cpu time = 3.540 sec ( 3.320 sec)
Note: figures in the parentheses show incremental data wrt
the nearest check-point named 'link_design_start'
(Use '-h' for human readable units)
Solution: Re-run goal whenever waivers are changed. This problem is expected to
be fixed in a future release.
Problem: Ctrl-Z not supported in Tcl shell
Description: If you are on sg_shell prompt, and you open a file using vim as
shown below:
sg_shell> vim output.log
In the above case, you are working in vim and if you press CTRL-Z, this will
suspend the vim session as well as the sg_shell session, and you will return to your
native shell (tcsh etc.).
However, when you do an "fg" or "%" to resume the suspended job, then it should
take you to the vim session (or at least to the sg_shell session). In this case,
there is some known issue and it does not allow you to type anything on the shell,
or if you are able to type in something then that command will not be honoured.
Solution: It is recommended to start unix shell from within sg_shell by typing
tcsh or sh etc. (depending on the shell you want to start), and then exit this unix
shell whenever you want to return to sg_shell.
Problem: DesignWare is not supported in Tcl shell
Description: The set_option dw true command is not supported in Tcl
shell. DesignWare involves multiple design read passes to identify DesignWare
components, and then fill their definitions. Therefore, it is not supported currently
in Tcl shell. However, if you have a netlist for DesignWare components generated
from earlier SpyGlass runs or otherwise, then you can directly use the netlist for
DesignWare components in the Tcl shell.
Solution: Generate DesignWare components definition outside of Tcl shell, and
then feed it directly by using appropriate read_file command.
Problem: Custom reports do not work directly for goals run from Console.
Description: There is a separate message database created in sg_shell which
helps you to query message database. This database is not generated by default in
the Console runs. Therefore, if you want to use sg_shell and Console UI/BATCH
together and generate custom reports, please set following environment variable
before invoking Console UI/BATCH:
% setenv SPYGLASS_SMDB_SUPP 1
This would create the necessary message database so that you can re-use the run
results from Console inside the sg_shell.
Solution: Either set the specified environment variable prior to Console invocation,
or re-run goals inside sg_shell prior to custom report generation.
Problem: Tab completion does not work if space is first character
Description: sg_shell supports tab completion which let you choose from the
displayed list as you are typing the partial string. However, this feature does not
work if space is the first character on sg_shell prompt.
Solution: Please be aware of this behavior.
Problem: Tcl shell re-direction operators, > and >>, are not supported for Tcl
built-in commands or procedures.
Description: Tcl shell re-direction operator, >, is not supported for Tcl built-in
commands or procedures. This is, however, supported for Tcl shell commands
listed by using the help command. Further, UNIX shell re-direction operator, >>, is
not supported for append operation in Tcl shell. Use the capture -append Tcl
command to implement the append operation.
Solution: Please be aware of this behavior.
Problem: DDR goal not supported in Tcl shell
Description: If there is a goal referring to multiple designs in a single run where
one is a reference design and other is the implementation design, such goals are not
supported in Tcl shell currently.
Solution: This problem is expected to be fixed in a future release.
Problem: Error messages on old project files have new command names only
Description: Some of the command names in project files have changed in
SpyGlass 4.3.0 release. Project files generated from SpyGlass 4.2.0 or
SpyGlass4.2.1 are still supported, but if there is any error in these older project
files, the error messages would show the name of the new command names only.
Solution: Use the new command names only. Further, if there are any old project
files, open them in sg_shell, and save back to get updated project files with new
command names.
Problem: Wildcard support is not present for the read_file and remove_file
commands
Description: Currently, wildcard is not supported for the read_file and remove_file
commands. Therefore, you should provide the expanded list in these commands.
Solution: You can use Tcl glob function to expand the wildcard as follows:
sg_shell> set temp [glob *.v]
sg_shell> read_file -type verilog $temp # read all *.v files
Problem: Help for rules, parameter, and sgdc is not available without goal
selection
Description: There is the help command available in sg_shell to view the help
for commands, methodology, goal, rules, options, parameters, sgdc, and reports.
You can get help for rules, parameters, and sgdc only after a goal has been selected.
These objects are not available outside of goal scope.
Solution: Please be aware of this behavior.
Problem: Error message during capture would come in the captured file and not on
the screen
Description: The capture command can be used to re-direct output of some other
command to the specified file. If there are any errors reported during execution of
that command, those error messages are also captured in the specified file and are
not displayed on the screen. For example, consider that an error has been reported
during the execution of the write_report <rpt_name> command as part of
following command:
sg_shell> capture my.rpt {write_report <rpt_name>}
In this case, the error is captured in the my.rpt file itself.
Solution: Please be aware of this behavior.
Problem: Hierarchical SGDC migration flow is not supported inside Tcl shell
Description: Options gen_hiersgdc and validate_hiersgdc are not
supported.
Solution: In classic batch, perform SGDC migration using the gen_hiersgdc
and validate_hiersgdc options. Then, use these migrated sgdc files inside
Tcl shell.
Problem: Boolean options set using set_option not unset in goal scope with
set_goal_option
Description: If there is a boolean option set in global scope for all goals using
set_option, then it can't be unset in goal scope using set_goal_option. For example,
consider the following.
sg_shell> set_option ignorelibs yes
sg_shell> current_goal initial_rtl/lint/synthesis
sg_shell> set_goal_option ignorelibs no
sg_shell> run_goal
In the above case, even if ignorelibs is being set to no inside goal scope, it
would still be treated as yes during run_goal. This problem is there with only
boolean options.
Solution: It is currently recommended that if a specific boolean option is intended
to be turned on/off on per goal basis, then set it inside goal scope only, and not have
it set globally using set_option.
Problem: Support for optional & pre-requisite goal in Tcl shell
Description: The following problems exist:
• Optional goal support in sg_shell: When optional goal preference
is ON through the configuration file, optional goals are not visible in
Tcl shell as part of goal_summary report, wildcard match, and
help -goal.
• Pre-requisite goal support in sg_shell: When pre-requisite goal
preference is ON, Tcl shell does not provide feedback to a user even
if a pre-requiste goal has not been run prior to running the main goal.
Solution: This problem is expected to be fixed in a future release.
sh_command_log_file Specifies the path name for sg_shell's command log file
Syntax set_pref sh_command_log_file "./mycommands.log"
Scope Any
Example The following example shows how to display the variable/value pairs.
You start the sg_shell as:
unix_shell> sg_shell
sg_shell> help
...
...
sg_shell> open_project xyz.prj
...
sg_shell> run_goal
...
sg_shell> set_pref sh_command_log_file "new_log_file.log"
set_pref: info: command log file is now at
`new_log_file.log'
(Previously, it was at `./sg_shell_command.log')
sg_shell> close_project
...
sg_shell> exit
Considering the sequence above, the contents of default log file (./
sg_shell_command.log) will be:
------------------------------------------------
help
open_project xyz
run_goal
set_pref sh_command_log_file "new_log_file.log"
------------------------------------------------
and, the contents of new log file (that is, "new_log_file.log") will be:
------------------------------------------------
close_project
exit
------------------------------------------------
sg_shell> pwd
/u/sam/prj
sg_shell> exec ls ./logs/
other_cmds.log
sg_shell_command.log
sg_shell> set_pref sh_command_log_file "/u/sam/prj/logs/
today/sg_shell_command_[clock seconds].log"
set_pref: error: could not open `/u/sam/prj/logs/today/
sg_shell_command_1255417358.log' for writing
(Please re-check the value of `sh_command_log_file'
variable)
sg_shell> get_pref
sh_command_log_file ./sg_shell_command.log
sg_shell>