Skip to main content

snarled README

Layout connectivity checker.

snarled is a python package for checking electrical connectivity in multi-layer layouts.

It is intended to be "poor-man's LVS" (layout-versus-schematic), for when poverty has deprived the man of both a schematic and a better connectivity tool.

Installation

Requirements:

  • python >= 3.10 (written and tested with 3.11)
  • numpy
  • klayout (python package only)

Install with pip:

pip install snarled

Alternatively, install from git

pip install git+https://mpxd.net/code/jan/snarled.git@release

Example

See examples/check.py (python interface) or examples/run.sh (command-line interface).

Command line:

snarled connectivity.oas connectivity.txt -m layermap.txt

Python interface:

from pprint import pformat
import logging

import snarled
from snarled.types import layer_t


logging.basicConfig()
logging.getLogger('snarled').setLevel(logging.INFO)


connectivity = [
    ((1, 0), (1, 2), (2, 0)),   # M1 to M2 (via V12)
    ((1, 0), (1, 3), (3, 0)),   # M1 to M3 (via V13)
    ((2, 0), (2, 3), (3, 0)),   # M2 to M3 (via V23)
    ]

labels_map: dict[layer_t, layer_t] = {
    (1, 0): (1, 0),
    (2, 0): (2, 0),
    (3, 0): (3, 0),
    }

filename = 'connectivity.oas'

nets = snarled.trace_layout(filename, connectivity, topcell='top', labels_map=labels_map)
result = snarled.TraceAnalysis(nets)

print('\n')
print(result)

this prints the following:

INFO:snarled.trace:Adding layer (3, 0)
INFO:snarled.trace:Adding layer (2, 3)
INFO:snarled.trace:Adding layer (1, 3)
INFO:snarled.trace:Adding layer (1, 2)
INFO:snarled.trace:Adding layer (1, 0)
INFO:snarled.trace:Adding layer (2, 0)


Trace analysis
=============
Nets
(groups of electrically connected labels)
        SignalA,SignalB
        SignalC,SignalD,SignalI
        SignalE,SignalF
        SignalG,SignalH
        SignalK
        SignalK
        SignalL

Opens
(2+ nets containing the same name)
        SignalK : 2 nets

Shorts
(2+ unique names for the same net)
        SignalA,SignalB
        SignalC,SignalD,SignalI
        SignalE,SignalF
        SignalG,SignalH
=============

Code organization

  • The primary functionality is in trace; specifically trace.trace_layout().
  • main provides a command-line interface, supported by the functions in utils.

Metadata

Release files for snarled 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snarled 1.0
File Size Uploaded
snarled-1.0.tar.gz 33.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snarled 1.0
File Interpreter ABI Platform
snarled-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 66.7 kB

Release files / snarled-1.0.tar.gz

Download URL snarled-1.0.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a05244a0758bde27ccdead387e7db184efe212353a11ffa70db72c24fca33bf1
BLAKE2b-256 checksum
How to use checksums
02ca0c14e8d58f868d896e8766c98e2276d786ae2febb758698b13370aa9c1f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / snarled-1.0-py3-none-any.whl

Download URL snarled-1.0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35392cd02ef0df90d2a852202441e9233fcc8eb74496ffac81937626d07bc62d
BLAKE2b-256 checksum
How to use checksums
c1a6150916dbc689dab7e7c05ea8b81211b1b0c3bdd4112983203a3e66ed132a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page