Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Liberty Language SupportNew to Visual Studio Code? Get it now.
Liberty Language Support

Liberty Language Support

OhtoAi

|
3 installs
| (0) | Free
Syntax highlighting for Liberty (.lib) timing library files used in EDA/VLSI design
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Liberty Syntax Highlighting

Syntax highlighting for Liberty (.lib) timing library files used in EDA/VLSI design.

Features

This extension provides comprehensive syntax highlighting for the Liberty format:

  • Comments: Block (/* */) and line (//) comments
  • Strings: Double-quoted strings with escape character support
  • Numbers: Integer and floating-point numbers (including scientific notation)
  • Groups: All major Liberty groups with dedicated scoping:
    • library, cell, pin, pg_pin, timing
    • lu_table_template, power_lut_template
    • operating_conditions, wire_load, wire_load_selection
    • ff, latch, statetable
    • cell_rise, cell_fall, rise_transition, fall_transition
    • intrinsic_power, leakage_power, internal_power
    • And many more...
  • Complex Attributes: Table data (values, index_1–index_7)
  • Simple Attributes: 160+ Liberty attributes (technology, delay_model, direction, capacitance, timing_type, etc.)
  • Define Blocks: define (name) { ... } macro definitions
  • Punctuation: Braces, parentheses, semicolons, colons, commas

Supported File Types

  • .lib files (Liberty timing library format)

Installation

From VSIX

  1. Package the extension:
    npx @vscode/vsce package
    
  2. In VS Code: Extensions → ... → Install from VSIX... → select liberty-syntax-1.0.1.vsix

From Source

  1. Clone this repository
  2. Open in VS Code
  3. Press F5 to launch the Extension Development Host
  4. Open any .lib file to see syntax highlighting

Liberty Format Overview

Liberty files describe timing, power, and physical characteristics of standard cells in VLSI design. The format is hierarchical:

Simple Attributes

attribute_name : value ;

Values can be numbers, strings, or identifiers:

technology     : cmos ;
area           : 10.5 ;
function       : "A & B" ;

Complex Attributes

Table data uses parenthesized lists:

values ("0.1, 0.5, 1.0, 2.0, 5.0") ;
index_1 ("0.01, 0.05, 0.1, 0.5, 1.0") ;

Groups

Groups have optional parameters and a body in braces:

library (my_lib) {
    cell (AND2) {
        pin (A) {
            direction : input ;
            capacitance : 0.002 ;
        }
    }
}

Define Blocks

Macro definitions for repeated structures:

define (ff_timing) {
    timing () {
        related_pin : "CK" ;
        timing_type : rising_edge ;
    }
}

Test File

A comprehensive sample .lib file is available at test/sample.lib that exercises all syntax highlighting features.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft