Command Reference 2. Synopsys Commands write_lib
NAME
write_lib Writes a compiled library to disk in
Synopsys database, EDIF, or VHDL format.
SYNTAX
int write_lib library_name [-format format_name] [-
output file]
string library_name
string format_name
string file
ARGUMENTS
library_name If writing in Synopsys database (db)
format, indicates the name of the
technology or symbol library to save.
If writing in EDIF format, indicates the
name of the symbol library used to
generate the EDIF library. If writing
in VHDL format,indicates the name of the
technology library used to generate the
VHDL library.
-format format_name
Selects the external format of the
specified library; allowed values are
db, edif, or vhdl. This option is used
to specify EDIF or VHDL format;
otherwise the default Synopsys database
(db) format is used.
-output file Specifies an output filename or pathname
for the library.
DESCRIPTION
Saves a compiled technology or symbol library in db
format, to disk.
For db format, if the -output option is used, the disk
file is written to the specified filename. If -output
is not used, the library is written to the current
directory with filename library_name.db.
If the format is EDIF, write_lib takes a compiled
symbol library, generates an EDIF library and writes
the library to disk.
V3.1 Synopsys Inc. 1988-1994. All rights reserved. 2-1
write_lib 2. Synopsys Commands Command Reference
If the format is VHDL, write_lib takes a compiled
technology library, generates a detailed VHDL library
report and library and writes the library to disk.
2-2 Synopsys Inc. 1988-1994. All rights reserved. V3.1
Command Reference 2. Synopsys Commands write_lib
The VHDL library is configured based on the values of
the following dc_shell environment variables:
vhdllib_architecture
vhdllib_glitch_handle
vhdllib_logic_system
vhdllib_logical_name
vhdllib_pulse_handle
vhdllib_tb_compare
vhdllib_tb_x_eq_dontcare
vhdllib_timing_mesg
vhdllib_timing_xgen
Based on the VHDL library configuration, the following
files may be created:
- a components file with the name library_name_components.vhd
- an entity/architecture file with the name library_name_FTBM.vhd
- an entity/architecture file with the name library_name_UDSM.vhd
- an entity/architecture file with the name library_name_FTSM.vhd
- an entity/architecture file with the name library_name_FTGS.vhd
- an entire library testbench file with the name library_name_tb.vhd
- a testbench file for every cell with the name
library_name_cell_tb.vhd
- an input stimulus file with the name library_name_tb.sen
- a verification script file with the name library_name.csh
If the -output option is used, the disk files are
written with the specified principal and extension
filename.
Before writing a library, you must first read the
technology library file into the system using the
read_lib command. read_lib automatically compiles the
file and activates the write_lib command. Otherwise,
the built-in security mechanism aborts write_lib before
generating a VHDL library.
Note: This command overwrites files without warning.
EXAMPLES
This example reads and writes a technology library:
dc_shell> read_lib my_lib.lib
dc_shell> write_lib my_lib
This example reads and writes a symbol library:
dc_shell> read_lib schem_lib.slib
V3.1 Synopsys Inc. 1988-1994. All rights reserved. 2-3
write_lib 2. Synopsys Commands Command Reference
dc_shell> write_lib schem_lib.sdb
This example reads a symbol library and writes an EDIF
symbol library:
dc_shell> read_lib schem_lib.slib
dc_shell> write_lib -f edif -output
schem_lib.edif schem_lib.sdb
This example writes a technology library to a specified
file:
dc_shell> write_lib my_lib -output ~synopsys/test/test.db
This example reads a technology library, sets the target architecture to
FTBM, and writes a VHDL library as "my_lib_FTBM.vhd" and
"my_lib_components.vhd." The log report is redirected to "my_lib.LOG":
dc_shell> read_lib mylib.lib
dc_shell> vhdllib_architecture=FTBM
dc_shell> write_lib -f vhdl my_lib > my_lib.LOG
This example reads a technology library, sets the target architecture to
FTBM, and writes a VHDL library to files, "spec_FTBM.vhd" and
"spec_components.vhd." A log file is displayed:
dc_shell> read_lib mylib.lib
dc_shell> vhdllib_architecture=FTBM
dc_shell> write_lib -f vhdl -output spec.vhd my_lib
SEE ALSO
compare_lib(2), list(2), read_lib(2),
vhdlio_variables(3).
2-4 Synopsys Inc. 1988-1994. All rights reserved. V3.1