LibrePDK: Difference between revisions

From LibreSilicon
Jump to navigation Jump to search
No edit summary
Line 21: Line 21:
Don't forget to make sure that all the submodules and their submodules are cloned
Don't forget to make sure that all the submodules and their submodules are cloned


    git submodule update --init --recursive
git submodule update --init --recursive


For placement of discrete componentes used in more complex components like Driver Circuits, OpAmps,
For placement of discrete componentes used in more complex components like Driver Circuits, OpAmps, etc. IdeaPlaceExPy is being used.
etc. IdeaPlaceExPy is being used.


IdeaPlaceExPy requires the Python system headers to be installer and the virtual env has to match
IdeaPlaceExPy requires the Python system headers to be installed and the virtual env has to match the Python version with which it was compiled.
the Python version with which it was compiled.
 
=== '''Using LibrePDK in a Virtual Environment''' ===
It is recommended to use LibrePDK in a Python virtual environment to avoid dependency conflicts with
system-wide Python packages.
 
After you've installed all the below dependencies the recommended way of installing the remaining dependencies is to run<syntaxhighlight lang="bash">
uv sync --no-cache
</syntaxhighlight>


=== OpenVAF models ===
=== OpenVAF models ===
Line 37: Line 43:
ready to be used by LibrePDK.
ready to be used by LibrePDK.


Simply run the following script and confirm the installation by checking for the
Simply run the following script and confirm the installation by checking for the LibrePDK/technologies/spice/SG13G2/devices/*/*.osdi files.
LibrePDK/technologies/spice/SG13G2/devices/*/*.osdi files.


    ./scripts/update_ngspice_extensions.sh
./scripts/update_ngspice_extensions.sh


=== LP solver ===
=== LP solver ===


Googl now officially runs the project and you can get the most recent version from GitHub
Google now officially runs the project and you can get the most recent version from GitHub
 
Install is by cloning and building it
 
    git clone https://github.com/lp-solve/lp_solve
    pushd lp_solve/lpsolve55
    rm -rf bin/ux64
    sh ccc
    popd
 
Then you can copy the shared object file in solve/lpsolve55/bin/ux64 into your /usr/lib64 and
copy the headers with
 
mkdir /usr/include/lpsolve
cp lp_solve/*.h /usr/include/lpsolve/


OR, you can install the system package and devel package with your package manager
Install is by cloning and building it<syntaxhighlight lang="bash">
git clone https://github.com/lp-solve/lp_solve
pushd lp_solve/lpsolve55
rm -rf bin/ux64
sh ccc
popd
</syntaxhighlight> Then you can copy the shared object file in solve/lpsolve55/bin/ux64 into your /usr/lib64 and copy the headers with<syntaxhighlight lang="bash">
mkdir /usr/include/lpsolve
cp lp_solve/*.h /usr/include/lpsolve/
</syntaxhighlight>OR, you can install the system package and devel package with your package manager


=== Lemon ===
=== Lemon ===


That library has been developed by a Hungarian university which doesn't maintain
That library has been developed by a Hungarian university which doesn't maintain their Mercurial setup. Best approach is to use the version you find in your distribution
their Mercurial setup. Best approach is to use the version you find in your distribution
 
 
=== Limbo ===
=== Limbo ===


The official version of Limbo has been a total mess when it comes to building libs
The official version of Limbo has been a total mess when it comes to building libs and linking them. I had to make some severe modifications which makes CMake properly build shared object files and detects the system wide installation of the dependencies
and linking them. I had to make some severe modifications which makes CMake properly
build shared object files and detects the system wide installation of the dependencies
using proper CMake detection functions
using proper CMake detection functions


Just do
Just run<syntaxhighlight lang="bash">
 
git clone https://gitlab.libresilicon.com/leviathan/limbo.git
git clone https://gitlab.libresilicon.com/leviathan/limbo.git
mkdir Limbo/build
mkdir Limbo/build
pushd Limbo/build
pushd Limbo/build
cmake ..
cmake ..
make
make
make install
make install
popd
popd
</syntaxhighlight>
 
 
 


= Components =
= Components =

Revision as of 00:17, 26 May 2026

The LibrePDK is the library driving Danube River and the Pad Cell Generator

ALibrePDK screen shot

It is responsible for generating discrete parts with specific parameters for a specific process.

The properties of the parts can be optimized by utilizing the calibration values extracted from the measurements of taped out Danube River test wafers.

Adding a new technology

Technologies currently supported can be found in the technologies subfolder.

https://gitlab.libresilicon.com/generator-tools/librepdk/-/tree/master/LibrePDK/technologies?ref_type=heads

New technologies can be added by modifying scripts/update_technologies.sh and adding a tech.python script to the technologies folder.

After that, LibrePDK should be capable of auto discovering the new process after running the update script.

Installation

First please clone the repo

pip install https+git://gitlab.libresilicon.com/generator-tools/librepdk.git

Don't forget to make sure that all the submodules and their submodules are cloned

git submodule update --init --recursive

For placement of discrete componentes used in more complex components like Driver Circuits, OpAmps, etc. IdeaPlaceExPy is being used.

IdeaPlaceExPy requires the Python system headers to be installed and the virtual env has to match the Python version with which it was compiled.

Using LibrePDK in a Virtual Environment

It is recommended to use LibrePDK in a Python virtual environment to avoid dependency conflicts with system-wide Python packages.

After you've installed all the below dependencies the recommended way of installing the remaining dependencies is to run

uv sync --no-cache

OpenVAF models

IHP's SG13G2 technology node uses OpenVAF models for the ngspice simulation tool.

The following script will make sure that rust and the OpenVAF tool are present and then compiles the models into the osdi format and places them into the technology directory ready to be used by LibrePDK.

Simply run the following script and confirm the installation by checking for the LibrePDK/technologies/spice/SG13G2/devices/*/*.osdi files.

./scripts/update_ngspice_extensions.sh

LP solver

Google now officially runs the project and you can get the most recent version from GitHub

Install is by cloning and building it

git clone https://github.com/lp-solve/lp_solve
pushd lp_solve/lpsolve55
rm -rf bin/ux64
sh ccc
popd

Then you can copy the shared object file in solve/lpsolve55/bin/ux64 into your /usr/lib64 and copy the headers with

mkdir /usr/include/lpsolve
cp lp_solve/*.h /usr/include/lpsolve/

OR, you can install the system package and devel package with your package manager

Lemon

That library has been developed by a Hungarian university which doesn't maintain their Mercurial setup. Best approach is to use the version you find in your distribution

Limbo

The official version of Limbo has been a total mess when it comes to building libs and linking them. I had to make some severe modifications which makes CMake properly build shared object files and detects the system wide installation of the dependencies using proper CMake detection functions

Just run

git clone https://gitlab.libresilicon.com/leviathan/limbo.git
mkdir Limbo/build
pushd Limbo/build
cmake ..
make
make install
popd

Components

LibrePDK provides generators for the basic components usually found within a VLSI/ULSI design, such as resistors, capacitors and transistors.

Capacitors

For now there's only simple small value caps available. Fingered and cup capacitors are still work in progress.

Resistors

There's two types of resistor structures available: Meander and strip resistors

Transistors

For now there's only single gate transistors (fingered transistors are still WIP)