diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt
index 75ba12e5..f5702b1d 100644
--- a/documentation/CMakeLists.txt
+++ b/documentation/CMakeLists.txt
@@ -41,7 +41,11 @@
PythonTutorial/Environment.rst
PythonTutorial/CellNetComponent.rst
PythonTutorial/Collections.rst
- PythonTutorial/CgtScript.rst )
+ PythonTutorial/CgtScript.rst
+ PythonTutorial/Netlist.rst
+ PythonTutorial/RealDesigns.rst
+ PythonTutorial/ToolEngines.rst
+ PythonTutorial/AdvancedTopics.rst )
set ( usersGuideRst UsersGuide/pdfHeader.rst
UsersGuide/LicenseCredits.rst
diff --git a/documentation/PythonCpp/PythonCpp.pdf b/documentation/PythonCpp/PythonCpp.pdf
index 5129cca0..d2e74dc1 100644
Binary files a/documentation/PythonCpp/PythonCpp.pdf and b/documentation/PythonCpp/PythonCpp.pdf differ
diff --git a/documentation/PythonTutorial/AdvancedTopics.rst b/documentation/PythonTutorial/AdvancedTopics.rst
new file mode 100644
index 00000000..61ec706d
--- /dev/null
+++ b/documentation/PythonTutorial/AdvancedTopics.rst
@@ -0,0 +1,36 @@
+.. -*- Mode: rst -*-
+.. include:: ../etc/definitions.rst
+.. include:: ./definitions.rst
+
+
+9. Advanced Topics
+==================
+
+This is a place holder as well as a reminder to myself to write this part of
+the documentation.
+
+
+9.1 Occurrence
+~~~~~~~~~~~~~~
+
+The trans-hierarchical workhorse.
+
+
+9.2 RoutingPads
+~~~~~~~~~~~~~~~
+
+Unlike the Plugs_ that only make connexions between two **adjacent**
+hierarchical levels, RoutingPads_ can refer to a deeply buried terminal.
+
+
+9.3 HyperNets
+~~~~~~~~~~~~~
+
+This class is part of the *virtual flattening* mechanisms, it allows to
+go through all the components of a trans-hierarchical net.
+
+
+9.4 Miscellaeous trans-hierarchical functions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For a starter, how to get all the leaf cells...
diff --git a/documentation/PythonTutorial/CellNetComponent.rst b/documentation/PythonTutorial/CellNetComponent.rst
index 9d3daf94..087ed3fe 100644
--- a/documentation/PythonTutorial/CellNetComponent.rst
+++ b/documentation/PythonTutorial/CellNetComponent.rst
@@ -3,10 +3,17 @@
.. include:: ./definitions.rst
-3. Creating Cell, Net and Component
-=======================================
-In this part, we well show how to create and save a single Cell_.
+3. Making a Standard Cell -- Layout
+===================================
+
+In this part, we well show how to create and save a terminal Cell_,
+that is, a cell without instances (the end point of a hierarchical
+design). To illustrate the case we will draw the layout of a
+standard cell.
+
+We will introduce the following classes : Cell_, Net_, Component_
+and it's derived classes.
3.1 The AllianceFramework (CRL Core)
@@ -161,7 +168,12 @@ not mandatory.
i = Net.create( cell, 'i' )
i.setExternal( True )
-
+.. note:: Unlike some other database models, in |Hurricane|,
+ **there is no explicit terminal object**, you only need to make the
+ net external. For more information about how to connect to an
+ external net, see `6.2 Creating Nets and connecting to Instances`_.
+
+
3.6.3 Creating a Component
--------------------------
@@ -209,3 +221,118 @@ will be written in the |Alliance| ``WORK_DIR``.
.. code-block:: Python
af.saveCell( cell, Catalog.State.Views )
+
+
+3.8 The Complete Example File
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The example files can be found in the ``share/doc/coriolis2/examples/scripts/``
+directory (under the the root of the |Coriolis| installation).
+
+The code needed to run it through the |cgt| viewer as been added. For the
+explanation of that part of the code, refer to `5. Make a script runnable through cgt`_.
+
+
+.. code-block:: Python
+
+ #!/usr/bin/python
+
+ import sys
+ from Hurricane import *
+ from CRL import *
+
+
+ def toDbU ( l ): return DbU.fromLambda(l)
+
+
+ def doBreak ( level, message ):
+ UpdateSession.close()
+ Breakpoint.stop( level, message )
+ UpdateSession.open()
+
+
+ def buildInvertor ( editor ):
+ UpdateSession.open()
+
+ cell = AllianceFramework.get().createCell( 'invertor' )
+ cell.setTerminal( True )
+
+ cell.setAbutmentBox( Box( toDbU(0.0), toDbU(0.0), toDbU(15.0), toDbU(50.0) ) )
+
+ if editor:
+ UpdateSession.close()
+ editor.setCell( cell )
+ editor.fit()
+ UpdateSession.open()
+
+ technology = DataBase.getDB().getTechnology()
+ metal1 = technology.getLayer( "METAL1" )
+ poly = technology.getLayer( "POLY" )
+ ptrans = technology.getLayer( "PTRANS" )
+ ntrans = technology.getLayer( "NTRANS" )
+ pdif = technology.getLayer( "PDIF" )
+ ndif = technology.getLayer( "NDIF" )
+ contdifn = technology.getLayer( "CONT_DIF_N" )
+ contdifp = technology.getLayer( "CONT_DIF_P" )
+ nwell = technology.getLayer( "NWELL" )
+ contpoly = technology.getLayer( "CONT_POLY" )
+ ntie = technology.getLayer( "NTIE" )
+
+ net = Net.create( cell, "nwell" )
+ Vertical.create( net, nwell, toDbU(7.5), toDbU(15.0), toDbU(27.0), toDbU(51.0) )
+
+ vdd = Net.create( cell, "vdd" )
+ vdd.setExternal( True )
+ vdd.setGlobal ( True )
+ h = Horizontal.create(vdd, metal1, toDbU(47.0), toDbU(6.0), toDbU(0.0), toDbU(15.0) )
+ NetExternalComponents.setExternal( h )
+ Contact.create ( vdd, contdifn, toDbU(10.0), toDbU(47.0), toDbU( 1.0), toDbU( 1.0) )
+ Contact.create ( vdd, contdifp, toDbU( 4.0), toDbU(45.0), toDbU( 1.0), toDbU( 1.0) )
+ Vertical.create( vdd, pdif , toDbU( 3.5), toDbU( 4.0), toDbU(28.0), toDbU(46.0) )
+ Vertical.create( vdd, ntie , toDbU(10.0), toDbU( 3.0), toDbU(43.0), toDbU(48.0) )
+ doBreak( 1, 'Done building vdd.' )
+
+ vss = Net.create( cell, "vss" )
+ vss.setExternal( True )
+ vss.setGlobal ( True )
+ h = Horizontal.create(vss, metal1, toDbU(3.0), toDbU(6.0), toDbU(0.0), toDbU(15.0))
+ NetExternalComponents.setExternal( h )
+ Vertical.create( vss, ndif , toDbU(3.5), toDbU(4.0), toDbU(4.0), toDbU(12.0) )
+ Contact.create ( vss, contdifn, toDbU(4.0), toDbU(5.0), toDbU(1.0), toDbU( 1.0) )
+ doBreak( 1, 'Done building vss.' )
+
+ i = Net.create( cell, "i" )
+ i.setExternal( True )
+ v = Vertical.create ( i, metal1, toDbU(5.0), toDbU(2.0), toDbU(10.0), toDbU(40.0) )
+ NetExternalComponents.setExternal( v )
+ Vertical.create ( i, ptrans , toDbU( 7.0), toDbU( 1.0), toDbU(26.0), toDbU(39.0) )
+ Vertical.create ( i, ntrans , toDbU( 7.0), toDbU( 1.0), toDbU( 6.0), toDbU(14.0) )
+ Vertical.create ( i, poly , toDbU( 7.0), toDbU( 1.0), toDbU(14.0), toDbU(26.0) )
+ Horizontal.create( i, poly , toDbU(20.0), toDbU( 3.0), toDbU( 4.0), toDbU( 7.0) )
+ Contact.create ( i, contpoly, toDbU( 5.0), toDbU(20.0), toDbU( 1.0), toDbU( 1.0) )
+ doBreak( 1, 'Done building i.' )
+
+ nq = Net.create ( cell, "nq" )
+ nq.setExternal( True )
+ v = Vertical.create( nq, metal1, toDbU(10.0), toDbU(2.0), toDbU(10.0), toDbU(40.0) )
+ NetExternalComponents.setExternal( v )
+ Vertical.create( nq, pdif , toDbU(10.0), toDbU( 3.0), toDbU(28.0), toDbU(37.0) )
+ Vertical.create( nq, ndif , toDbU(10.0), toDbU( 3.0), toDbU( 8.0), toDbU(12.0) )
+ Contact.create ( nq, contdifp, toDbU(10.0), toDbU(35.0), toDbU( 1.0), toDbU( 1.0) )
+ Contact.create ( nq, contdifp, toDbU(10.0), toDbU(30.5), toDbU( 1.0), toDbU( 1.0) )
+ Contact.create ( nq, contdifn, toDbU(10.0), toDbU(10.0), toDbU( 1.0), toDbU( 1.0) )
+ doBreak( 1, 'Done building q.' )
+
+ UpdateSession.close()
+ AllianceFramework.get().saveCell( cell, Catalog.State.Views )
+
+ return
+
+
+ def ScriptMain ( **kw ):
+ editor = None
+ if kw.has_key('editor') and kw['editor']:
+ editor = kw['editor']
+
+ buildInvertor( editor )
+ return True
diff --git a/documentation/PythonTutorial/CgtScript.rst b/documentation/PythonTutorial/CgtScript.rst
index e384efd9..27027ee2 100644
--- a/documentation/PythonTutorial/CgtScript.rst
+++ b/documentation/PythonTutorial/CgtScript.rst
@@ -20,6 +20,17 @@ using the menu:
* :fboxtt:`Tools` |rightarrow| :fboxtt:`Python Script`. The script
file name must be given without the ``.py`` extension.
+
+.. note:: If you use breakpoints and want to see the progress of your
+ script in the viewer, do not use the ``--script`` option of
+ |cgt|.
+
+ .. code-block:: console
+
+ ego@home:~> cgt -V --script=invertor
+
+ Because the script is run **before** the viewer is launched,
+ you will only see the end result of your script.
.. code-block:: Python
@@ -71,112 +82,3 @@ We can create a little function to ease the work:
UpdateSession.close()
Breakpoint.stop( level, message )
UpdateSession.open()
-
-
-6. The Complete Example File
-============================
-
-The example files can be found in the ``share/doc/coriolis2/examples/scripts/``
-directory (under the the root of the |Coriolis| installation).
-
-.. code-block:: Python
-
- #!/usr/bin/python
-
- import sys
- from Hurricane import *
- from CRL import *
-
-
- def toDbU ( l ): return DbU.fromLambda(l)
-
-
- def doBreak ( level, message ):
- UpdateSession.close()
- Breakpoint.stop( level, message )
- UpdateSession.open()
-
-
- def buildInvertor ( editor ):
- UpdateSession.open()
-
- cell = AllianceFramework.get().createCell( 'invertor' )
- cell.setTerminal( True )
-
- cell.setAbutmentBox( Box( toDbU(0.0), toDbU(0.0), toDbU(15.0), toDbU(50.0) ) )
-
- if editor:
- UpdateSession.close()
- editor.setCell( cell )
- editor.fit()
- UpdateSession.open()
-
- technology = DataBase.getDB().getTechnology()
- metal1 = technology.getLayer( "METAL1" )
- poly = technology.getLayer( "POLY" )
- ptrans = technology.getLayer( "PTRANS" )
- ntrans = technology.getLayer( "NTRANS" )
- pdif = technology.getLayer( "PDIF" )
- ndif = technology.getLayer( "NDIF" )
- contdifn = technology.getLayer( "CONT_DIF_N" )
- contdifp = technology.getLayer( "CONT_DIF_P" )
- nwell = technology.getLayer( "NWELL" )
- contpoly = technology.getLayer( "CONT_POLY" )
- ntie = technology.getLayer( "NTIE" )
-
- net = Net.create( cell, "nwell" )
- Vertical.create( net, nwell, toDbU(7.5), toDbU(15.0), toDbU(27.0), toDbU(51.0) )
-
- vdd = Net.create( cell, "vdd" )
- vdd.setExternal( True )
- vdd.setGlobal ( True )
- h = Horizontal.create(vdd, metal1, toDbU(47.0), toDbU(6.0), toDbU(0.0), toDbU(15.0) )
- NetExternalComponents.setExternal( h )
- Contact.create ( vdd, contdifn, toDbU(10.0), toDbU(47.0), toDbU( 1.0), toDbU( 1.0) )
- Contact.create ( vdd, contdifp, toDbU( 4.0), toDbU(45.0), toDbU( 1.0), toDbU( 1.0) )
- Vertical.create( vdd, pdif , toDbU( 3.5), toDbU( 4.0), toDbU(28.0), toDbU(46.0) )
- Vertical.create( vdd, ntie , toDbU(10.0), toDbU( 3.0), toDbU(43.0), toDbU(48.0) )
- doBreak( 1, 'Done building vdd.' )
-
- vss = Net.create( cell, "vss" )
- vss.setExternal( True )
- vss.setGlobal ( True )
- h = Horizontal.create(vss, metal1, toDbU(3.0), toDbU(6.0), toDbU(0.0), toDbU(15.0))
- NetExternalComponents.setExternal( h )
- Vertical.create( vss, ndif , toDbU(3.5), toDbU(4.0), toDbU(4.0), toDbU(12.0) )
- Contact.create ( vss, contdifn, toDbU(4.0), toDbU(5.0), toDbU(1.0), toDbU( 1.0) )
- doBreak( 1, 'Done building vss.' )
-
- i = Net.create( cell, "i" )
- i.setExternal( True )
- v = Vertical.create ( i, metal1, toDbU(5.0), toDbU(2.0), toDbU(10.0), toDbU(40.0) )
- NetExternalComponents.setExternal( v )
- Vertical.create ( i, ptrans , toDbU( 7.0), toDbU( 1.0), toDbU(26.0), toDbU(39.0) )
- Vertical.create ( i, ntrans , toDbU( 7.0), toDbU( 1.0), toDbU( 6.0), toDbU(14.0) )
- Vertical.create ( i, poly , toDbU( 7.0), toDbU( 1.0), toDbU(14.0), toDbU(26.0) )
- Horizontal.create( i, poly , toDbU(20.0), toDbU( 3.0), toDbU( 4.0), toDbU( 7.0) )
- Contact.create ( i, contpoly, toDbU( 5.0), toDbU(20.0), toDbU( 1.0), toDbU( 1.0) )
- doBreak( 1, 'Done building i.' )
-
- nq = Net.create ( cell, "nq" )
- nq.setExternal( True )
- v = Vertical.create( nq, metal1, toDbU(10.0), toDbU(2.0), toDbU(10.0), toDbU(40.0) )
- NetExternalComponents.setExternal( v )
- Vertical.create( nq, pdif , toDbU(10.0), toDbU( 3.0), toDbU(28.0), toDbU(37.0) )
- Vertical.create( nq, ndif , toDbU(10.0), toDbU( 3.0), toDbU( 8.0), toDbU(12.0) )
- Contact.create ( nq, contdifp, toDbU(10.0), toDbU(35.0), toDbU( 1.0), toDbU( 1.0) )
- Contact.create ( nq, contdifp, toDbU(10.0), toDbU(30.5), toDbU( 1.0), toDbU( 1.0) )
- Contact.create ( nq, contdifn, toDbU(10.0), toDbU(10.0), toDbU( 1.0), toDbU( 1.0) )
- doBreak( 1, 'Done building q.' )
-
- UpdateSession.close()
- return
-
-
- def ScriptMain ( **kw ):
- editor = None
- if kw.has_key('editor') and kw['editor']:
- editor = kw['editor']
-
- buildInvertor( editor )
- return True
diff --git a/documentation/PythonTutorial/Introduction.rst b/documentation/PythonTutorial/Introduction.rst
index 02eddbab..fa4c1de0 100644
--- a/documentation/PythonTutorial/Introduction.rst
+++ b/documentation/PythonTutorial/Introduction.rst
@@ -23,7 +23,29 @@ All |Hurricane| objects implements the |Python| ``__str__()`` function,
they print the result of C++ ``::getString()``.
-1.1 Generalities
+1.1 Terminology
+~~~~~~~~~~~~~~~
+
+In the |Hurricane| database, the *logical* (netlist) and *physical* (layout)
+views are fused. As the main goal of the database is to support place & route
+tools, we usually starts with a *pure* netlist which is progessively enriched
+to become a layout. Cell, in particular, is able to be in any intermediate
+state. Many of our objects have self-explanatory names, but some
+don't. Thus we summarize below the more important ones:
+
+=============== =====================================================
+**Class** **Meaning**
+=============== =====================================================
+Cell_ The model. A Cell do not have terminals, only nets
+ flagged as *external*
+Instance_ An instance of a model
+Net_ A grouping of electrically connecteds components
+Plug_ A terminal of an instance
+RoutingPad_ A physical connexion (*pin*) to an instance
+=============== =====================================================
+
+
+1.2 Generalities
~~~~~~~~~~~~~~~~
The C++ API has been exported in Python as closely as possible. Meaning
@@ -85,7 +107,7 @@ The equivalent |Python| code will be:
UpdateSession.close()
-1.2 Various Kinds of Constructors
+1.3 Various Kinds of Constructors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Regarding the memory allocation, the |Hurricane| database contains two kind of objects.
diff --git a/documentation/PythonTutorial/Netlist.rst b/documentation/PythonTutorial/Netlist.rst
new file mode 100644
index 00000000..0d9c99dc
--- /dev/null
+++ b/documentation/PythonTutorial/Netlist.rst
@@ -0,0 +1,399 @@
+.. -*- Mode: rst -*-
+.. include:: ../etc/definitions.rst
+.. include:: ./definitions.rst
+
+
+6. Making a hierarchical Cell -- Netlist
+========================================
+
+To illustrate the topic, we will build the netlist of a fulladder from
+standard cell.
+
+|fulladder_1|
+
+
+6.1 Creating an Instance_
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Creating an Instance_ is straigthforward, the constructor needs only three
+parameters:
+
+#. The Cell_ **into which** the instance is to be created.
+#. The name of the instance.
+#. The **master cell**, the Cell_ model it refers to. The master cell
+ will be part of the hierarchical level just below the ``fulladder``
+ cell.
+
+.. note:: Do not confuse the cell the instance is create into (``fulladder``)
+ and the cells it refers to (the *master cell* ``xr2_x2``).
+
+.. code-block:: Python
+
+ af = AllianceFramework.get()
+ xr2_x2 = af.getCell( 'xr2_x1', Catalog.State.Views )
+
+ fulladder = af.createCell( 'fulladder' )
+ xr2_1 = Instance.create( fulladder, 'xr2_1', xr2_x2 )
+
+
+6.2 Creating Nets and connecting to Instances
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+An Instance_ as one Plug_ for each external net of the *master cell*.
+The plug allows to create a **logical** connexion bewteen a Net_ of
+``fulladder`` and a net from an Instance_ *master cell*.
+
+A plug is somewhat equivalent to an *instance terminal* in others
+well known databases.
+
+Therefore, a plug is related to two nets:
+
+#. The net of the *master cell* it is linked to. Obviously that
+ net cannot be changed. You can access the master net with the
+ function ``plug.getMasterNet()``.
+
+#. The net of ``fulladder`` the plug is connected to. This can
+ be set, it is how we build the netlist. To set the net, use
+ the function ``plug.setNet( net )``. It the argument is ``None``,
+ the plug is *disconnected*.
+
+To find the plug of an instance associated to a given net in
+the *master cell*, use ``instance.getPlug( masterNet )``.
+The ``masterNet`` argument being an object of class net (not
+it's name).
+
+Building the :cb:`a` net of ``fulladder``:
+
+.. code-block:: Python
+
+ a = Net.create( fulladder, "a" )
+ a.setExternal( True )
+ xr2_1.getPlug( xr2_x2.getNet("i0") ).setNet( a )
+ a2_1 .getPlug( a2_x2.getNet("i0") ).setNet( a )
+
+
+.. note:: **Limitation of Hurricane Netlists.** There is no explicit
+ terminal object in the |Hurricane| database. Plugs are
+ generated *on the fly* for each *external net* of the
+ instance. One important consequence is that a *net*
+ cannot appear on the interface as two differently named
+ terminals (sometimes referred as *weekly connected*
+ terminals). There is a strict bijection between external
+ nets and plugs.
+
+ While it may be restrictive, it enforce cleaner designs
+ and make it possible for the HyperNet_ concept/class.
+
+
+6.3 Power supplies special case
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For supplies, it may be tedious to connect the Plugs_ of each cell one by one
+(and create a lot of uneeded objects). To avoid that, we may use **Named
+connections**. If a signal in ``fulladder`` is set to *global*, then it will
+be considered as connected to any signal with the *same name* and *global* in
+the master cell of the instances.
+
+.. code-block:: Python
+
+ vdd = Net.create( fulladder, "vdd" )
+ vdd.setExternal( True )
+ vdd.setGlobal ( True ) # Will be connected to all the instances.
+
+
+6.4 Creating the physical view of a Cell netlist
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Even if loaded in the viewer, an Instance will not be displayed
+until it is placed.
+
+
+6.4.1 Transformation
+--------------------
+
+To place an Instance, we apply a Transformation_ to the coordinate system
+of the *master cell*. A transformation is composed of two operations :
+
+#. An Orientation_, which can be a symmetry or a rotation (or a combination
+ of those two). The Orientation **is applied first** to the coordinate
+ system of the *master cell*. The complete list of Orientation and their
+ codes are given on the Orientation documentation page.
+
+#. A **Translation**, applied in second. Translation are represented by
+ Points_.
+
+The transformation is a change of coordinate system, be aware that if the
+abutment box lower left corner of the *master* cell is **not** at ``(0,0)``
+the result of the Transformation may not be what you expect. To simplificate
+the computation of the transformation of an instance, always place the
+lower left corner of the abutment box at ``(0,0)``
+
+
+6.4.2 Placing an Instance
+-------------------------
+
+Assuming that we want to place the cells of the ``fulladder`` into two rows,
+that the abutment box lower left corner is at ``(0,0)`` (same for the
+``xr2_x2`` *master cell* layout). Here is the code to place the ``xr2_1``
+instance to left of the second row.
+
+Setting the translation on an Instance_ is not enough to make it be displayed,
+we also must set it's *placement status* to ``Instance.PlacementStatus.PLACED``.
+
+.. code-block:: Python
+
+ xr2_1.setTransformation( Transformation( DbU.fromLambda( 0.0)
+ , DbU.fromLambda(100.0)
+ , Transformation.Orientation.MY ) )
+ xr2_1.setPlacementStatus( Instance.PlacementStatus.PLACED )
+
+
+6.4.3 Nets -- From Plugs to RoutingPads
+---------------------------------------
+
+As was stated before, Plugs_ represent a logical connexion between two
+levels of hierarchy. To make the physical connexion to the *master net*
+in the instance, we now must create, in the ``fulladder``, a special
+component which is a kind of *reference* to a component of the
+*master net* (in the master cell).
+
+The so called *special component* is a RoutingPad_.
+
+The ``RoutingPad`` can be considered as an equivalent to ``pin`` in others
+well known databases.
+
+.. code-block:: Python
+
+ rp = RoutingPad.create( a
+ , Occurrence( xr2_1.getPlug( xr2_x2.getNet("i0")) )
+ , RoutingPad.BiggestArea )
+
+For the second parameter, we must pass an Occurrence_. Occurrence objects will
+be explained in detail later, for now, suffice to say that we must construct the
+Occurrence object with one parameter : the Plug_ for which we want to create a
+physical connexion.
+
+The RoutingPad_ ``rp`` will be a component of the ``a`` net.
+
+The third argument ask the constructor of the RoutingPad_ to select in the
+master net, the component which has the biggest area.
+
+.. note:: **Component selection.** Not all the components of a net can be
+ selected for connexion through a RoutingPad_. The candidates must
+ have been flagged with the NetExternalComponents_ class.
+
+ See `3.6.3 Creating a Component`_.
+
+
+6.4.4 Nets -- Regular wiring
+----------------------------
+
+After the creation of the RoutingPads_, the wiring is to be created with
+ordinary layout components (Horizontal_, Vertical_ and Contact_ possibly
+articulated). Here is the complete code for net ``a``. We made an articulated
+layout where contacts are created over RoutingPads_ then segments over
+contacts.
+
+.. code-block:: Python
+
+ # Build wiring for a.
+ # Create RoutingPads first.
+ rp1 = RoutingPad.create( a
+ , Occurrence( xr2_1.getPlug( xr2_x2.getNet("i0")) )
+ , RoutingPad.BiggestArea )
+ rp2 = RoutingPad.create( a
+ , Occurrence( a2_1.getPlug( a2_x2.getNet("i0")) )
+ , RoutingPad.BiggestArea )
+
+ # Then regular wiring.
+ contact1 = Contact.create( rp1, via12, toDbU( 0.0), toDbU(-15.0) )
+ contact2 = Contact.create( rp2, via12, toDbU( 0.0), toDbU( 10.0) )
+ turn = Contact.create( a , via23, toDbU(10.0), toDbU( 35.0) )
+ Horizontal.create( contact2, turn , metal2, toDbU(35.0), toDbU(2.0) )
+ Vertical .create( turn , contact1 , metal3, toDbU(10.0), toDbU(2.0) )
+
+
+.. note:: In order to better see the layout of the wiring only, open the
+ ``Controller`` and in the :fboxtt:`Filter` tab, uncheck
+ :fboxtt:`Process Terminal Cells`.
+
+
+6.5 The Complete Example File
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The example file ``fulladder.py`` can be found in the ``share/doc/coriolis2/examples/scripts/``
+directory (under the the root of the |Coriolis| installation).
+
+.. code-block:: Python
+
+ #!/usr/bin/python
+
+ import sys
+ from Hurricane import *
+ from CRL import *
+
+
+ def toDbU ( l ): return DbU.fromLambda(l)
+
+
+ def doBreak ( level, message ):
+ UpdateSession.close()
+ Breakpoint.stop( level, message )
+ UpdateSession.open()
+
+
+ def buildFulladder ( editor ):
+
+ # Get the Framework and all the master cells.
+ af = AllianceFramework.get()
+ xr2_x2 = af.getCell( 'xr2_x1', Catalog.State.Views )
+ a2_x2 = af.getCell( 'a2_x2' , Catalog.State.Views )
+ o2_x2 = af.getCell( 'o2_x2' , Catalog.State.Views )
+
+ UpdateSession.open()
+
+ fulladder = af.createCell( 'fulladder' )
+ fulladder.setAbutmentBox( Box( toDbU(0.0), toDbU(0.0), toDbU(90.0), toDbU(100.0) ) )
+
+ if editor:
+ UpdateSession.close()
+ editor.setCell( fulladder )
+ editor.fit()
+ UpdateSession.open()
+
+ # Create Instances.
+ a2_1 = Instance.create( fulladder, 'a2_1', a2_x2 )
+ a2_2 = Instance.create( fulladder, 'a2_2', a2_x2 )
+ xr2_1 = Instance.create( fulladder, 'xr2_1', xr2_x2 )
+ xr2_2 = Instance.create( fulladder, 'xr2_2', xr2_x2 )
+ o2_1 = Instance.create( fulladder, 'o2_1', o2_x2 )
+
+ # Create Nets.
+ vss = Net.create( fulladder, "vss" )
+ vss.setExternal( True )
+ vss.setGlobal ( True )
+
+ vdd = Net.create( fulladder, "vdd" )
+ vdd.setExternal( True )
+ vdd.setGlobal ( True )
+
+ cin = Net.create( fulladder, "cin" )
+ cin.setExternal( True )
+ xr2_2.getPlug( xr2_x2.getNet('i0') ).setNet( cin )
+ a2_2 .getPlug( a2_x2.getNet('i0') ).setNet( cin )
+
+ a = Net.create( fulladder, 'a' )
+ a.setExternal( True )
+ xr2_1.getPlug( xr2_x2.getNet('i0') ).setNet( a )
+ a2_1 .getPlug( a2_x2.getNet('i0') ).setNet( a )
+
+ b = Net.create( fulladder, 'b' )
+ b.setExternal( True )
+ xr2_1.getPlug( xr2_x2.getNet('i1') ).setNet( b )
+ a2_1 .getPlug( a2_x2.getNet('i1') ).setNet( b )
+
+ sout_1 = Net.create( fulladder, 'sout_1' )
+ xr2_1.getPlug( xr2_x2.getNet('q' ) ).setNet( sout_1 )
+ xr2_2.getPlug( xr2_x2.getNet('i1') ).setNet( sout_1 )
+ a2_2 .getPlug( a2_x2.getNet('i1') ).setNet( sout_1 )
+
+ carry_1 = Net.create( fulladder, 'carry_1' )
+ a2_1.getPlug( a2_x2.getNet('q' ) ).setNet( carry_1 )
+ o2_1.getPlug( o2_x2.getNet('i1') ).setNet( carry_1 )
+
+ carry_2 = Net.create( fulladder, 'carry_2' )
+ a2_2.getPlug( a2_x2.getNet('q' ) ).setNet( carry_2 )
+ o2_1.getPlug( o2_x2.getNet('i0') ).setNet( carry_2 )
+
+ sout = Net.create( fulladder, 'sout' )
+ sout.setExternal( True )
+ xr2_2.getPlug( xr2_x2.getNet('q') ).setNet( sout )
+
+ cout = Net.create( fulladder, 'cout' )
+ cout.setExternal( True )
+ o2_1.getPlug( o2_x2.getNet('q') ).setNet( cout )
+
+ # Instances placement.
+ a2_1.setTransformation( Transformation( toDbU(0.0)
+ , toDbU(0.0)
+ , Transformation.Orientation.ID ) )
+ a2_1.setPlacementStatus( Instance.PlacementStatus.PLACED )
+ doBreak( 1, 'Placed a2_1' )
+
+ xr2_1.setTransformation( Transformation( toDbU( 0.0)
+ , toDbU(100.0)
+ , Transformation.Orientation.MY ) )
+ xr2_1.setPlacementStatus( Instance.PlacementStatus.PLACED )
+ doBreak( 1, 'Placed xr2_1' )
+
+ a2_2.setTransformation( Transformation( toDbU(25.0)
+ , toDbU( 0.0)
+ , Transformation.Orientation.ID ) )
+ a2_2.setPlacementStatus( Instance.PlacementStatus.PLACED )
+ doBreak( 1, 'Placed a2_2' )
+
+ xr2_2.setTransformation( Transformation( toDbU( 45.0)
+ , toDbU(100.0)
+ , Transformation.Orientation.MY ) )
+ xr2_2.setPlacementStatus( Instance.PlacementStatus.PLACED )
+ doBreak( 1, 'Placed xr2_2' )
+
+ o2_1.setTransformation( Transformation( toDbU(65.0)
+ , toDbU( 0.0)
+ , Transformation.Orientation.ID ) )
+ o2_1.setPlacementStatus( Instance.PlacementStatus.PLACED )
+ doBreak( 1, 'Placed o2_1' )
+
+ # Add filler cells.
+ tie_x0 = af.getCell( 'tie_x0', Catalog.State.Views )
+ rowend_x0 = af.getCell( 'rowend_x0', Catalog.State.Views )
+ filler_1 = Instance.create( fulladder, 'filler_1', tie_x0 )
+ filler_2 = Instance.create( fulladder, 'filler_2', rowend_x0 )
+
+ filler_1.setTransformation( Transformation( toDbU(50.0)
+ , toDbU( 0.0)
+ , Transformation.Orientation.ID ) )
+ filler_1.setPlacementStatus( Instance.PlacementStatus.PLACED )
+
+ filler_2.setTransformation( Transformation( toDbU(60.0)
+ , toDbU( 0.0)
+ , Transformation.Orientation.ID ) )
+ filler_2.setPlacementStatus( Instance.PlacementStatus.PLACED )
+ doBreak( 1, 'Filler cell placeds' )
+
+ # Getting the layers.
+ technology = DataBase.getDB().getTechnology()
+ metal2 = technology.getLayer( "METAL2" )
+ metal3 = technology.getLayer( "METAL3" )
+ via12 = technology.getLayer( "VIA12" )
+ via23 = technology.getLayer( "VIA23" )
+
+ # Build wiring for a.
+ # Create RoutingPads first.
+ rp1 = RoutingPad.create( a
+ , Occurrence( xr2_1.getPlug( xr2_x2.getNet("i0")) )
+ , RoutingPad.BiggestArea )
+ rp2 = RoutingPad.create( a
+ , Occurrence( a2_1.getPlug( a2_x2.getNet("i0")) )
+ , RoutingPad.BiggestArea )
+
+ # Then regular wiring.
+ contact1 = Contact.create( rp1, via12, toDbU( 0.0), toDbU(-15.0) )
+ contact2 = Contact.create( rp2, via12, toDbU( 0.0), toDbU( 10.0) )
+ turn = Contact.create( a , via23, toDbU(10.0), toDbU( 35.0) )
+ Horizontal.create( contact2, turn , metal2, toDbU(35.0), toDbU(2.0) )
+ Vertical .create( turn , contact1 , metal3, toDbU(10.0), toDbU(2.0) )
+
+ UpdateSession.close()
+
+ af.saveCell( fulladder, Catalog.State.Views )
+ return
+
+
+ def ScriptMain ( **kw ):
+ editor = None
+ if kw.has_key('editor') and kw['editor']:
+ editor = kw['editor']
+
+ buildFulladder( editor )
+ return True
diff --git a/documentation/PythonTutorial/PythonTutorial.pdf b/documentation/PythonTutorial/PythonTutorial.pdf
index 2ee05589..1b86a784 100644
Binary files a/documentation/PythonTutorial/PythonTutorial.pdf and b/documentation/PythonTutorial/PythonTutorial.pdf differ
diff --git a/documentation/PythonTutorial/RealDesigns.rst b/documentation/PythonTutorial/RealDesigns.rst
new file mode 100644
index 00000000..1bbe68a8
--- /dev/null
+++ b/documentation/PythonTutorial/RealDesigns.rst
@@ -0,0 +1,51 @@
+.. -*- Mode: rst -*-
+.. include:: ../etc/definitions.rst
+.. include:: ./definitions.rst
+
+
+7. Working in real mode
+=======================
+
+The AllianceFramework_ only manage *symbolic* layout as |Alliance| do.
+But |Coriolis| is also able to work directly in *real* mode, meaning
+that distances will be expresseds in microns instead of lambdas.
+
+The *real* mode will be illustrated by working with the FreePDK45_.
+
+We will assume that the FreePDK45_ archives is installed under: ::
+
+ /home/dks/
+
+
+7.1 Loading a |LEF| file
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Importing a |LEF| file is simple, you just call the static function
+``LefImport.load()``. Multiple |LEF| file can be imported one after
+another.
+
+.. code-block:: Python
+
+ # You must set "DKsdir" to where you did install the NCSU FreePDK 45nm DK.
+ DKsdir = '/home/dks'
+
+ library = LefImport.load( DKsdir + '/FreePDK45/osu_soc/lib/files/gscl45nm.lef' )
+
+
+.. note:: **Technology checking.** The first imported |LEF| file must contains the
+ technology. The technology described in the |LEF| file will be checked
+ against the one configured in the running instance of |Coriolis| to look
+ for any discrepencies.
+
+
+7.2 Loading a |Blif| file -- |Yosys|
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The |Blif| format is generated by the Yosys_ logic synthetizer. Here again, it is
+pretty straightforward: call the static function ``Blif.load()``. If you did make
+your synthesis on a cell library not managed by AllianceFramework_, For example
+the one of the FreePDK45, you must load it prior to calling the |Blif| loader.
+
+.. code-block:: Python
+
+ cell = Blif.load( 'snx' ) # load "snx.blif" in the working directory.
diff --git a/documentation/PythonTutorial/ToolEngines.rst b/documentation/PythonTutorial/ToolEngines.rst
new file mode 100644
index 00000000..9b3f68b8
--- /dev/null
+++ b/documentation/PythonTutorial/ToolEngines.rst
@@ -0,0 +1,213 @@
+.. -*- Mode: rst -*-
+.. include:: ../etc/definitions.rst
+.. include:: ./definitions.rst
+
+
+8. Tool Engines (CRL Core)
+==========================
+
+The ToolEngine_ class is the base class for all tools developpeds in
+|Coriolis|. In the rest of the tutorial we will use the names ``tool``
+or ``engine`` as synonyms.
+
+
+8.1 Placer -- Etesian
+~~~~~~~~~~~~~~~~~~~~~
+
+To run the placer, create the |Etesian| engine, then call the ``place()``
+function.
+
+.. code-block:: Python
+
+ import Etesian
+
+ # [...]
+
+ etesian = Etesian.EtesianEngine.create(cell)
+ etesian.place()
+
+You can configure the placer in two ways:
+
+#. Prior to the creation of the engine, setup an abutment for the cell.
+ The placer will fit the cells into that area. If the area is too
+ small, it will issue an error.
+
+#. Setup |Etesian| parameters through the ``settings.py`` configuration
+ file. For example:
+
+ .. code-block:: Python
+
+ parametersTable = \
+ ( ("etesian.effort" , TypeEnumerate , 2 )
+ , ('etesian.uniformDensity' , TypeBool , True )
+ , ('etesian.spaceMargin' , TypePercentage, 3.0 )
+ , ('etesian.aspectRatio' , TypePercentage, 100.0 )
+ )
+
+ With this setup, the cells will be spread uniformally over the
+ area (``etesian.uniformDensity``), with ``3.0%`` of free space
+ added and an aspect ratio of ``100%`` (square shape).
+
+
+8.1 Router -- Katana
+~~~~~~~~~~~~~~~~~~~~
+
+Like for |Etesian|, you have to create the engine on the cell then call
+the sequence of functions detailed below.
+
+.. note:: **Kite vs. Katana.** There are currently two router in |Coriolis|,
+ |Kite| is the old one and digital only. |Katana| is a re-implementation
+ with support for mixed routing (digital **and** analog).
+ Until |Katana| is fully implemented we keep both of them.
+
+.. code-block:: Python
+
+ import Anabatic
+ import Katana
+
+ # [...]
+
+ katana = Katana.KatanaEngine.create(cell)
+ katana.digitalInit ()
+ katana.runGlobalRouter ()
+ katana.loadGlobalRouting( Anabatic.EngineLoadGrByNet )
+ katana.layerAssign ( Anabatic.EngineNoNetLayerAssign )
+ katana.runNegociate ( Katana.Flags.NoFlags )
+
+
+8.2 A Complete Example
+~~~~~~~~~~~~~~~~~~~~~~~
+
+The example file ``toolengines.py`` can be found in the ``share/doc/coriolis2/examples/scripts/``
+directory (under the the root of the |Coriolis| installation).
+
+This script automatically place and route the ``fulladder`` netlist as seen
+previously. The call to the ToolEngines_ is made inside the new function
+``placeAndRoute()``.
+
+.. note:: As the ``ToolEngine`` take care of opening and closing UpdateSession_, we
+ do not need the wrapper function ``doBreak()`` around the breakpoints.
+ We directly call Breakpoint_.
+
+.. note:: The space margin for this example is very high (``30%``), it's only
+ because it's too small for the placer to run correctly. For normal
+ case it is around ``3%``.
+
+.. code-block:: Python
+
+ #!/usr/bin/python
+
+ import sys
+ from Hurricane import *
+ from CRL import *
+ import Etesian
+ import Anabatic
+ import Katana
+
+ # Everybody needs it.
+ af = AllianceFramework.get()
+
+
+ def toDbU ( l ): return DbU.fromLambda(l)
+
+
+ def buildFulladder ( editor ):
+
+ # Get the Framework and all the master cells.
+ xr2_x2 = af.getCell( 'xr2_x1', Catalog.State.Views )
+ a2_x2 = af.getCell( 'a2_x2' , Catalog.State.Views )
+ o2_x2 = af.getCell( 'o2_x2' , Catalog.State.Views )
+
+ UpdateSession.open()
+
+ fulladder = af.createCell( 'fulladder' )
+
+ # Create Instances.
+ a2_1 = Instance.create( fulladder, 'a2_1', a2_x2 )
+ a2_2 = Instance.create( fulladder, 'a2_2', a2_x2 )
+ xr2_1 = Instance.create( fulladder, 'xr2_1', xr2_x2 )
+ xr2_2 = Instance.create( fulladder, 'xr2_2', xr2_x2 )
+ o2_1 = Instance.create( fulladder, 'o2_1', o2_x2 )
+
+ # Create Nets.
+ vss = Net.create( fulladder, "vss" )
+ vss.setExternal( True )
+ vss.setGlobal ( True )
+
+ vdd = Net.create( fulladder, "vdd" )
+ vdd.setExternal( True )
+ vdd.setGlobal ( True )
+
+ cin = Net.create( fulladder, "cin" )
+ cin.setExternal( True )
+ xr2_2.getPlug( xr2_x2.getNet('i0') ).setNet( cin )
+ a2_2 .getPlug( a2_x2.getNet('i0') ).setNet( cin )
+
+ a = Net.create( fulladder, 'a' )
+ a.setExternal( True )
+ xr2_1.getPlug( xr2_x2.getNet('i0') ).setNet( a )
+ a2_1 .getPlug( a2_x2.getNet('i0') ).setNet( a )
+
+ b = Net.create( fulladder, 'b' )
+ b.setExternal( True )
+ xr2_1.getPlug( xr2_x2.getNet('i1') ).setNet( b )
+ a2_1 .getPlug( a2_x2.getNet('i1') ).setNet( b )
+
+ sout_1 = Net.create( fulladder, 'sout_1' )
+ xr2_1.getPlug( xr2_x2.getNet('q' ) ).setNet( sout_1 )
+ xr2_2.getPlug( xr2_x2.getNet('i1') ).setNet( sout_1 )
+ a2_2 .getPlug( a2_x2.getNet('i1') ).setNet( sout_1 )
+
+ carry_1 = Net.create( fulladder, 'carry_1' )
+ a2_1.getPlug( a2_x2.getNet('q' ) ).setNet( carry_1 )
+ o2_1.getPlug( o2_x2.getNet('i1') ).setNet( carry_1 )
+
+ carry_2 = Net.create( fulladder, 'carry_2' )
+ a2_2.getPlug( a2_x2.getNet('q' ) ).setNet( carry_2 )
+ o2_1.getPlug( o2_x2.getNet('i0') ).setNet( carry_2 )
+
+ sout = Net.create( fulladder, 'sout' )
+ sout.setExternal( True )
+ xr2_2.getPlug( xr2_x2.getNet('q') ).setNet( sout )
+
+ cout = Net.create( fulladder, 'cout' )
+ cout.setExternal( True )
+ o2_1.getPlug( o2_x2.getNet('q') ).setNet( cout )
+
+ UpdateSession.close()
+
+ af.saveCell( fulladder, Catalog.State.Views )
+ return fulladder
+
+
+ def placeAndRoute ( editor, cell ):
+ # Run the placer.
+ etesian = Etesian.EtesianEngine.create(cell)
+ etesian.place()
+
+ if editor:
+ editor.setCell( cell )
+ editor.fit()
+
+ Breakpoint.stop( 1, 'After placement' )
+
+ # Run the router.
+ katana = Katana.KatanaEngine.create(cell)
+ katana.digitalInit ()
+ katana.runGlobalRouter ()
+ katana.loadGlobalRouting( Anabatic.EngineLoadGrByNet )
+ katana.layerAssign ( Anabatic.EngineNoNetLayerAssign )
+ katana.runNegociate ( Katana.Flags.NoFlags )
+
+ af.saveCell( cell, Catalog.State.Views )
+ return
+
+
+ def ScriptMain ( **kw ):
+ editor = None
+ if kw.has_key('editor') and kw['editor']:
+ editor = kw['editor']
+
+ fulladder = buildFulladder( editor )
+ placeAndRoute( editor, fulladder )
+ return True
diff --git a/documentation/PythonTutorial/definitions.rst b/documentation/PythonTutorial/definitions.rst
index 6878f356..fd8d78ad 100644
--- a/documentation/PythonTutorial/definitions.rst
+++ b/documentation/PythonTutorial/definitions.rst
@@ -2,6 +2,7 @@
.. Hurricane doxygen doc links.
+.. _Breakpoint: ../../hurricane/classHurricane_1_1Breakpoint.html
.. _UpdateSession: ../../hurricane/classHurricane_1_1UpdateSession.html
.. _Layer: ../../hurricane/classHurricane_1_1Layer.html
.. _Layers: ../../hurricane/classHurricane_1_1Layer.html
@@ -9,25 +10,47 @@
.. _DataBase: ../../hurricane/classHurricane_1_1DataBase.html
.. _DbU: ../../hurricane/classHurricane_1_1DbU.html
.. _Point: ../../hurricane/classHurricane_1_1Point.html
+.. _Points: ../../hurricane/classHurricane_1_1Point.html
.. _Box: ../../hurricane/classHurricane_1_1Box.html
.. _Cell: ../../hurricane/classHurricane_1_1Cell.html
.. _Net: ../../hurricane/classHurricane_1_1Net.html
.. _Nets: ../../hurricane/classHurricane_1_1Net.html
.. _NetExternalComponents: ../../hurricane/classHurricane_1_1NetExternalComponents.html
+.. _HyperNet: ../../hurricane/classHurricane_1_1HyperNet.html
.. _Component: ../../hurricane/classHurricane_1_1Component.html
.. _Components: ../../hurricane/classHurricane_1_1Component.html
.. _Contact: ../../hurricane/classHurricane_1_1Contact.html
+.. _Contacts: ../../hurricane/classHurricane_1_1Contact.html
.. _Pad: ../../hurricane/classHurricane_1_1Pad.html
.. _RoutingPad: ../../hurricane/classHurricane_1_1RoutingPad.html
+.. _RoutingPads: ../../hurricane/classHurricane_1_1RoutingPad.html
.. _Horizontal: ../../hurricane/classHurricane_1_1Horizontal.html
.. _Vertical: ../../hurricane/classHurricane_1_1Vertical.html
.. _Plug: ../../hurricane/classHurricane_1_1Plug.html
+.. _Plugs: ../../hurricane/classHurricane_1_1Plug.html
.. _Collection: ../../hurricane/classHurricane_1_1Collection.html
+.. _Instance: ../../hurricane/classHurricane_1_1Instance.html
+.. _Instances: ../../hurricane/classHurricane_1_1Instance.html
+.. _Transformation: ../../hurricane/classHurricane_1_1Transformation.html
+.. _Orientation: ../../hurricane/classHurricane_1_1Orientation.html
+.. _Occurrence: ../../hurricane/classHurricane_1_1Occurrence.html
.. Hurricane Viewer doxygen doc links.
.. _CellViewer: ../../viewer/classHurricane_1_1CellViewer.html
.. CRL Core doxygen doc links.
.. _AllianceFramework: ../../crlcore/classCRL_1_1AllianceFramework.html
+.. _ToolEngine: ../../crlcore/classCRL_1_1ToolEngine.html
+.. _ToolEngines: ../../crlcore/classCRL_1_1ToolEngine.html
+
+.. Hurricane Python Tutorial internal links.
+.. _5. Make a script runnable through cgt: ./CgtScript.html
+.. _3.6.3 Creating a Component: ./CellNetComponent.html#id1
+.. _6.2 Creating Nets and connecting to Instances: ./Netlist.html#id1
.. |rightarrow| replace:: :math:`\rightarrow`
+
+.. |fulladder_1| image:: ./images/fulladder-1.png
+ :alt: The fulladder netlist
+ :align: middle
+ :width: 80%
diff --git a/documentation/PythonTutorial/images/fulladder-1.png b/documentation/PythonTutorial/images/fulladder-1.png
new file mode 100644
index 00000000..21445b49
Binary files /dev/null and b/documentation/PythonTutorial/images/fulladder-1.png differ
diff --git a/documentation/PythonTutorial/index.rst b/documentation/PythonTutorial/index.rst
index e1ff7fe8..324dd20b 100644
--- a/documentation/PythonTutorial/index.rst
+++ b/documentation/PythonTutorial/index.rst
@@ -4,11 +4,15 @@
=========================
-Hurricane Python Tutorial
+Hurricane+Python Tutorial
=========================
Printable version of this document `PythonTutorial.pdf <../../../pdf/main/PythonTutorial.pdf>`_.
+First, a small disclaimer. This tutorial assume that you are already familiar
+with the concepts of |VLSI| designs, such as *netlist*, *layout*, *instances*
+and hierarchical design.
+
.. toctree::
:maxdepth: 2
@@ -18,4 +22,8 @@ Printable version of this document `PythonTutorial.pdf <../../../pdf/main/Python
CellNetComponent.rst
Collections.rst
CgtScript.rst
+ Netlist.rst
+ RealDesigns.rst
+ ToolEngines.rst
+ AdvancedTopics.rst
diff --git a/documentation/PythonTutorial/pdfHeader.rst b/documentation/PythonTutorial/pdfHeader.rst
index 775c454a..584bd6cd 100644
--- a/documentation/PythonTutorial/pdfHeader.rst
+++ b/documentation/PythonTutorial/pdfHeader.rst
@@ -5,11 +5,16 @@
=========================
-Hurricane Python Tutorial
+Hurricane+Python Tutorial
=========================
|pagestylefancy|
+|noindent|
+**First, a small disclaimer.** This tutorial assume that you are already familiar
+with the concepts of |VLSI| designs, such as *netlist*, *layout*, *instances*
+and hierarchical design.
+
.. contents::
diff --git a/documentation/RDS/RDS.pdf b/documentation/RDS/RDS.pdf
index 1186acb7..ed82059e 100644
Binary files a/documentation/RDS/RDS.pdf and b/documentation/RDS/RDS.pdf differ
diff --git a/documentation/UsersGuide/UsersGuide.pdf b/documentation/UsersGuide/UsersGuide.pdf
index 638fc498..9027b3f7 100644
Binary files a/documentation/UsersGuide/UsersGuide.pdf and b/documentation/UsersGuide/UsersGuide.pdf differ
diff --git a/documentation/_build/doctrees/CrlCore/CrlCore.doctree b/documentation/_build/doctrees/CrlCore/CrlCore.doctree
index 5d7c33e1..5e0f3ed4 100644
Binary files a/documentation/_build/doctrees/CrlCore/CrlCore.doctree and b/documentation/_build/doctrees/CrlCore/CrlCore.doctree differ
diff --git a/documentation/_build/doctrees/DpGen/DpGen.doctree b/documentation/_build/doctrees/DpGen/DpGen.doctree
index 3e0e675d..c26395f1 100644
Binary files a/documentation/_build/doctrees/DpGen/DpGen.doctree and b/documentation/_build/doctrees/DpGen/DpGen.doctree differ
diff --git a/documentation/_build/doctrees/Hurricane/Hurricane.doctree b/documentation/_build/doctrees/Hurricane/Hurricane.doctree
index c73eec87..eea312e0 100644
Binary files a/documentation/_build/doctrees/Hurricane/Hurricane.doctree and b/documentation/_build/doctrees/Hurricane/Hurricane.doctree differ
diff --git a/documentation/_build/doctrees/Katabatic/Katabatic.doctree b/documentation/_build/doctrees/Katabatic/Katabatic.doctree
index 852090b1..e8ef3636 100644
Binary files a/documentation/_build/doctrees/Katabatic/Katabatic.doctree and b/documentation/_build/doctrees/Katabatic/Katabatic.doctree differ
diff --git a/documentation/_build/doctrees/Kite/Kite.doctree b/documentation/_build/doctrees/Kite/Kite.doctree
index ade9c4f2..b0d51d88 100644
Binary files a/documentation/_build/doctrees/Kite/Kite.doctree and b/documentation/_build/doctrees/Kite/Kite.doctree differ
diff --git a/documentation/_build/doctrees/Patterns/Patterns.doctree b/documentation/_build/doctrees/Patterns/Patterns.doctree
index 199ca32c..201e91c4 100644
Binary files a/documentation/_build/doctrees/Patterns/Patterns.doctree and b/documentation/_build/doctrees/Patterns/Patterns.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/Configuration.doctree b/documentation/_build/doctrees/PythonCpp/Configuration.doctree
index aa53702f..7c4fe069 100644
Binary files a/documentation/_build/doctrees/PythonCpp/Configuration.doctree and b/documentation/_build/doctrees/PythonCpp/Configuration.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/DBoHierarchy.doctree b/documentation/_build/doctrees/PythonCpp/DBoHierarchy.doctree
index 81cf7836..05561bd4 100644
Binary files a/documentation/_build/doctrees/PythonCpp/DBoHierarchy.doctree and b/documentation/_build/doctrees/PythonCpp/DBoHierarchy.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/DBoStandalone.doctree b/documentation/_build/doctrees/PythonCpp/DBoStandalone.doctree
index 5b2dad36..0da7258c 100644
Binary files a/documentation/_build/doctrees/PythonCpp/DBoStandalone.doctree and b/documentation/_build/doctrees/PythonCpp/DBoStandalone.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/DbU.doctree b/documentation/_build/doctrees/PythonCpp/DbU.doctree
index 958e8875..a3a552fa 100644
Binary files a/documentation/_build/doctrees/PythonCpp/DbU.doctree and b/documentation/_build/doctrees/PythonCpp/DbU.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/Introduction.doctree b/documentation/_build/doctrees/PythonCpp/Introduction.doctree
index d78cd0b5..fc248b37 100644
Binary files a/documentation/_build/doctrees/PythonCpp/Introduction.doctree and b/documentation/_build/doctrees/PythonCpp/Introduction.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/Name.doctree b/documentation/_build/doctrees/PythonCpp/Name.doctree
index 609668f3..597e4423 100644
Binary files a/documentation/_build/doctrees/PythonCpp/Name.doctree and b/documentation/_build/doctrees/PythonCpp/Name.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/NonDBo.doctree b/documentation/_build/doctrees/PythonCpp/NonDBo.doctree
index 8b733cc2..4e32e8dc 100644
Binary files a/documentation/_build/doctrees/PythonCpp/NonDBo.doctree and b/documentation/_build/doctrees/PythonCpp/NonDBo.doctree differ
diff --git a/documentation/_build/doctrees/PythonCpp/index.doctree b/documentation/_build/doctrees/PythonCpp/index.doctree
index 25b33e3e..b44d5c73 100644
Binary files a/documentation/_build/doctrees/PythonCpp/index.doctree and b/documentation/_build/doctrees/PythonCpp/index.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/AdvancedTopics.doctree b/documentation/_build/doctrees/PythonTutorial/AdvancedTopics.doctree
new file mode 100644
index 00000000..c57135e3
Binary files /dev/null and b/documentation/_build/doctrees/PythonTutorial/AdvancedTopics.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/CellNetComponent.doctree b/documentation/_build/doctrees/PythonTutorial/CellNetComponent.doctree
index 847c900e..7d727ff8 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/CellNetComponent.doctree and b/documentation/_build/doctrees/PythonTutorial/CellNetComponent.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/CgtScript.doctree b/documentation/_build/doctrees/PythonTutorial/CgtScript.doctree
index 2d146975..413d3dcd 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/CgtScript.doctree and b/documentation/_build/doctrees/PythonTutorial/CgtScript.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/Collections.doctree b/documentation/_build/doctrees/PythonTutorial/Collections.doctree
index c588efaf..597ef2f0 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/Collections.doctree and b/documentation/_build/doctrees/PythonTutorial/Collections.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/Environment.doctree b/documentation/_build/doctrees/PythonTutorial/Environment.doctree
index 66424540..391f68a2 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/Environment.doctree and b/documentation/_build/doctrees/PythonTutorial/Environment.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/Introduction.doctree b/documentation/_build/doctrees/PythonTutorial/Introduction.doctree
index d1a5ba86..9d8faed0 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/Introduction.doctree and b/documentation/_build/doctrees/PythonTutorial/Introduction.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/Netlist.doctree b/documentation/_build/doctrees/PythonTutorial/Netlist.doctree
new file mode 100644
index 00000000..31780134
Binary files /dev/null and b/documentation/_build/doctrees/PythonTutorial/Netlist.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/RealDesigns.doctree b/documentation/_build/doctrees/PythonTutorial/RealDesigns.doctree
new file mode 100644
index 00000000..08cb0653
Binary files /dev/null and b/documentation/_build/doctrees/PythonTutorial/RealDesigns.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/ToolEngines.doctree b/documentation/_build/doctrees/PythonTutorial/ToolEngines.doctree
new file mode 100644
index 00000000..81f83b30
Binary files /dev/null and b/documentation/_build/doctrees/PythonTutorial/ToolEngines.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/definitions.doctree b/documentation/_build/doctrees/PythonTutorial/definitions.doctree
index 2fedfb8d..ab2e7faf 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/definitions.doctree and b/documentation/_build/doctrees/PythonTutorial/definitions.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/index.doctree b/documentation/_build/doctrees/PythonTutorial/index.doctree
index 5a4c21d4..2099cc16 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/index.doctree and b/documentation/_build/doctrees/PythonTutorial/index.doctree differ
diff --git a/documentation/_build/doctrees/PythonTutorial/pdfHeader.doctree b/documentation/_build/doctrees/PythonTutorial/pdfHeader.doctree
index 15b410c9..721f97e5 100644
Binary files a/documentation/_build/doctrees/PythonTutorial/pdfHeader.doctree and b/documentation/_build/doctrees/PythonTutorial/pdfHeader.doctree differ
diff --git a/documentation/_build/doctrees/RDS/RDSpage.doctree b/documentation/_build/doctrees/RDS/RDSpage.doctree
index 57cff58b..4aad515e 100644
Binary files a/documentation/_build/doctrees/RDS/RDSpage.doctree and b/documentation/_build/doctrees/RDS/RDSpage.doctree differ
diff --git a/documentation/_build/doctrees/RDS/index.doctree b/documentation/_build/doctrees/RDS/index.doctree
index e157a213..358ccb09 100644
Binary files a/documentation/_build/doctrees/RDS/index.doctree and b/documentation/_build/doctrees/RDS/index.doctree differ
diff --git a/documentation/_build/doctrees/Stratus/Stratus.doctree b/documentation/_build/doctrees/Stratus/Stratus.doctree
index 1d422ebe..e7675ac4 100644
Binary files a/documentation/_build/doctrees/Stratus/Stratus.doctree and b/documentation/_build/doctrees/Stratus/Stratus.doctree differ
diff --git a/documentation/_build/doctrees/Unicorn/Unicorn.doctree b/documentation/_build/doctrees/Unicorn/Unicorn.doctree
index fa83251a..07b3e3a9 100644
Binary files a/documentation/_build/doctrees/Unicorn/Unicorn.doctree and b/documentation/_build/doctrees/Unicorn/Unicorn.doctree differ
diff --git a/documentation/_build/doctrees/UsersGuide/Configuration.doctree b/documentation/_build/doctrees/UsersGuide/Configuration.doctree
index ebfb2813..7b781044 100644
Binary files a/documentation/_build/doctrees/UsersGuide/Configuration.doctree and b/documentation/_build/doctrees/UsersGuide/Configuration.doctree differ
diff --git a/documentation/_build/doctrees/UsersGuide/Installation.doctree b/documentation/_build/doctrees/UsersGuide/Installation.doctree
index d3597daa..8d97027f 100644
Binary files a/documentation/_build/doctrees/UsersGuide/Installation.doctree and b/documentation/_build/doctrees/UsersGuide/Installation.doctree differ
diff --git a/documentation/_build/doctrees/UsersGuide/LicenseCredits.doctree b/documentation/_build/doctrees/UsersGuide/LicenseCredits.doctree
index 124b72ed..1f7564a4 100644
Binary files a/documentation/_build/doctrees/UsersGuide/LicenseCredits.doctree and b/documentation/_build/doctrees/UsersGuide/LicenseCredits.doctree differ
diff --git a/documentation/_build/doctrees/UsersGuide/Releases.doctree b/documentation/_build/doctrees/UsersGuide/Releases.doctree
index cbd2e01d..aaaab1ca 100644
Binary files a/documentation/_build/doctrees/UsersGuide/Releases.doctree and b/documentation/_build/doctrees/UsersGuide/Releases.doctree differ
diff --git a/documentation/_build/doctrees/UsersGuide/ScriptsPlugins.doctree b/documentation/_build/doctrees/UsersGuide/ScriptsPlugins.doctree
index 3f069e82..a66cff67 100644
Binary files a/documentation/_build/doctrees/UsersGuide/ScriptsPlugins.doctree and b/documentation/_build/doctrees/UsersGuide/ScriptsPlugins.doctree differ
diff --git a/documentation/_build/doctrees/UsersGuide/ViewerTools.doctree b/documentation/_build/doctrees/UsersGuide/ViewerTools.doctree
index 64f2c3b6..194cd561 100644
Binary files a/documentation/_build/doctrees/UsersGuide/ViewerTools.doctree and b/documentation/_build/doctrees/UsersGuide/ViewerTools.doctree differ
diff --git a/documentation/_build/doctrees/UsersGuide/index.doctree b/documentation/_build/doctrees/UsersGuide/index.doctree
index c039ceff..cc9d0915 100644
Binary files a/documentation/_build/doctrees/UsersGuide/index.doctree and b/documentation/_build/doctrees/UsersGuide/index.doctree differ
diff --git a/documentation/_build/doctrees/Viewer/Viewer.doctree b/documentation/_build/doctrees/Viewer/Viewer.doctree
index cedeae45..3bcd6e58 100644
Binary files a/documentation/_build/doctrees/Viewer/Viewer.doctree and b/documentation/_build/doctrees/Viewer/Viewer.doctree differ
diff --git a/documentation/_build/doctrees/defapi/defapi.doctree b/documentation/_build/doctrees/defapi/defapi.doctree
index 9f3f1989..a226d031 100644
Binary files a/documentation/_build/doctrees/defapi/defapi.doctree and b/documentation/_build/doctrees/defapi/defapi.doctree differ
diff --git a/documentation/_build/doctrees/environment.pickle b/documentation/_build/doctrees/environment.pickle
index 40558871..70262252 100644
Binary files a/documentation/_build/doctrees/environment.pickle and b/documentation/_build/doctrees/environment.pickle differ
diff --git a/documentation/_build/doctrees/etc/definitions.doctree b/documentation/_build/doctrees/etc/definitions.doctree
index 36a21a64..5e54e9ef 100644
Binary files a/documentation/_build/doctrees/etc/definitions.doctree and b/documentation/_build/doctrees/etc/definitions.doctree differ
diff --git a/documentation/_build/doctrees/lefapi/lefapi.doctree b/documentation/_build/doctrees/lefapi/lefapi.doctree
index ebf386c3..226ddec0 100644
Binary files a/documentation/_build/doctrees/lefapi/lefapi.doctree and b/documentation/_build/doctrees/lefapi/lefapi.doctree differ
diff --git a/documentation/_build/doctrees/lefdef/lefdef.doctree b/documentation/_build/doctrees/lefdef/lefdef.doctree
index 7d269cd5..55e72ddf 100644
Binary files a/documentation/_build/doctrees/lefdef/lefdef.doctree and b/documentation/_build/doctrees/lefdef/lefdef.doctree differ
diff --git a/documentation/_build/html/Contents.html b/documentation/_build/html/Contents.html
index 9fa26e6f..3357095b 100644
--- a/documentation/_build/html/Contents.html
+++ b/documentation/_build/html/Contents.html
@@ -147,10 +147,11 @@
-
In this part, we well show how to create and save a terminal Cell,
+that is, a cell without instances (the end point of a hierarchical
+design). To illustrate the case we will draw the layout of a
+standard cell.
+
We will introduce the following classes : Cell, Net, Component
+and it’s derived classes.
The Hurricane database only manage objects in memory. To load or save
@@ -442,9 +480,16 @@ not mandatory.
i.setExternal(True)
+
+
Note
+
Unlike some other database models, in Hurricane,
+there is no explicit terminal object, you only need to make the
+net external. For more information about how to connect to an
+external net, see 6.2 Creating Nets and connecting to Instances.
The example files can be found in the share/doc/coriolis2/examples/scripts/
+directory (under the the root of the Coriolis installation).
+
The code needed to run it through the cgt viewer as been added. For the
+explanation of that part of the code, refer to 5. Make a script runnable through cgt.
To use your you may run it directly like any other Python script.
But, for debugging purpose it may be helpful to run it through the
interactive layout viewer cgt.
@@ -323,6 +356,17 @@ using the menu:
ToolsPython Script. The script
file name must be given without the .py extension.
+
+
Note
+
If you use breakpoints and want to see the progress of your
+script in the viewer, do not use the --script option of
+cgt.
+
ego@home:~> cgt -V --script=invertor
+
+
+
Because the script is run before the viewer is launched,
+you will only see the end result of your script.
+
defbuildInvertor(editor):UpdateSession.open()
@@ -369,112 +413,6 @@ The Breakpoint.stop()
@@ -483,7 +421,7 @@ directory (under the the root of the Coriolis installati
@@ -404,7 +437,7 @@ they may unexpectedly shadow cells from the libraries.
Generated by Sphinx
- using a RTD theme on Mar 16, 2018.
+ using a RTD theme on Mar 18, 2018.
First, a small disclaimer. This tutorial assume that you are already familiar
+with the concepts of vlsi designs, such as netlist, layout, instances
+and hierarchical design.
+First, a small disclaimer. This tutorial assume that you are already familiar
+with the concepts of vlsi designs, such as netlist, layout, instances
+and hierarchical design.