rename to snarled
This commit is contained in:
parent
ffa5bfa96c
commit
4d7709d615
24
README.md
24
README.md
@ -1,15 +1,15 @@
|
||||
snarl README
|
||||
snarled README
|
||||
============
|
||||
|
||||
Layout connectivity checker.
|
||||
|
||||
`snarl` is a python package for checking electrical connectivity in multi-layer layouts.
|
||||
`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.
|
||||
|
||||
- [Source repository](https://mpxd.net/code/jan/snarl)
|
||||
- [PyPI](https://pypi.org/project/snarl)
|
||||
- [Source repository](https://mpxd.net/code/jan/snarled)
|
||||
- [PyPI](https://pypi.org/project/snarled)
|
||||
|
||||
## Installation
|
||||
|
||||
@ -21,12 +21,12 @@ Requirements:
|
||||
|
||||
Install with pip:
|
||||
```bash
|
||||
pip3 install snarl
|
||||
pip3 install snarled
|
||||
```
|
||||
|
||||
Alternatively, install from git
|
||||
```bash
|
||||
pip3 install git+https://mpxd.net/code/jan/snarl.git@release
|
||||
pip3 install git+https://mpxd.net/code/jan/snarled.git@release
|
||||
```
|
||||
|
||||
## Example
|
||||
@ -35,8 +35,8 @@ See `examples/check.py`. Note that the example uses `masque` to load data.
|
||||
```python3
|
||||
from pprint import pformat
|
||||
from masque.file import gdsii, oasis
|
||||
import snarl
|
||||
import snarl.interfaces.masque
|
||||
import snarled
|
||||
import snarled.interfaces.masque
|
||||
|
||||
# Layer definitions
|
||||
connectivity = {
|
||||
@ -49,8 +49,8 @@ connectivity = {
|
||||
cells, props = oasis.readfile('connectivity.oas')
|
||||
topcell = cells['top']
|
||||
|
||||
polys, labels = snarl.interfaces.masque.read_cell(topcell, connectivity)
|
||||
nets_info = snarl.trace_connectivity(polys, labels, connectivity)
|
||||
polys, labels = snarled.interfaces.masque.read_cell(topcell, connectivity)
|
||||
nets_info = snarled.trace_connectivity(polys, labels, connectivity)
|
||||
|
||||
print('\nFinal nets:')
|
||||
print([kk for kk in nets_info.nets if isinstance(kk.name, str)])
|
||||
@ -103,7 +103,7 @@ Open nets:
|
||||
## Code organization
|
||||
|
||||
- The main functionality is in `trace_connectivity`.
|
||||
- Useful classes, namely `NetsInfo` and `NetName`, are in `snarl.tracker`.
|
||||
- `snarl.interfaces` contains helper code for interfacing with other packages.
|
||||
- Useful classes, namely `NetsInfo` and `NetName`, are in `snarled.tracker`.
|
||||
- `snarled.interfaces` contains helper code for interfacing with other packages.
|
||||
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
"""
|
||||
Example code for checking connectivity in a layout by using
|
||||
`snarl` and `masque`.
|
||||
`snarled` and `masque`.
|
||||
"""
|
||||
from pprint import pformat
|
||||
|
||||
from masque.file import gdsii, oasis
|
||||
|
||||
import snarl
|
||||
import snarl.interfaces.masque
|
||||
import snarled
|
||||
import snarled.interfaces.masque
|
||||
|
||||
|
||||
connectivity = {
|
||||
@ -21,8 +21,8 @@ connectivity = {
|
||||
cells, props = oasis.readfile('connectivity.oas')
|
||||
topcell = cells['top']
|
||||
|
||||
polys, labels = snarl.interfaces.masque.read_cell(topcell, connectivity)
|
||||
nets_info = snarl.trace_connectivity(polys, labels, connectivity)
|
||||
polys, labels = snarled.interfaces.masque.read_cell(topcell, connectivity)
|
||||
nets_info = snarled.trace_connectivity(polys, labels, connectivity)
|
||||
|
||||
print('\nFinal nets:')
|
||||
print([kk for kk in sorted(nets_info.nets.keys()) if isinstance(kk.name, str)])
|
||||
|
8
setup.py
8
setup.py
@ -6,20 +6,20 @@ from setuptools import setup, find_packages
|
||||
with open('README.md', 'rt') as f:
|
||||
long_description = f.read()
|
||||
|
||||
with open('snarl/VERSION.py', 'rt') as f:
|
||||
with open('snarled/VERSION.py', 'rt') as f:
|
||||
version = f.readlines()[2].strip()
|
||||
|
||||
setup(name='snarl',
|
||||
setup(name='snarled',
|
||||
version=version,
|
||||
description='CAD layout electrical connectivity checker',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/markdown',
|
||||
author='Jan Petykiewicz',
|
||||
author_email='jan@mpxd.net',
|
||||
url='https://mpxd.net/code/jan/snarl',
|
||||
url='https://mpxd.net/code/jan/snarled',
|
||||
packages=find_packages(),
|
||||
package_data={
|
||||
'snarl': ['py.typed',
|
||||
'snarled': ['py.typed',
|
||||
]
|
||||
},
|
||||
install_requires=[
|
||||
|
@ -1,17 +1,17 @@
|
||||
"""
|
||||
snarl
|
||||
snarled
|
||||
=====
|
||||
|
||||
Layout connectivity checker.
|
||||
|
||||
`snarl` is a python package for checking electrical connectivity in multi-layer layouts.
|
||||
`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.
|
||||
|
||||
The main functionality is in `trace_connectivity`.
|
||||
Useful classes, namely `NetsInfo` and `NetName`, are in `snarl.tracker`.
|
||||
`snarl.interfaces` contains helper code for interfacing with other packages.
|
||||
Useful classes, namely `NetsInfo` and `NetName`, are in `snarled.tracker`.
|
||||
`snarled.interfaces` contains helper code for interfacing with other packages.
|
||||
"""
|
||||
from .main import trace_connectivity
|
||||
from .tracker import NetsInfo, NetName
|
@ -24,18 +24,18 @@ def read_cell(
|
||||
"""
|
||||
Extract `polys` and `labels` from a `masque.Pattern`.
|
||||
|
||||
This function extracts the data needed by `snarl.trace_connectivity`.
|
||||
This function extracts the data needed by `snarled.trace_connectivity`.
|
||||
|
||||
Args:
|
||||
cell: A `masque` `Pattern` object. Usually your topcell.
|
||||
connectivity: A sequence of 3-tuples specifying the layer connectivity.
|
||||
Same as what is provided to `snarl.trace_connectivity`.
|
||||
Same as what is provided to `snarled.trace_connectivity`.
|
||||
label_mapping: A mapping of `{label_layer: metal_layer}`. This allows labels
|
||||
to refer to nets on metal layers without the labels themselves being on
|
||||
that layer.
|
||||
|
||||
Returns:
|
||||
`polys` and `labels` data structures, to be passed to `snarl.trace_connectivity`.
|
||||
`polys` and `labels` data structures, to be passed to `snarled.trace_connectivity`.
|
||||
"""
|
||||
|
||||
metal_layers, via_layers = connectivity2layers(connectivity)
|
||||
@ -80,7 +80,7 @@ def load_polys(
|
||||
layers: Sequence[layer_t],
|
||||
) -> defaultdict[layer_t, List[NDArray[numpy.float64]]]:
|
||||
"""
|
||||
Given a *flat* `masque.Pattern`, extract the polygon info into the format used by `snarl`.
|
||||
Given a *flat* `masque.Pattern`, extract the polygon info into the format used by `snarled`.
|
||||
|
||||
Args:
|
||||
cell: The `Pattern` object to extract from.
|
||||
@ -88,7 +88,7 @@ def load_polys(
|
||||
|
||||
Returns:
|
||||
`{layer0: [poly0, [(x0, y0), (x1, y1), ...], poly2, ...]}`
|
||||
`polys` structure usable by `snarl.trace_connectivity`.
|
||||
`polys` structure usable by `snarled.trace_connectivity`.
|
||||
"""
|
||||
polys = defaultdict(list)
|
||||
for ss in cell.shapes:
|
@ -1,5 +1,5 @@
|
||||
"""
|
||||
Main connectivity-checking functionality for `snarl`
|
||||
Main connectivity-checking functionality for `snarled`
|
||||
"""
|
||||
from typing import Tuple, List, Dict, Set, Optional, Union, Sequence, Mapping
|
||||
from collections import defaultdict
|
||||
@ -29,7 +29,7 @@ def trace_connectivity(
|
||||
"""
|
||||
Analyze the electrical connectivity of the layout.
|
||||
|
||||
This is the primary purpose of `snarl`.
|
||||
This is the primary purpose of `snarled`.
|
||||
|
||||
The resulting `NetsInfo` will contain only disjoint `nets`, and its `net_aliases` can be used to
|
||||
understand which nets are shorted (and therefore known by more than one name).
|
Loading…
Reference in New Issue
Block a user