Metadata-Version: 2.4
Name: ipforge
Version: 1.0.0
Summary: IP forge - discover, fetch and install open PDK IP packages
Author-email: Daniel Schultz <dnltz@aesc-silicon.de>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/aesc-silicon/ipforge
Project-URL: Issues, https://github.com/aesc-silicon/ipforge/issues
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: pyyaml
Requires-Dist: requests
Dynamic: license-file

.. SPDX-FileCopyrightText: 2026 aesc silicon
.. SPDX-License-Identifier: Apache-2.0

ipforge
=======

Consumer tool for the ipforge IP registry. Discover, fetch, and install
open PDK IP packages into your project.

Installation
------------

Create a virtual environment::

    python3 -m venv .venv
    source .venv

Run the following command in the root directory of your chip layout project
to make ``ipforge`` available in your environment::

    pip install ipforge

Quick Start
-----------

Initialise a project in the current directory::

    ipforge init https://ipforge-registry.aesc-silicon.io --pdk ihp-sg13g2

This creates ``ipforge.yml`` in the current directory::

    registry: https://ipforge-registry.aesc-silicon.io
    packages_dir: packages/
    pdk: ihp-sg13g2

Fetch an IP::

    ipforge remote fetch aesc-silicon/digital.peripherals.io/gpio

The package is extracted to ``packages/digital/peripherals/io/gpio/ihp-sg13g2/``.

Commands
--------

init
~~~~

::

    ipforge init <registry-url> [--pdk <pdk>] [--packages-dir <dir>]

Initialises ``ipforge.yml`` in the current directory.

- ``<registry-url>`` - URL of the registry (required).
- ``--pdk`` - Default PDK used when ``--pdk`` is not passed to ``remote fetch``
  (e.g. ``ihp-sg13g2``).
- ``--packages-dir`` - Local directory for installed packages (default:
  ``packages/``).

status
~~~~~~

::

    ipforge status

Lists all packages in the lock file and checks the registry for newer versions::

    aesc-silicon/digital.peripherals.io/gpio@0.1.0 [ihp-sg13g2]  up to date
    aesc-silicon/digital.peripherals.io/uart@0.2.0 [ihp-sg13g2]  update available: 0.3.0

remote list
~~~~~~~~~~~

::

    ipforge remote list [--pdk <pdk>] [--filter <path>]

Lists packages available in the registry.

- ``--pdk`` - Filter by PDK (e.g. ``ihp-sg13g2``).
- ``--filter`` - Filter by path segments, e.g. ``digital/io`` matches any
  package whose library contains both ``digital`` and ``io``::

      ipforge remote list --pdk ihp-sg13g2
      ipforge remote list --filter digital/io

Example output::

    aesc-silicon/digital.peripherals.io/gpio@0.1.0 [ihp-sg13g2]
      General-purpose I/O controller with tri-state pins, configurable per-pin
      direction, input synchronisation, and a four-channel interrupt controller.
      Macros:
        gpio_apb_32b  [APB3]  32-bit  32-bit GPIO with APB3 interface
        gpio_wb_32b   [Wishbone]  32-bit  32-bit GPIO with Wishbone interface

remote fetch
~~~~~~~~~~~~

::

    ipforge remote fetch <vendor>/<library>/<name>[@<version>] [--pdk <pdk>]

Downloads and installs a package. If ``--pdk`` is omitted the default PDK from
``ipforge.yml`` is used. If ``@version`` is omitted the latest version is
fetched.

Examples::

    ipforge remote fetch aesc-silicon/digital.peripherals.io/gpio
    ipforge remote fetch aesc-silicon/digital.peripherals.io/gpio@0.1.0
    ipforge remote fetch aesc-silicon/digital.peripherals.io/gpio --pdk sky130

The package is recorded in ``ipforge.lock.yml``.

remote install
~~~~~~~~~~~~~~

::

    ipforge remote install

Installs all packages listed in ``ipforge.lock.yml`` that are not already
present locally. Use this after cloning a project to restore all dependencies.

remote update
~~~~~~~~~~~~~

::

    ipforge remote update

Updates all packages in the lock file to their latest versions.

Lock File
---------

``ipforge.lock.yml`` records the exact version and checksum of every installed
package::

    packages:
    - vendor: aesc-silicon
      library: digital.peripherals.io
      name: gpio
      version: 0.1.0
      pdk: ihp-sg13g2
      sha256: abc123...
      download_url: https://...

Commit this file to version control so that collaborators can reproduce the
exact set of IPs with ``ipforge remote install``.

Package Layout
--------------

Packages are installed under ``packages_dir`` following the library path::

    packages/
      digital/
        peripherals/
          io/
            gpio/
              ihp-sg13g2/
                manifest.yml
                rtl/
                gds/
                lef/
                lib/
                netlist/
                signoff/
                blackbox/
                ipxact/
