mirror of https://github.com/KLayout/klayout.git
Created 2019 01 19 Persistency and some reworks (markdown)
parent
4993418ee7
commit
0121742e7a
|
|
@ -0,0 +1,43 @@
|
|||
# Persistence and some Reworks
|
||||
|
||||
There is little use in extracting the netlist if you cannot do something with it. Plus, as extraction takes a while you want to save the results. This is what persistence is for.
|
||||
|
||||
Essentially the scheme is
|
||||
|
||||
```
|
||||
iter = ... # the RecursiveShapeIterator for your layout hierarchy
|
||||
l2n = RBA::LayoutToNetlist::new(iter)
|
||||
|
||||
... extract devices, nets ...
|
||||
|
||||
l2n.write("myfile.l2n")
|
||||
|
||||
# to read the data back
|
||||
l2n = RBA::LayoutToNetlist::new
|
||||
l2n.read("myfile.l2n")
|
||||
```
|
||||
|
||||
To cover this requirement, I had to introduce two new features:
|
||||
|
||||
* Device abstracts: A device abstract describes a device in terms of shapes. Device abstracts sit between the device class (a generic type of device) and the device itself (the actual instance). Device abstracts carry the shapes of the device terminals and correspond to a layout cell.
|
||||
|
||||
* Named layers: Layers derived from LayoutToNetlist have to be named so they can be put into the file. Named layers carry an extended meaning: only named layers are kept within the LayoutToNetlist object. All other layers will be discarded when no longer used. This is in particular useful for computed layers. Only named layers can participate in the connectivity.
|
||||
|
||||
# The dump file format
|
||||
|
||||
The dump file is a text file containing the ingredients of a LayoutToNetlist object:
|
||||
|
||||
* General information (database unit etc.)
|
||||
* Layer definitions (what layers are there)
|
||||
* Connectivity (what layer connect to which other layers)
|
||||
* Global connections (what layers connect to which global net)
|
||||
* Device abstracts (device cells with the terminal shapes)
|
||||
* Circuits
|
||||
|
||||
Circuits are made from these components:
|
||||
|
||||
* Nets (electrical connections with the shapes making up the connections)
|
||||
* Devices (the devices and what nets connect to their terminals)
|
||||
* Pin (the connections the circuit makes to the outside)
|
||||
* Subcircuits (other circuits being embedded into this circuit)
|
||||
|
||||
Loading…
Reference in New Issue