0% found this document useful (0 votes)
4 views14 pages

Lib Compiler

This document outlines the invocation commands for the Library Compiler Tool, detailing the syntax and arguments for commands such as icc2_shell and lc_shell. It provides information on how to execute scripts, manage command line options, and handle various data types and expressions within the tool. The document serves as a comprehensive guide for users to effectively utilize the Library Compiler Tool's functionalities.

Uploaded by

navz_aqua007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views14 pages

Lib Compiler

This document outlines the invocation commands for the Library Compiler Tool, detailing the syntax and arguments for commands such as icc2_shell and lc_shell. It provides information on how to execute scripts, manage command line options, and handle various data types and expressions within the tool. The document serves as a comprehensive guide for users to effectively utilize the Library Compiler Tool's functionalities.

Uploaded by

navz_aqua007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Library Compiler Tool Invocation

Commands
Version W-2024.09-SP3, January 2025
Feedback

Contents

1. Library Compiler Tool Invocation Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


icc2_shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
lc_shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
libdb2parquet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
synopsys_users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2
Feedback

1
Library Compiler Tool Invocation Commands
This document describes the tool invocation commands supported by the Library Compiler
tool.

icc2_shell
Runs the IC Compiler II tool.
Syntax
icc2_shell
[-file file_name]
[-python]
[-no_init]
[-no_local_init]
[-no_home_init]
[-no_log]
[-no_motd]
[-x command_string]
[-version]
[-batch]
[-dp_mode]
[-gui]

Data Types
file_name string
command_string string

Arguments
-file file_name
Runs the specified script before displaying the initial icc2_shell prompt. If the last
command in the script file is quit, no prompt is displayed and the command shell
exits after running the script.
-python
Starts the tool in Python rather than Tcl mode. When Python mode is enabled
the -x option expects a Python statement and the \B-file\P expects a Python file

Library Compiler Tool Invocation Commands 3


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
icc2_shell

as input. The interactive prompt is also Python rather than Tcl. For details on
Python support in the tool see the py_eval\P man page.
-no_init
Prevents the execution of any .synopsys_icc2.setup startup files before
displaying the initial icc2_shell prompt. This option is only used when you want
to include a command log or other script file to reproduce a previous icc2_shell
session. Include the script file either by using the -file option or by issuing the
include command from within the icc2_shell.
-no_local_init
Does not run any .synopsys_icc2.setup startup files from local directory path
before displaying the initial icc2_shell prompt.
-no_motd
Does not print the message of the day.
-x command_string
Executes the icc2_shell commands before displaying the initial icc2_shell
prompt. You can enter multiple commands by separating each command with
a semicolon and enclosing the entire set of commands with quotation marks. If
you also use the -file option, the tool executes the commands specified in the
-x option first, and then executes the script specified in the -file option. If the
last command in the set of commands is quit, no prompt is displayed and the
command shell exits after running the commands.
-version
Displays the version number and build date information, and then exits.
-batch
Exits after processing -file file_name and/or -x command_string. This also sets
the gui.batch_x_display option to offscreen. If you start the GUI in a batch run
using this setting, it does not require a DISPLAY and no windows are shown on
your DISPLAY. This is recommended while generating screenshots in your batch
flows.
-dp_mode
Starts the shell in Design Planning mode. In this mode, a limited functionality set
is available for Design Planning only.
-gui
Invokes the IC Compiler II GUI immediately upon startup.

Library Compiler Tool Invocation Commands 4


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
lc_shell

Description
This command starts the IC Compiler II shell, icc2_shell, which interprets and executes IC
Compiler II commands. The icc2_shell command interpreter is based on Tool Command
Language (Tcl).
The shell executes commands until it is terminated by a quit or exit command. In
interactive mode, you can also terminate the icc2_shell session by typing Ctrl+d.
To cancel (interrupt) the command currently executing in icc2_shell, type Ctrl+c. The time
it takes for a command to process an interrupt (stop what it is doing and continue with the
next command) depends upon the size of the design and the type of command. If you type
Ctrl+c three times before a command responds to the interrupt, icc2_shell displays the
following message and exits:
Information: Process terminated by interrupt.

lc_shell
Runs the Library Compiler command shell.
Syntax
lc_shell
[-f script_file]
[-x command_string]
[-no_init]
[-version]

Data Types
script_file string
command_string string

Arguments
-f script_file
Executes script_file (a file of lc_shell commands) before displaying the initial
lc_shell prompt. If the last statement in script_file is quit, no prompt is displayed
and the command shell is exited.
-x command_string
Executes the lc_shell statement in command_string before displaying the initial
lc_shell prompt. Multiple statements can be entered, each statement separated
by a semicolon. See the Multiple Statement Lines and Multiple Line Statements
subsection of this manual page. If the last statement entered is quit, no prompt
is displayed and the command shell is exited.

