Limbo VLSI CAD Library

repository·master·Indexed 41 days ago

https://github.com/limbo018/limbo

A C/C++ library for VLSI CAD (Computer-Aided Design) providing tools for LEF/DEF, Verilog, and GDSII parsing, geometric utilities, and mathematical solvers for LP, Min-Cost Flow, and SDP. It includes specialized packages for algorithms, containers, and string utilities, as well as third-party integrations like a C Thread Pool and a DLX-based exact cover solver for puzzles such as Sudoku and N-queens.

Tokens
14.4K
Snippets
48
Records
95
Agent score
51%

What's inside Limbo

  1. Overview of Limbo Library Packages

    master

    Limbo is a C/C++ library for VLSI CAD design. Its components are organized into the following packages:

    PackageLanguageDescription
    AlgorithmsC++Partitioning, coloring, etc.
    BibtexPythonScripts to convert bibtex into various formats
    ContainersC++Extensions of STL containers
    GeometryC++Geometric utilities (e.g., polygon-to-rectangle conversion)
    MakeUtilsMakefileMakefile utilities for finding dependencies
    MathC++Extensions of STL math functions
    ParsersC++, Flex/BisonParsers for LEF/DEF, Verilog, GDSII, etc.
    PreprocessorC++Macros such as assertion with message
    ProgramOptionsC++API for parsing command line options
    SolversC++Wrappers for SDP, LP solvers with min-cost flow, etc.
    StringC++Utilities for char and string
    ThirdPartyC/C++, FortranRequired third-party packages
  2. Overview of Limbo.Algorithms package

    master

    The Limbo.Algorithms package provides a collection of optimization algorithms primarily used in VLSI CAD design. The package is organized into four main functional areas:

    • Graph Partition: Includes the Fiduccia-Mattheyses (FM) partitioning algorithm and its multiway extensions.
    • Graph Coloring: Provides multiple approaches to graph coloring, including:
      • Integer Linear Programming (ILP) based coloring
      • Semidefinite Programming (SDP) based coloring
      • Iterative Linear Programming (LP) based coloring
      • Greedy approaches
      • Graph simplification algorithms to assist coloring problems.
    • Graph Misc: Contains graph utilities and algorithms for finding the maximum clique and maximum independent set.
    • Placement: Provides useful VLSI placement strategies, such as GreedySearch.
  3. Overview of Limbo.Parsers.GdsiiParser

    master

    The Limbo.Parsers.GdsiiParser provides tools for handling GDSII files, the industry standard for integrated circuit (IC) layout artwork. The parser is divided into three functional components:

    1. GdsReader: API for reading GDSII files (.gds or compressed .gds.gz). Supports Boost and Zlib for compression.
    2. GdsWriter: API for writing GDSII files (.gds or compressed .gds.gz). Supports Boost and Zlib for compression.
    3. GdsDB: A database designed to store layout elements. It provides a high-level API to read, write, and flatten full layouts.
  4. Use Limbo.MakeUtils to find compilers and external packages

    master
    Limbo.MakeUtils provides small Makefile utilities designed to automate the detection of compilers and external libraries with the correct linking flags. It is primarily used by including specific .mk files within your Makefile to populate variables like CC, CXX, FC, AR, and library-specific flags (e.g., BOOST_LINK_FLAG).
  5. Use Limbo.Parsers.GdfParser for VLSI routing files

    master
    The Limbo.Parsers.GdfParser is designed to parse the GDF (Graph Data Format), an academic format used for VLSI routing. It is suitable for processing benchmark files like simple.gdf produced by research groups such as Prof. Jason Cong's group at UCLA.
  6. Use Limbo.String for string processing and number conversion

    master

    The Limbo.String module provides utility functions for common string processing tasks in VLSI CAD design contexts. Key capabilities include:

    • Validation: Checking if a string represents an integer, a floating-point number, or other numeric types.
    • Conversion: Converting numeric types to string representations.
    • Comparison: Performing case-sensitive and case-insensitive string comparisons.
  7. Use Limbo.ProgramOptions to parse command line arguments

    master

    The Limbo.ProgramOptions package allows you to define command line options (such as name-value pairs) with minimal code. It eliminates the need for manual parsing blocks and supports various data types including int, float, char, bool, string, and vector.

    Key features:

    • Minimalist API: Define an option with a single line of code.
    • Automatic Parsing: No manual parsing logic required.
    • Type Support: Handles scalars and vectors (e.g., appending multiple values to a container).
    • Error Reporting: Provides detailed feedback for incorrect or missing arguments.
  8. Use Limbo.Math for common mathematical operations

    master
    The Limbo.Math module provides a collection of utility functions for common mathematical tasks required in VLSI CAD design. It includes functions for computing absolute values, calculating averages of arrays, and other standard mathematical operations. The core functionality is defined in limbo/math/Math.h.
  9. Use the Limbo VerilogParser for gate-level netlists

    master
    The Limbo.Parsers.VerilogParser is designed to parse Verilog hardware programming language files. In VLSI design workflows, it is specifically used to read gate-level netlists (the output of logic synthesis) to help initialize databases for physical design.
  10. Use Limbo.Parsers.LefParser for VLSI design

    master
    The Limbo.Parsers.LefParser is designed to parse Library Exchange Format (LEF) files, which are standard in VLSI physical design. This parser is an adaptation of the open-source LEF parser from Cadence Design Systems, wrapped in C++ for use within the Limbo library. It is optimized for handling the complex cases found in chip design and has been validated against academic VLSI placement benchmarks.
  11. Overview of CThreadPool design

    master

    CThreadPool is a library that provides a thread pool where work can be added dynamically. When creating a pool, you can adjust the number of threads; for optimal performance, this should typically match the number of threads supported by your CPU.

    Logical Scheme:

    • Job Queue: Jobs are added to a queue. Each job consists of a function, arguments, and a pointer to the next job.
    • Thread Pool: A collection of threads that monitor the queue. When a thread becomes idle, it locks the queue, retrieves the first available job from the front, removes it from the queue, and executes it. Threads read from the queue serially using locks to ensure thread safety.