Ok! I have 4 folders, SNPSLOPT25, SNPSHOPT25, SNPSROPT25, and SNPSSLOPT25. In the directory, there are lef/snps25lopt.lef and folder liberty/nldm/, and under which has folders base, cg, dlvl, iso, pg, ret, ulvl. Under base, it has snps25lopt_base_ff0p715v125c.db, snps25lopt_base_ss0p72v125c.lib, snps25lopt_base_ff0p715v125c.lib, snps25lopt_base_ss0p72v25c.db and many more.
I also notice that there is one of the four main folders that does not contain any db file. I would like to ask:
how to set up the library with db (or lib files, considering that one folder only has .lib)
what are the differences between link library, target library, and reference library.
should I use "setup library", and what is the difference between this and create library?
is the library created once and for all? If I don't want it to be saved and want to create it every time using fusion compiler, what should I do?
the ultimate goal is to measure using commands report_qor and report_power and such to get the area, power, and total negative slack. How should I do this, given that I have all thses files?
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Excellent questions! You're dealing with a multi-corner multi-mode (MCMM) library setup, which is standard for modern designs. Let me address each of your questions systematically.
Understanding Your Library Structure
Your folders appear to be different threshold voltage (Vt) variants:
SNPSLOPT25: Low Vt (fast but leaky)
SNPSHOPT25: High Vt (slow but low leakage)
SNPSROPT25: Regular/Standard Vt (balanced)
SNPSSLOPT25: Super Low Vt (very fast but very leaky)
The subfolders represent different cell types:
base: Standard logic cells
cg: Clock gating cells
dlvl: Level shifters (for dual voltage designs)
iso: Isolation cells (for power domains)
pg: Power gating cells
ret: Retention cells (save state during power down)
If one folder only has .lib files, you'll need to compile them to .db format first:
tcl
# If you need to compile .lib to .db (do this once)
read_lib /path/to/snps25lopt_base_ff0p715v125c.lib
write_lib snps25lopt_base_ff0p715v125c -format db -output snps25lopt_base_ff0p715v125c.db
For setting up libraries in Fusion Compiler:
tcl
# Basic setup for single corner
set search_path ". /path/to/SNPSROPT25/liberty/nldm/base"
set target_library "snps25ropt_base_tt0p75v25c.db"
set link_library "* $target_library"
2. Differences Between Library Types
link_library: Contains ALL libraries needed to resolve cell references in your design. Always includes "*" (which means "search in memory first") plus all your technology libraries. This is what the tool uses to understand what each cell instance means.
target_library: A SUBSET of link_library. These are the cells the tool is allowed to use when optimizing/synthesizing new logic. You might exclude certain cells (like special power cells) from target_library.
reference_library: This is specifically for the physical tools (P&R). It points to the physical libraries (NDM/Milkyway format) that contain the actual layout views. In Fusion Compiler with .db files that include frame views, this is often handled automatically.
Example:
tcl
# link_library has everything
set link_library "* snps25ropt_base_tt0p75v25c.db snps25ropt_pg_tt0p75v25c.db snps25ropt_iso_tt0p75v25c.db"
# target_library only has cells we want to use for optimization
set target_library "snps25ropt_base_tt0p75v25c.db"
3. Setup Library vs Create Library
These commands serve different purposes:
setup_library: This is a high-level command that helps you configure library settings for an existing design database. It's used to modify library configurations.
create_library: This creates a new design library (NDM format) for storing your design data. This is the "container" where your design will live during P&R.
For your case, you'll likely use:
tcl
# Create a design library to work in
create_lib -technology /path/to/your.tf -ref_libs $reference_library my_design.nlib
4. Library Persistence
The library setup (which .db files you're using) is NOT persistent - you need to set it up each time you start Fusion Compiler. However, the design library (NDM) that you create with create_lib IS persistent and saves your design state.
To work without saving:
tcl
# Don't save the design library - just work in memory
# Simply don't run save_lib at the end of your session
5. Complete Flow for QoR Measurement
Here's a complete script to measure area, power, and timing:
tcl
# 1. Set up your libraries (choose appropriate corner)
set search_path ". \
/path/to/SNPSROPT25/liberty/nldm/base \
/path/to/SNPSROPT25/liberty/nldm/cg \
/path/to/SNPSROPT25/liberty/nldm/pg"
# For worst-case timing analysis, use slow corner
set target_library "snps25ropt_base_ss0p72v125c.db"
set link_library "* $target_library"
# 2. Read technology file
read_tech_file /path/to/your/technology.tf
# 3. Read your design
read_verilog your_design.v
current_design your_top_module
# 4. Link the design
link_design
# 5. Read constraints
read_sdc your_constraints.sdc
# 6. Run synthesis (if starting from RTL)
compile_ultra # or use compile_fusion for better QoR
# 7. If you want to do placement for more accurate results
create_floorplan -core_utilization 0.7
place_opt
# 8. Generate your reports
report_qor > reports/qor.rpt
report_power > reports/power.rpt
report_timing -max_paths 10 > reports/timing.rpt
report_area > reports/area.rpt
# Key metrics extraction
report_qor -summary
# This will show:
# - Timing Path Group summaries with WNS (Worst Negative Slack) and TNS (Total Negative Slack)
# - Area breakdown
# - Basic power if power analysis was run
# For detailed power analysis
set_power_analysis_options -analysis_type averaged
update_power
report_power -hierarchy
Multi-Corner Multi-Mode (MCMM) Setup (Advanced)
For more accurate analysis across corners:
tcl
# Define scenarios
create_scenario -name func_slow -mode func -corner slow
create_scenario -name func_fast -mode func -corner fast
# Set up corners
create_corner slow
create_corner fast
# Associate libraries with corners
set_attribute [get_corners slow] library "snps25ropt_base_ss0p72v125c.db"
set_attribute [get_corners fast] library "snps25ropt_base_ff0p715v125c.db"
# Run analysis across all corners
compile_fusion
report_qor -scenarios [get_scenarios]
This gives you a comprehensive view of your design's performance across different operating conditions. The key is to start simple with a single corner, get that working, then expand to multi-corner analysis for sign-off quality results.