Library Compiler Tool Invocation Commands 5


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
lc_shell

-no_init
Tells the lc_shell not to execute any .synopsys_lc.setup startup files. This option
is only used when you have a command log or other script file that you want to
include in order to reproduce a previous Library Compiler graphical interface or
lc_shell session. You can include the script file either by using the -f option or by
issuing the include command from within lc_shell.
-version
Displays the version number, build date, site identification number, local
administrator, and contact information, and then exits.
Description
Interprets and executes library compiler commands. The lc_shell environment consists of
user commands and variables that control the creation and manipulation of libraries
The lc_shell executes commands until it is terminated by a quit or exit command. During
interactive mode, you can also terminate the lc_shell session by typing Control-d.
To cancel (interrupt) the command currently executing in lc_shell, type Control-c. The time
it takes for a command to process an interrupt (stop what it is doing and continue with
the next command) depends upon the size of the library and the type of command. If you
enter Control-c three times before a command responds to the interrupt, lc_shell exits and
the following message is displayed:
Information: Process terminated by interrupt.
There are three basic types of statements in lc_shell:
- assignment
- control
- command

Additionally, there are seven types of expressions:


- string
- numeric
- constant
- variable
- list
- command
- operator
- complex

Statements and expressions are discussed in detail in the following subsections.


Special Characters
The pipe character ( | ) has no meaning in lc_shell. Use the backslash ( \ ) to escape
double quotes when executing a UNIX command. For example, the following command

Library Compiler Tool Invocation Commands 6


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
lc_shell

requires backslash characters before the double quotes to prevent Design Compiler from
ending the command prematurely:
lc_shell> sh \'grep \\'foo\\' my_file\'.
Control Statements
The two control statements if and while allow conditional execution and looping in the
lc_shell language. The syntax of the basic if statement is:
if ( condition ) {
statement_list
}

Other forms of the if statement allow use of else and else if. See the description of the if
statement in the Synopsys Commands section of this manual for details.
The syntax of the while statement is:
while ( condition ) {
statement_list
}

See the description of the while statement in the Synopsys Commands section of this
manual for more details. See the Operator Expressions and Complex Expressions
subsections of this manual page for a discussion of relational and logical operators used in
the control statements.
Command Statements
The lc_shell invokes the specified command with its arguments. The syntax of a command
statement is:
command_name argument_1 argument_2 ... argument_n

Arguments are separated by commas or spaces and can be enclosed in parentheses.


Following are examples of lc_shell command statements: lc_shell> read_lib my_lib.lib
lc_shell> report_lib my_lib
String Expressions
A string expression is a sequence of characters enclosed within quotation marks ("").
Following are examples of string expressions: "my_lib_name" "~/dir_1/dir_1/file_name"
"this is a string"
Numeric Constant Expressions
Numeric constant expressions are numeric values. They must begin with a digit and
can contain a decimal point; a leading sign can be included. Exponential notation is
also recognized. Following are examples of numeric constant expressions: 123 -234.5
123.4e56

Library Compiler Tool Invocation Commands 7


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
lc_shell

Variable Expressions
A variable expression recalls the value of a previously-defined variable. Variable names
can contain letters, digits, and most punctuation characters, but must not start with a digit.
Following are examples of variable expressions: current_lib name/name -all +-*/.:'#~`%
$&^@!_[]|?
If a variable used in an expression has not previously been assigned a value (in an
assignment statement), then its value is a string containing the variable name. This feature
allows you to omit the quotes around many strings. For example, the following commands
are equivalent (assuming there are no variables called "mylib", "db", \por "-f").
lc_shell> write_lib "-f" "db" "mylib"
lc_shell> write_lib -f db mylib

List Expressions
A list expression defines a list constant. The list can include pathnames, cell or pin names,
values, etc. The syntax of a list expression is:
{ expression_1 expression_2 ... expression_n }

Expressions are separated by spaces or commas. Following are examples of list


expressions: {} {"pin_1" "pin_2" "pin_3"} {1,2,3,4,5}
Operator Expressions
Operator expressions perform simple arithmetic, and string and list concatenation. The
syntax of an operator expression is: expression <operator> expression
where <operator> is: "+", "-", "*", or "/", and is separated by at least one preceding and
following space. Operator expressions involving numbers return the computed value.
The "+" operator can be used with strings and lists to perform concatenation. Following
are examples of operator expressions: 234.23 - 432.1 100 * scale file_name_variable +
".suffix" {portA, portB} + "portC"
The relational operators "==", "!=", ">", ">=", "<", and "<=" are used in the control
statements if and while. The "greater than" operator ">" should only be used in
parenthesized expressions to avoid confusion with the file redirection operator ">".
The logical operators "&&", "||", and "!" (and, or, not) are also used in the control
statements if and while. The "not" operator is different from the other operators in that it is
a unary operator with the syntax: ! expression
Complex Expressions
Expressions can be built from other expressions, creating complex expressions. When
a complex expression contains more than one operator, lc_shell satisfies multiplication
and division operators before addition and subtraction. Simple expressions enclosed in

Library Compiler Tool Invocation Commands 8


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
lc_shell

parentheses are given priority and override this rule. Thus, the expression "1 + 2 * 3 + 4"
has the value 11, and "(1 + 2) * (3 + 4)" has the value 21.
The relational and logical operators can be used in combination to form complex
conditions. Following are examples of complex conditional expressions:
(goal >= 7.34 || ! complete)
(a >= 7 || run_mode != "test" && !(error_detected == true))

Complex logical expressions are evaluated from left to right, with "&&" being evaluated
before "||". However, those expressions enclosed in parentheses are evaluated first.
Command Arguments
Many lc_shell commands have required or optional arguments that allow you to further
define, limit or expand the scope of its operation.
This manual contains a comprehensive list and description of these arguments. You can
also use the man command to view the manual page online. For example, to view the
online manual page of the read_lib command, enter: lc_shell> man read_lib
Many commands also offer a -help option that lists the arguments available for that
command, for example:
lc_shell> read_lib -help
Usage: read_lib # read a .lib file
[-model_type model file types]
(model file type)
[-partial_model_check] (screening for partial model file)
[-signoff_screening] (screening for sign-off tools)
[-test_model list of CTL files]
(list of CTL files)
[-html] (report library screener results in html
format)
[-no_warnings] (disable warning messages)
[-lib_messages lib_messages]
(predefined lib_message)
[-return_lib_collection]
(return library collection)
file_name (technology library file)

Arguments that do not begin with a hyphen (-) are positional arguments. Positional
arguments must be entered in a specific order relative to each other. Non-positional
arguments (those beginning with a hyphen) can be entered in any order and can be
intermingled with positional arguments.
The names of non-positional arguments can be abbreviated to the minimum number of
characters required to distinguish them from the other arguments.

Library Compiler Tool Invocation Commands 9


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
lc_shell

The following commands are equivalent: lc_shell> write_lib -format db -output lib.db my_lib
lc_shell> write_lib my_lib -format db -output lib.db my_lib lc_shell> write_lib -f db -o lib.db
my_lib
Many arguments are optional, but if you omit a required argument, an error message and
usage statement are displayed. For example:
lc_shell> read_lib
Error: Required argument 'file_name' was not found (CMD-007)

Multiple Statement Lines and Multiple Line Statements


Normally, only one command is typed on a single line. If you want to put more than one
command on a line, you must separate each command with a semicolon, for example:
lc_shell> read_lib my_lib.lib; report_lib my_lib; write_lib my_lib;

There is no limit to the number of characters on a lc_shell command line, but you can
break a long command into multiple lines by terminating all but the last line with a
backslash (\e). This tells lc_shell to expect the command to continue on the next line:
lc_shell> read_lib -html \e
-no_warnings \e
my.lib
This feature is normally used in files containing lc_shell commands (script files).
Output Redirection
The lc_shell lets you divert command output messages to a file. To do this, type ">
file_name" after any statement. The following example deletes the old contents of
"my_file" and writes the output of the report_lib command to the file. lc_shell> report_lib
my_lib1 > my_file
You can append the output of a command to a file with ">>". The following example
appends the library report of my_lib2 to the contents of "my_file": lc_shell> report_lib
my_lib2 >> my_file
Aliases
The alias command gives you the ability to define new commands in terms of existing
ones. You can reduce the number of keystrokes by defining short aliases for the
commands and options you use most often.
The following example defines a new command "q" that is equivalent to running the quit
command with the -variables option.
lc_shell> alias q quit

Library Compiler Tool Invocation Commands 10


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
lc_shell

With the "q" alias defined, the following two commands are equivalent:
lc_shell> quit
lc_shell> q

Alias definitions can be placed in your .synopsys_lc.setup file or in a separate file. The
advantage of keeping aliases in a separate file is that all defined aliases can be written to
a file with a command such as: lc_shell> alias > ~/.synopsys_aliases
If you put the command include ~/.synopsys_aliases in your .synopsys_lc.setup file, the
aliases are defined every time you start a new lc_shell session.
Note that aliases are only expanded if they are the first token in a command. Thus, they
can not be used as arguments to other commands. See the description of the alias
command in the Synopsys Commands section of this manual.
History
A record is kept of all lc_shell commands issued during any given lc_shell session. The
history command displays a list of these commands. lc_shell> history 1 read_lib file.lib 2
report_lib my_lib 3 write_lib my_lib ...
Your previous commands can be re-executed with the following "!" commands:
!!
Expands to the previous command.
!number
Expands to the command whose number in the history list matches number.
!-number
Expands to the command whose number in the history list matches the current
command minus number.
!text
Expands to the most recent command that starts with text. A text command
can contain letters, digits, and underscores, and must begin with a letter or
underscore.
!?text
Expands to the most recent command that contains text. A text command
can contain letters, digits, and underscores, and must begin with a letter or
underscore.
As with aliases, a "!" command must be the first token in a statement, but not necessarily
the only one.

Library Compiler Tool Invocation Commands 11


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
libdb2parquet

lc_shell> read_lib file.lib


lc_shell> write_lib my_lib
lc_shell> !! -f db /* Rewrite with the -format db option */
lc_shell> history
1 read_lib file.lib
2 write_lib my_lib
3 write_lib my_lib -f db
4 history

Given the previous history, the following commands are equivalent:


lc_shell> !-4 -s file /* Same as command 1 */
lc_shell> !1 -s file
lc_shell> !re -s file
lc_shell> !?lib -s file
lc_shell> !?ead -s file

Additional parameters can be included in a ! command statement. The above examples


include the -single_file option (-s file) of the read command.
More than one ! command can appear in a line, as long as each is the first token in a
statement. lc_shell> !?q; !c; !4
The previous command is the same as: lc_shell> read_lib file.lib lc_shell> write_lib my_lib
-f db lc_shell> history

See Also
• alias
• history

libdb2parquet
Runs the libdb2parquet tool.
Syntax
libdb2parquet
Usage: libdb2parquet --db <db path> --parquet <parquet file path>
[--db load db file, required]
[--parquet create parquet file, required]
[--dump dump out Data, optional]
[--help show this page for help, optional]
[--root set up root path, optional]
[--sdp monitor running process using sdp, optional]

Library Compiler Tool Invocation Commands 12


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
synopsys_users

Return values
Exit status of libdb2parquet:
0 if succeed

1 if common problem occurs

2 if argument problem occurs

Arguments
--db dbpath+dbname
You need to give a valid fullpath to db file.
--parquet path
After --parquet, you need to give a relative path of directory to store generated
parquet file
If the diretory already exits, error message will be printed out.
--dump '0'
Dump option will help you to dump binary format parquet into readable file to
review the output.
Example
libdb2parquet --db /remote/testcases/TC102/012023/4621715/compile_libs/070c0_ssg.db
--parquet ./tmp
Description
Before executes, you need to set up lisence in the enviornment.
Information: Process terminated by interrupt.

synopsys_users
Lists the current users of the Synopsys licensed features.
Syntax
synopsys_users [feature_list]
list feature_list

Library Compiler Tool Invocation Commands 13


W-2024.09-SP3
Feedback
Chapter 1: Library Compiler Tool Invocation Commands
synopsys_users

Arguments
feature_list
List of licensed features for which to obtain the information. Refer to the
Synopsys System Installation and Configuration Guide for a list of features
supported by the current release. Or, determine from the key file all the features
that are licensed at your site.
Description
Displays information about all of the licenses, related users, and hostnames currently in
use. If a feature is specified, all users of that feature are displayed.
synopsys_users is valid only when Network Licensing is enabled.
For more information about synopsys_users, refer to the System Installation and
Configuration Guide.
Examples
In this example, all of the users of the Synopsys features are displayed:
% synopsys_users

krig@node1 Design-Analyzer, Design-Compiler, LSI-Interface


DFT-Compiler, VHDL-Compiler
doris@node2 HDL-Compiler, Library-Compiler
test@node3 Design-Compiler, Design-Analyzer, TDL-Interface

3 users listed.

This example shows users of the "Library-Compiler" or "VHDL-Compiler" feature.


% synopsys_users Library-Compiler VHDL-Compiler

krig@node1 Design-Analyzer, Design-Compiler, LSI-Interface


DFT-Compiler, VHDL-Compiler
doris@node2 HDL-Compiler, Library-Compiler

2 users listed.

See Also
• get_license
• license_users
• remove_license

Library Compiler Tool Invocation Commands 14


W-2024.09-SP3

You might also like