<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Python Interface for Hurricane / Coriolis — Coriolis 2 documentation</title> <link rel="stylesheet" href="../_static/SoC.css" type="text/css" /> <link rel="index" title="Index" href="../genindex.html"/> <link rel="search" title="Search" href="../search.html"/> <link rel="top" title="Coriolis 2 documentation" href="../index.html"/> <link rel="up" title="Coriolis User’s Guide" href="index.html"/> <link rel="next" title="Hurricane+Python Tutorial" href="../PythonTutorial/index.html"/> <link rel="prev" title="CGT - The Graphical Interface" href="ViewerTools.html"/> <script src="_static/js/modernizr.min.js"></script> </head> <body class="wy-body-for-nav" role="document"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-nav-search"> <a href="../index.html" class="icon icon-home"> Coriolis </a> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul class="current"> <li class="toctree-l1 current"><a class="reference internal" href="index.html">Coriolis User’s Guide</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="LicenseCredits.html">Credits & License</a></li> <li class="toctree-l2"><a class="reference internal" href="Releases.html">Release Notes</a><ul> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-1-0-1475">Release 1.0.1475</a></li> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-1-0-1963">Release 1.0.1963</a></li> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-1-0-2049">Release 1.0.2049</a></li> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-v2-0-1">Release v2.0.1</a></li> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-v2-1">Release v2.1</a></li> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-v2-2">Release v2.2</a></li> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-v2-3">Release v2.3</a></li> <li class="toctree-l3"><a class="reference internal" href="Releases.html#release-v2-4">Release v2.4</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="DesignFlow.html">Complete Design Flow & Examples</a></li> <li class="toctree-l2"><a class="reference internal" href="Installation.html">Installation</a><ul> <li class="toctree-l3"><a class="reference internal" href="Installation.html#cross-dependencies-issues">Cross Dependencies Issues</a></li> <li class="toctree-l3"><a class="reference internal" href="Installation.html#fixed-directory-tree">Fixed Directory Tree</a></li> <li class="toctree-l3"><a class="reference internal" href="Installation.html#building-coriolis">Building Coriolis</a><ul> <li class="toctree-l4"><a class="reference internal" href="Installation.html#the-actively-developed-branch">The actively developed branch</a></li> <li class="toctree-l4"><a class="reference internal" href="Installation.html#installing-on-redhat-or-compatible-distributions">Installing on <span class="sc">RedHat</span> or compatible distributions</a></li> <li class="toctree-l4"><a class="reference internal" href="Installation.html#building-a-debug-enabled-version">Building a Debug Enabled Version</a></li> <li class="toctree-l4"><a class="reference internal" href="Installation.html#installing-on-debian-9-ubuntu-18-or-compatible-distributions">Installing on <span class="sc">Debian</span> 9, <span class="sc">Ubuntu</span> 18 or compatible distributions</a></li> <li class="toctree-l4"><a class="reference internal" href="Installation.html#additionnal-requirement-under-macos">Additionnal Requirement under <span class="sc">MacOS</span></a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="Installation.html#packaging-coriolis">Packaging Coriolis</a></li> <li class="toctree-l3"><a class="reference internal" href="Installation.html#hooking-up-into-alliance">Hooking up into <span class="sc">Alliance</span></a></li> <li class="toctree-l3"><a class="reference internal" href="Installation.html#setting-up-the-environment-coriolisenv-py">Setting up the Environment (coriolisEnv.py)</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="Configuration.html">Coriolis Configuration & Initialisation</a><ul> <li class="toctree-l3"><a class="reference internal" href="Configuration.html#general-software-architecture">General Software Architecture</a></li> <li class="toctree-l3"><a class="reference internal" href="Configuration.html#configuration-user-s-settings">Configuration & User’s Settings</a></li> <li class="toctree-l3"><a class="reference internal" href="Configuration.html#a-comprehensive-example-of-coriolis2-setting-py">A Comprehensive Example of <span class="cb">./coriolis2/setting.py</span></a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="ViewerTools.html">CGT - The Graphical Interface</a><ul> <li class="toctree-l3"><a class="reference internal" href="ViewerTools.html#viewer-tools">Viewer & Tools</a><ul> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#stratus-netlist-capture"><span class="sc">Stratus</span> Netlist Capture</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-hurricane-data-base">The <span class="sc">Hurricane</span> Data-Base</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#synthetizing-and-loading-a-design">Synthetizing and loading a design</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#etesian-placer">Etesian – Placer</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#katana-global-router">Katana – Global Router</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#katana-detailed-router">Katana – Detailed Router</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#executing-python-scripts-in-cgt">Executing Python Scripts in Cgt</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#printing-snapshots">Printing & Snapshots</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#memento-of-shortcuts-in-graphic-mode">Memento of Shortcuts in Graphic Mode</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#cgt-command-line-options">Cgt Command Line Options</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#miscellaneous-settings">Miscellaneous Settings</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="ViewerTools.html#the-controller">The Controller</a><ul> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-look-tab">The Look Tab</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-filter-tab">The Filter Tab</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-layers-go-tab">The Layers&Go Tab</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-netlist-tab">The Netlist Tab</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-selection-tab">The Selection Tab</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-inspector-tab">The Inspector Tab</a></li> <li class="toctree-l4"><a class="reference internal" href="ViewerTools.html#the-settings-tab">The Settings Tab</a></li> </ul> </li> </ul> </li> <li class="toctree-l2 current"><a class="current reference internal" href="#">Python Interface for <span class="sc">Hurricane</span> / <span class="sc">Coriolis</span></a><ul> <li class="toctree-l3"><a class="reference internal" href="#plugins">Plugins</a><ul> <li class="toctree-l4"><a class="reference internal" href="#chip-placement">Chip Placement</a></li> <li class="toctree-l4"><a class="reference internal" href="#clock-tree">Clock Tree</a></li> <li class="toctree-l4"><a class="reference internal" href="#recursive-save-rsave">Recursive-Save (RSave)</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="#a-simple-example-am2901">A Simple Example: AM2901</a></li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../PythonTutorial/index.html">Hurricane+Python Tutorial</a><ul> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/Introduction.html">1. Introduction</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Introduction.html#terminology">1.1 Terminology</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Introduction.html#generalities">1.2 Generalities</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Introduction.html#various-kinds-of-constructors">1.3 Various Kinds of Constructors</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/Environment.html">2. Setting up the Environment</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Environment.html#setting-up-the-paths">2.1 Setting up the Paths</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Environment.html#user-s-configurations-file">2.2 User’s Configurations File</a><ul> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/Environment.html#the-techno-py-file">2.2.1 The <span class="cb">techno.py</span> File</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/Environment.html#the-settings-py-file">2.2.2 The <span class="cb">settings.py</span> File</a></li> </ul> </li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html">3. Making a Standard Cell – Layout</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#the-allianceframework-crl-core">3.1 The AllianceFramework (CRL Core)</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#session-mechanism-hurricane">3.2 Session Mechanism (Hurricane)</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#creating-a-new-cell-crl-core">3.3 Creating a new Cell (CRL Core)</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#the-dbu-measurement-unit">3.4 The DbU Measurement Unit</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#setting-up-the-abutment-box">3.5 Setting up the Abutment Box</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#adding-nets-and-components">3.6 Adding Nets and Components</a><ul> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#getting-a-layer">3.6.1 Getting a Layer</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#creating-a-net">3.6.2 Creating a Net</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#id1">3.6.3 Creating a Component</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#saving-to-disk-crl-core">3.7 Saving to Disk (CRL Core)</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CellNetComponent.html#the-complete-example-file">3.8 The Complete Example File</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/Collections.html">4. Manipulating Cells, Nets and Components</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Collections.html#hurricane-collections">4.1 Hurricane Collections</a><ul> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/Collections.html#restrictions-about-using-collections">4.1.1 Restrictions about using Collections</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Collections.html#loading-a-cell-with-allianceframework">4.2 Loading a Cell with AllianceFramework</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/CgtScript.html">5. Make a script runnable through <span class="cb">cgt</span></a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/CgtScript.html#using-breakpoints">5.1 Using Breakpoints</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/Netlist.html">6. Making a hierarchical Cell – Netlist</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Netlist.html#creating-an-instance">6.1 Creating an Instance</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Netlist.html#id1">6.2 Creating Nets and connecting to Instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Netlist.html#power-supplies-special-case">6.3 Power supplies special case</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Netlist.html#creating-the-physical-view-of-a-cell-netlist">6.4 Creating the physical view of a Cell netlist</a><ul> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/Netlist.html#id2">6.4.1 Transformation</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/Netlist.html#placing-an-instance">6.4.2 Placing an Instance</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/Netlist.html#nets-from-plugs-to-routingpads">6.4.3 Nets – From Plugs to RoutingPads</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonTutorial/Netlist.html#nets-regular-wiring">6.4.4 Nets – Regular wiring</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/Netlist.html#the-complete-example-file">6.5 The Complete Example File</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/RealDesigns.html">7. Working in real mode</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/RealDesigns.html#loading-a-lef-file">7.1 Loading a <span class="sc">lef</span> file</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/RealDesigns.html#loading-a-blif-file-yosys">7.2 Loading a <span class="sc">blif</span> file – <span class="sc">Yosys</span></a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/ToolEngines.html">8. Tool Engines (CRL Core)</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/ToolEngines.html#placer-etesian">8.1 Placer – Etesian</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/ToolEngines.html#router-katana">8.1 Router – Katana</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/ToolEngines.html#a-complete-example">8.2 A Complete Example</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonTutorial/AdvancedTopics.html">9. Advanced Topics</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/AdvancedTopics.html#id1">9.1 Occurrence</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/AdvancedTopics.html#id2">9.2 RoutingPads</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/AdvancedTopics.html#hypernets">9.3 HyperNets</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonTutorial/AdvancedTopics.html#miscellaeous-trans-hierarchical-functions">9.4 Miscellaeous trans-hierarchical functions</a></li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../Stratus/index.html">Stratus : Netlist Capture Language</a><ul> <li class="toctree-l2"><a class="reference internal" href="../Stratus/Language.html">Stratus User’s Guide</a><ul> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Language.html#introduction">Introduction</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#stratus">Stratus</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#example">Example</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Language.html#description-of-a-netlist">Description of a netlist</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#nets">Nets</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#instances">Instances</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#generators">Generators</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Language.html#description-of-a-layout">Description of a layout</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#place">Place</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placetop">PlaceTop</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placebottom">PlaceBottom</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placeright">PlaceRight</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placeleft">PlaceLeft</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#setrefins">SetRefIns</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#defab">DefAb</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#resizeab">ResizeAb</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Language.html#patterns-generation-extension">Patterns generation extension</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#description-of-the-stimuli">Description of the stimuli</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Language.html#place-and-route">Place and Route</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placesegment">PlaceSegment</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placecontact">PlaceContact</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placepin">PlacePin</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placeref">PlaceRef</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#getrefxy">GetRefXY</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#copyupsegment">CopyUpSegment</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placecentric">PlaceCentric</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#placeglu">PlaceGlu</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#fillcell">FillCell</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#pads">Pads</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#alimentation-rails">Alimentation rails</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#alimentation-connectors">Alimentation connectors</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#powerring">PowerRing</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#routeck">RouteCk</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Language.html#instanciation-facilities">Instanciation facilities</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#buffer">Buffer</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#multiplexor">Multiplexor</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#shifter">Shifter</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#register">Register</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#constants">Constants</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#boolean-operations">Boolean operations</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#arithmetical-operations">Arithmetical operations</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#comparison-operations">Comparison operations</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#virtual-library">Virtual library</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Language.html#useful-links">Useful links</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#dpgen-generators">DpGen generators</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#arithmetic-package-of-stratus">Arithmetic package of stratus</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#arithmetic-generators-and-some-stratus-packages">Arithmetic generators and some stratus packages</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Language.html#patterns-module">Patterns module</a></li> </ul> </li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../Stratus/Developper.html">Stratus Developper’s Guide</a><ul> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Developper.html#class-model">Class Model</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#synopsys">Synopsys</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#description">Description</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#parameters">Parameters</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#attributes">Attributes</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#methods">Methods</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Developper.html#nets">Nets</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id1">Synopsys</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id2">Description</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id3">Parameters</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id4">Attributes</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id5">Methods</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Developper.html#instances">Instances</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id6">Synopsys</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id7">Description</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id8">Parameters</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id9">Attributes</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Developper.html#id10">Methods</a></li> </ul> </li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../Stratus/Patterns.html">Patterns module User’s Guide</a><ul> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Patterns.html#description">Description</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Patterns.html#syntax">Syntax</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#declaration-part">Declaration part</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#description-part">Description part</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Patterns.html#methods">Methods</a><ul> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#patwrite">PatWrite</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#declar">declar</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#declar-interface">declar_interface</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#id2">declar</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#affect-int">affect_int</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#affect-fix">affect_fix</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#affect-any">affect_any</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#addpat">addpat</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#pattern-begin">pattern_begin</a></li> <li class="toctree-l4"><a class="reference internal" href="../Stratus/Patterns.html#pattern-end">pattern_end</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/Patterns.html#example">Example</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../Stratus/DpGen.html">DpGen generators manual</a><ul> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgeninv">DpgenInv</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenbuff">DpgenBuff</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennand2">DpgenNand2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennand3">DpgenNand3</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennand4">Dpgennand4</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenand2">DpgenAnd2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenand3">DpgenAnd3</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenand4">DpgenAnd4</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennor2">DpgenNor2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennor3">DpgenNor3</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennor4">DpgenNor4</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenor2">DpgenOr2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenor3">DpgenOr3</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenor4">DpgenOr4</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenxor2">DpgenXor2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenxnor2">DpgenXnor2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennmux2">DpgenNmux2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenmux2">DpgenMux2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennbuse">DpgenNbuse</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenbuse">DpgenBuse</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennand2mask">DpgenNand2mask</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennor2mask">DpgenNor2mask</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenxnor2mask">DpgenXnor2mask</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenadsb2f">DpgenAdsb2f</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenshift">DpgenShift</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenshrot">DpgenShrot</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgennul">DpgenNul</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenconst">DpgenConst</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenrom2">DpgenRom2</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenrom4">DpgenRom4</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenram">DpgenRam</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenrf1">DpgenRf1</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenrf1d">DpgenRf1d</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgenfifo">DpgenFifo</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgendff">DpgenDff</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgendfft">DpgenDfft</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgensff">DpgenSff</a></li> <li class="toctree-l3"><a class="reference internal" href="../Stratus/DpGen.html#dpgensfft">DpgenSfft</a></li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../Hurricane/Hurricane.html">Hurricane Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../Viewer/Viewer.html">Viewer Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../CrlCore/CrlCore.html">CRL Core Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../Katabatic/Katabatic.html">Katabatic Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../Kite/Kite.html">Kite Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../Unicorn/Unicorn.html">Unicorn Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../PythonCpp/index.html">Hurricane Python/C++ API Tutorial</a><ul> <li class="toctree-l2"><a class="reference internal" href="../PythonCpp/Introduction.html">1. Introduction</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/Introduction.html#first-a-disclaimer">1.1 First, A Disclaimer</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/Introduction.html#about-technical-choices">1.2 About Technical Choices</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/Introduction.html#botched-design">1.3 Botched Design</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonCpp/Configuration.html">2. Basic File Structure and CMake configuration</a></li> <li class="toctree-l2"><a class="reference internal" href="../PythonCpp/DBoStandalone.html">3. Case 1 - DBo Derived, Standalone</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoStandalone.html#class-associated-header-file">3.1 Class Associated Header File</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoStandalone.html#class-associated-file">3.2 Class Associated File</a><ul> <li class="toctree-l4"><a class="reference internal" href="../PythonCpp/DBoStandalone.html#head-of-the-file">3.2.1 Head of the file</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonCpp/DBoStandalone.html#the-python-module-part">3.2.2 The Python Module Part</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonCpp/DBoStandalone.html#python-type-linking">3.2.3 Python Type Linking</a></li> <li class="toctree-l4"><a class="reference internal" href="../PythonCpp/DBoStandalone.html#the-shared-library-part">3.2.4 The Shared Library Part</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoStandalone.html#python-module-c-namespace">3.3 Python Module (C++ namespace)</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html">4. Case 2 - Hierarchy of DBo Derived Classes</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html#base-class-header">4.1 Base Class Header</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html#base-class-file">4.2 Base Class File</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html#intermediate-class-header">4.3 Intermediate Class Header</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html#intermediate-class-file">4.4 Intermediate Class File</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html#terminal-class-header">4.5 Terminal Class Header</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html#terminal-class-file">4.6 Terminal Class File</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/DBoHierarchy.html#python-module">4.8 Python Module</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonCpp/NonDBo.html">5. Case 3 - Non-DBo Standalone Classe</a><ul> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/NonDBo.html#class-header">5.1 Class Header</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/NonDBo.html#class-file">5.2 Class File</a></li> <li class="toctree-l3"><a class="reference internal" href="../PythonCpp/NonDBo.html#id1">5.2 Class File</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../PythonCpp/DbU.html">6. Encapsulating DbU</a></li> <li class="toctree-l2"><a class="reference internal" href="../PythonCpp/Name.html">7. No C++ Hurricane::Name encapsulation</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../RDS/index.html">RDS – Symbolic to Real Conversion in Alliance</a><ul> <li class="toctree-l2"><a class="reference internal" href="../RDS/RDSpage.html">Symbolic Layout</a><ul> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#symbolic-components">Symbolic Components</a></li> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#symbolic-segments">Symbolic Segments</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../RDS/RDSpage.html#the-rds-file">The RDS File</a><ul> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#physical-grid-lambda-value">Physical Grid & Lambda Value</a></li> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#the-mbk-to-rds-segment-table">The <code class="docutils literal"><span class="pre">MBK_TO_RDS_SEGMENT</span></code> table</a></li> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#the-mbk-to-rds-via-table">The <code class="docutils literal"><span class="pre">MBK_TO_RDS_VIA</span></code> table</a></li> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#the-mbk-to-rds-bigvia-hole-table">The <code class="docutils literal"><span class="pre">MBK_TO_RDS_BIGVIA_HOLE</span></code> table</a></li> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#the-mbk-to-rds-bigvia-metal-table">The <code class="docutils literal"><span class="pre">MBK_TO_RDS_BIGVIA_METAL</span></code> table</a></li> <li class="toctree-l3"><a class="reference internal" href="../RDS/RDSpage.html#the-mbk-wiresetting-table">The <code class="docutils literal"><span class="pre">MBK_WIRESETTING</span></code> table</a></li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../Analog/Analog.html">Hurricane/Analog Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../Oroshi/Oroshi.html">Oroshi Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../lefapi/lefapi.html">LEF API Reference</a><ul> <li class="toctree-l2"><a class="reference internal" href="../lefapi/lefapi.html#implementation-notes">Implementation Notes</a><ul> <li class="toctree-l3"><a class="reference internal" href="../lefapi/lefapi.html#understanding-units">Understanding Units</a></li> <li class="toctree-l3"><a class="reference internal" href="../lefapi/lefapi.html#callback-calling-order">Callback Calling Order</a></li> </ul> </li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../defapi/defapi.html">DEF API Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../lefdef/lefdef.html">LEF/DEF Language Reference</a></li> </ul> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../index.html">Coriolis</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="../index.html">Docs</a> »</li> <li><a href="index.html">Coriolis User’s Guide</a> »</li> <li>Python Interface for <span class="sc">Hurricane</span> / <span class="sc">Coriolis</span></li> <li class="wy-breadcrumbs-aside"> </li> </ul> <hr/> </div> <div role="main" class="document"> <p id="python-interface-to-coriolis"></p> <div class="section" id="python-interface-for-hurricane-coriolis"> <h1>Python Interface for <span class="sc">Hurricane</span> / <span class="sc">Coriolis</span><a class="headerlink" href="#python-interface-for-hurricane-coriolis" title="Permalink to this headline">¶</a></h1> <p>The (almost) complete interface of <span class="sc">Hurricane</span> is exported as a <span class="sc">Python</span> module and some parts of the other components of <span class="sc">Coriolis</span> (each one in a separate module). The interface has been made to mirror as closely as possible the C++ one, so the C++ doxygen documentation could be used to write code with either languages.</p> <p><a class="reference external" href="file:../../../index.html">Summary of the C++ Documentation</a></p> <p>A script could be run directly in text mode from the command line or through the graphical interface (see <a class="reference internal" href="ViewerTools.html#python-scripts-in-cgt"><span class="std std-ref">Executing Python Scripts in Cgt</span></a>).</p> <p>Aside for this requirement, the python script can contain anything valid in <span class="sc">Python</span>, so don’t hesitate to use any package or extension.</p> <p>Small example of Python/Stratus script:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">symbolic.cmos</span> <span class="kn">from</span> <span class="nn">Hurricane</span> <span class="k">import</span> <span class="o">*</span> <span class="kn">from</span> <span class="nn">Stratus</span> <span class="k">import</span> <span class="o">*</span> <span class="k">def</span> <span class="nf">doSomething</span> <span class="p">():</span> <span class="c1"># ...</span> <span class="k">return</span> <span class="k">def</span> <span class="nf">ScriptMain</span> <span class="p">(</span> <span class="o">**</span><span class="n">kw</span> <span class="p">):</span> <span class="n">editor</span> <span class="o">=</span> <span class="kc">None</span> <span class="k">if</span> <span class="n">kw</span><span class="o">.</span><span class="n">has_key</span><span class="p">(</span><span class="s1">'editor'</span><span class="p">)</span> <span class="ow">and</span> <span class="n">kw</span><span class="p">[</span><span class="s1">'editor'</span><span class="p">]:</span> <span class="n">editor</span> <span class="o">=</span> <span class="n">kw</span><span class="p">[</span><span class="s1">'editor'</span><span class="p">]</span> <span class="n">stratus</span><span class="o">.</span><span class="n">setEditor</span><span class="p">(</span> <span class="n">editor</span> <span class="p">)</span> <span class="n">doSomething</span><span class="p">()</span> <span class="k">return</span> <span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s2">"__main__"</span> <span class="p">:</span> <span class="n">kw</span> <span class="o">=</span> <span class="p">{}</span> <span class="n">success</span> <span class="o">=</span> <span class="n">ScriptMain</span><span class="p">(</span> <span class="o">**</span><span class="n">kw</span> <span class="p">)</span> <span class="n">shellSuccess</span> <span class="o">=</span> <span class="mi">0</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">success</span><span class="p">:</span> <span class="n">shellSuccess</span> <span class="o">=</span> <span class="mi">1</span> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span> <span class="n">shellSuccess</span> <span class="p">)</span> <span class="n">ScriptMain</span> <span class="p">()</span> </pre></div> </div> <p>This typical script can be executed in two ways:</p> <ol class="arabic"> <li><p class="first">Run directly as a <span class="sc">Python</span> script, thanks to the</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s2">"__main__"</span> <span class="p">:</span> </pre></div> </div> <p>part (this is standart <span class="sc">Python</span>). It is a simple adapter that will call <span class="cb">ScriptMain()</span>.</p> <p>In this case, the <code class="docutils literal"><span class="pre">import</span> <span class="pre">symbolic.cmos</span></code> statement at the begining is mandatory.</p> </li> <li><p class="first">Through <span class="cb">cgt</span>, either in text or graphical mode. In that case, the <span class="cb">ScriptMain()</span> is directly called trough a sub-interpreter. The arguments of the script are passed through the <code class="docutils literal"><span class="pre">**kw</span></code> dictionnary.</p> <p>In this case, the <code class="docutils literal"><span class="pre">import</span> <span class="pre">symbolic.cmos</span></code> statement at the begining may be omitted.</p> <table border="1" class="docutils"> <colgroup> <col width="32%" /> <col width="68%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head" colspan="2">**kw Dictionnary</th> </tr> <tr class="row-even"><th class="head">Parameter Key/Name</th> <th class="head">Contents type</th> </tr> </thead> <tbody valign="top"> <tr class="row-odd"><td><code class="docutils literal"><span class="pre">'cell'</span></code></td> <td>A Hurricane cell on which to work. Depending on the context, it may be <code class="docutils literal"><span class="pre">None</span></code>. For example, when run from <span class="cb">cgt</span>, the cell currently loaded in the viewer, if any.</td> </tr> <tr class="row-even"><td><code class="docutils literal"><span class="pre">'editor'</span></code></td> <td>The viewer from which the script is run, when lauched through <span class="cb">cgt</span>.</td> </tr> </tbody> </table> </li> </ol> <div class="section" id="plugins"> <h2>Plugins<a class="headerlink" href="#plugins" title="Permalink to this headline">¶</a></h2> <p>Plugins are <span class="sc">Python</span> scripts specially crafted to integrate with <span class="cb">cgt</span>. Their entry point is a <span class="cb">ScriptMain()</span> method as described in <a class="reference internal" href="#python-interface-to-coriolis">Python Interface to Coriolis</a>. They can be called by user scripts through this method.</p> <div class="section" id="chip-placement"> <h3>Chip Placement<a class="headerlink" href="#chip-placement" title="Permalink to this headline">¶</a></h3> <p>Automatically performs the placement of a complete chip. This plugin, as well as the other P&R tools expect a specific top-level hierarchy for the design. The top-level hierarchy must contain the instances of all the I/O pads and <strong>exactly one</strong> instance named <code class="docutils literal"><span class="pre">corona</span></code> of an eponym cell <code class="docutils literal"><span class="pre">corona</span></code>. The <code class="docutils literal"><span class="pre">corona</span></code> cell in turn contains the instance of the chip’s core model.</p> <p>The intermediate <code class="docutils literal"><span class="pre">corona</span></code> hierarchical level has been introduced to handle the possible decoupling between real I/O pads supplied by a foundry and a symbolic core. So the <em>chip</em> level contains only real layout and the corona and below only symbolic layer.</p> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">This does not prevent having a design either fully symbolic (pads and core) or fully real.</p> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">The <code class="docutils literal"><span class="pre">corona</span></code> also avoids the router to actually have to manage directly the pads which simplify its configuration and besides avoid to have the pads stuffed with blockages.</p> </div> <p> <a class="reference internal" href="../_images/chip-structure-1.png"><img alt="Chip Top Structure" class="align-middle" src="../_images/chip-structure-1.png" style="width: 90%;" /></a> </p> <p>The designer must provide a configuration file that defines the rules for the placement of the top-level hierarchy (that is, the pads and the core). This file must be names <code class="docutils literal"><span class="pre">ioring.py</span></code> and put into the user’s configuration directory <code class="docutils literal"><span class="pre">./coriolis2/</span></code></p> <p>Example of chip placement configuration file (for <code class="docutils literal"><span class="pre">AM2901</span></code>):</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">helpers</span> <span class="k">import</span> <span class="n">l</span><span class="p">,</span> <span class="n">u</span><span class="p">,</span> <span class="n">n</span> <span class="n">chip</span> <span class="o">=</span> \ <span class="p">{</span> <span class="s1">'pads.ioPadGauge'</span> <span class="p">:</span> <span class="s1">'pxlib'</span> <span class="p">,</span> <span class="s1">'pads.south'</span> <span class="p">:</span> <span class="p">[</span> <span class="s1">'p_a3'</span> <span class="p">,</span> <span class="s1">'p_a2'</span> <span class="p">,</span> <span class="s1">'p_a1'</span> <span class="p">,</span> <span class="s1">'p_r0'</span> <span class="p">,</span> <span class="s1">'p_vddick0'</span><span class="p">,</span> <span class="s1">'p_vssick0'</span><span class="p">,</span> <span class="s1">'p_a0'</span> <span class="p">,</span> <span class="s1">'p_i6'</span> <span class="p">,</span> <span class="s1">'p_i8'</span> <span class="p">,</span> <span class="s1">'p_i7'</span> <span class="p">,</span> <span class="s1">'p_r3'</span> <span class="p">]</span> <span class="p">,</span> <span class="s1">'pads.east'</span> <span class="p">:</span> <span class="p">[</span> <span class="s1">'p_zero'</span> <span class="p">,</span> <span class="s1">'p_i0'</span> <span class="p">,</span> <span class="s1">'p_i1'</span> <span class="p">,</span> <span class="s1">'p_i2'</span> <span class="p">,</span> <span class="s1">'p_vddeck0'</span><span class="p">,</span> <span class="s1">'p_vsseck0'</span><span class="p">,</span> <span class="s1">'p_q3'</span> <span class="p">,</span> <span class="s1">'p_b0'</span> <span class="p">,</span> <span class="s1">'p_b1'</span> <span class="p">,</span> <span class="s1">'p_b2'</span> <span class="p">,</span> <span class="s1">'p_b3'</span> <span class="p">]</span> <span class="p">,</span> <span class="s1">'pads.north'</span> <span class="p">:</span> <span class="p">[</span> <span class="s1">'p_noe'</span> <span class="p">,</span> <span class="s1">'p_y3'</span> <span class="p">,</span> <span class="s1">'p_y2'</span> <span class="p">,</span> <span class="s1">'p_y1'</span> <span class="p">,</span> <span class="s1">'p_y0'</span> <span class="p">,</span> <span class="s1">'p_vddeck1'</span><span class="p">,</span> <span class="s1">'p_vsseck1'</span><span class="p">,</span> <span class="s1">'p_np'</span> <span class="p">,</span> <span class="s1">'p_ovr'</span> <span class="p">,</span> <span class="s1">'p_cout'</span> <span class="p">,</span> <span class="s1">'p_ng'</span> <span class="p">]</span> <span class="p">,</span> <span class="s1">'pads.west'</span> <span class="p">:</span> <span class="p">[</span> <span class="s1">'p_cin'</span> <span class="p">,</span> <span class="s1">'p_i4'</span> <span class="p">,</span> <span class="s1">'p_i5'</span> <span class="p">,</span> <span class="s1">'p_i3'</span> <span class="p">,</span> <span class="s1">'p_ck'</span> <span class="p">,</span> <span class="s1">'p_d0'</span> <span class="p">,</span> <span class="s1">'p_d1'</span> <span class="p">,</span> <span class="s1">'p_d2'</span> <span class="p">,</span> <span class="s1">'p_d3'</span> <span class="p">,</span> <span class="s1">'p_q0'</span> <span class="p">,</span> <span class="s1">'p_f3'</span> <span class="p">]</span> <span class="p">,</span> <span class="s1">'core.size'</span> <span class="p">:</span> <span class="p">(</span> <span class="n">l</span><span class="p">(</span><span class="mi">1500</span><span class="p">),</span> <span class="n">l</span><span class="p">(</span><span class="mi">1500</span><span class="p">)</span> <span class="p">)</span> <span class="p">,</span> <span class="s1">'chip.size'</span> <span class="p">:</span> <span class="p">(</span> <span class="n">l</span><span class="p">(</span><span class="mi">3000</span><span class="p">),</span> <span class="n">l</span><span class="p">(</span><span class="mi">3000</span><span class="p">)</span> <span class="p">)</span> <span class="p">,</span> <span class="s1">'chip.clockTree'</span> <span class="p">:</span> <span class="kc">True</span> <span class="p">}</span> </pre></div> </div> <p>The file must contain <em>one dictionnary</em> named <code class="docutils literal"><span class="pre">chip</span></code>.</p> <table border="1" class="docutils"> <colgroup> <col width="29%" /> <col width="71%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head" colspan="2">Chip Dictionnary</th> </tr> <tr class="row-even"><th class="head">Parameter Key/Name</th> <th class="head">Value/Contents type</th> </tr> </thead> <tbody valign="top"> <tr class="row-odd"><td><code class="docutils literal"><span class="pre">'pad.ioPadGauge'</span></code></td> <td>The routing gauge to use for the pad. Must be given as it differs from the one used to route inside the core</td> </tr> <tr class="row-even"><td><code class="docutils literal"><span class="pre">'pad.south'</span></code></td> <td>Ordered list (left to right) of pad instance names to put on the south side of the chip</td> </tr> <tr class="row-odd"><td><code class="docutils literal"><span class="pre">'pad.east'</span></code></td> <td>Ordered list (down to up) of pad instance names to put on the east side of the chip</td> </tr> <tr class="row-even"><td><code class="docutils literal"><span class="pre">'pad.north'</span></code></td> <td>Ordered list (left to right) of pad instance names to put on the north side of the chip</td> </tr> <tr class="row-odd"><td><code class="docutils literal"><span class="pre">'pad.west'</span></code></td> <td>Ordered list (down to up) of pad instance names to put on the west side of the chip</td> </tr> <tr class="row-even"><td><code class="docutils literal"><span class="pre">'core.size'</span></code></td> <td>The size of the core (to be used by the placer)</td> </tr> <tr class="row-odd"><td><code class="docutils literal"><span class="pre">'chip.size'</span></code></td> <td>The size of the whole chip. The sides must be large enough to accomodate all the pads</td> </tr> <tr class="row-even"><td><code class="docutils literal"><span class="pre">'chip.clockTree'</span></code></td> <td>Whether to generate a clock tree or not. This calls the ClockTree plugin</td> </tr> </tbody> </table> <p>Configuration parameters, defaults are defined in <code class="docutils literal"><span class="pre">etc/coriolis2/<STECHNO>/plugins.conf</span></code>.</p> <table border="1" class="docutils"> <colgroup> <col width="43%" /> <col width="22%" /> <col width="35%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Parameter Identifier</th> <th class="head">Type</th> <th class="head">Default</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td colspan="3"><strong>Chip Plugin Parameters</strong></td> </tr> <tr class="row-odd"><td rowspan="2"><code class="docutils literal"><span class="pre">chip.block.rails.count</span></code></td> <td><code class="docutils literal"><span class="pre">Int</span></code></td> <td><span class="cb">5</span></td> </tr> <tr class="row-even"><td colspan="2">The minimum number of rails around the core block. Must be odd and above 5. One rail for the clock and at least two pairs of power/grounds</td> </tr> <tr class="row-odd"><td rowspan="2"><code class="docutils literal"><span class="pre">chip.block.rails.hWidth</span></code></td> <td><code class="docutils literal"><span class="pre">Int</span></code></td> <td><span class="cb">12</span> <span class="raw-html">λ</span></td> </tr> <tr class="row-even"><td colspan="2">The horizontal width of the rails</td> </tr> <tr class="row-odd"><td rowspan="2"><code class="docutils literal"><span class="pre">chip.block.rails.vWidth</span></code></td> <td><code class="docutils literal"><span class="pre">Int</span></code></td> <td><span class="cb">12</span> <span class="raw-html">λ</span></td> </tr> <tr class="row-even"><td colspan="2">The vertical width of the rails</td> </tr> <tr class="row-odd"><td rowspan="2"><code class="docutils literal"><span class="pre">chip.block.rails.hSpacing</span></code></td> <td><code class="docutils literal"><span class="pre">Int</span></code></td> <td><span class="cb">6</span> <span class="raw-html">λ</span></td> </tr> <tr class="row-even"><td colspan="2">The spacing, <em>edge to edge</em> of two adjacent horizontal rails</td> </tr> <tr class="row-odd"><td rowspan="2"><code class="docutils literal"><span class="pre">chip.block.rails.vSpacing</span></code></td> <td><code class="docutils literal"><span class="pre">Int</span></code></td> <td><span class="cb">6</span> <span class="raw-html">λ</span></td> </tr> <tr class="row-even"><td colspan="2">The spacing, <em>edge to edge</em> of two adjacent vertical rails</td> </tr> </tbody> </table> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">If no clock tree is generated, then the clock rail is <em>not</em> created. So even if the requested number of rails <code class="docutils literal"><span class="pre">chip.block.rails.count</span></code> is, say 5, only four rails (2* <code class="docutils literal"><span class="pre">power</span></code>, 2* <code class="docutils literal"><span class="pre">ground</span></code>) will be generated.</p> </div> </div> <div class="section" id="clock-tree"> <h3>Clock Tree<a class="headerlink" href="#clock-tree" title="Permalink to this headline">¶</a></h3> <p>Inserts a clock tree into a block. The clock tree uses the H strategy. The clock net is splitted into sub-nets, one for each branch of the tree.</p> <ul> <li><p class="first">On <strong>chip</strong> design, the sub-nets are created in the model of the core block (then trans-hierarchically flattened to be shown at chip level).</p> </li> <li><p class="first">On <strong>blocks</strong>, the sub nets are created directly in the top block.</p> </li> <li><p class="first">The sub-nets are named according to a simple geometrical scheme. A common prefix <code class="docutils literal"><span class="pre">ck_htree</span></code>, then one postfix by level telling on which quarter of plane the sub-clock is located:</p> <ol class="arabic simple"> <li><code class="docutils literal"><span class="pre">_bl</span></code>: bottom left plane quarter.</li> <li><code class="docutils literal"><span class="pre">_br</span></code>: bottom right plane quarter.</li> <li><code class="docutils literal"><span class="pre">_tl</span></code>: top left plane quarter.</li> <li><code class="docutils literal"><span class="pre">_tr</span></code>: top right plane quarter.</li> </ol> <p>We can have <code class="docutils literal"><span class="pre">ck_htree_bl</span></code>, <code class="docutils literal"><span class="pre">ck_htree_bl_bl</span></code>, <code class="docutils literal"><span class="pre">ch_htree_bl_tl</span></code> and so on.</p> </li> </ul> <p>The clock tree plugin works in four steps:</p> <ol class="arabic simple"> <li>Builds the clock tree: creates the top-block abutment box, computes the required levels of H tree and places the clock buffers.</li> <li>Once the clock buffers are placed, calls the placer (<span class="sc">Etesian</span>) to place the ordinary standard cells, whithout disturbing clock H-tree buffers.</li> <li>At this point we know the exact positions of all the DFFs, so we can connect them to the nearest H-tree leaf clock signal.</li> <li>Leaf clock signals that are not connected to any DFFs are removed.</li> </ol> <p>Netlist reorganisation:</p> <ul class="simple"> <li>Obviously the top block or chip core model netlist is modified to contain all the clock sub-nets. The interface is <em>not</em> changed.</li> <li>If the top block contains instances of other models <em>and</em> those models contain DFFs that get re-connected to the clock sub-nets (from the top level): Changes both the model netlist and interface to propagate the relevant clock sub-nets to the instanciated model. The new model with the added clock signal is renamed with a <code class="docutils literal"><span class="pre">_cts</span></code> suffix. For example, the sub-block model <code class="docutils literal"><span class="pre">ram.vst</span></code> will become <code class="docutils literal"><span class="pre">ram_cts.vst</span></code>.</li> </ul> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">If you are to re-run the clock tree plugin on a netlist, be careful to erase any previously generated <code class="docutils literal"><span class="pre">_cts</span></code> file (both netlist and layout: <code class="docutils literal"><span class="pre">rm</span> <span class="pre">*_cts.{ap,vst}</span></code>). And restart <span class="cb">cgt</span> to clear its memory cache.</p> </div> <p>Configuration parameters, defaults are defined in <code class="docutils literal"><span class="pre">etc/coriolis2/<STECHNO>/plugins.conf</span></code>.</p> <table border="1" class="docutils"> <colgroup> <col width="43%" /> <col width="22%" /> <col width="35%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Parameter Identifier</th> <th class="head">Type</th> <th class="head">Default</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td colspan="3"><strong>ClockTree Plugin Parameters</strong></td> </tr> <tr class="row-odd"><td rowspan="2"><code class="docutils literal"><span class="pre">clockTree.minimumSide</span></code></td> <td><code class="docutils literal"><span class="pre">Int</span></code></td> <td><span class="cb">300</span> <span class="raw-html">λ</span></td> </tr> <tr class="row-even"><td colspan="2">The minimum size below which the clock tree will stop to perform quadri-partitions</td> </tr> <tr class="row-odd"><td rowspan="2"><code class="docutils literal"><span class="pre">clockTree.buffer</span></code></td> <td><code class="docutils literal"><span class="pre">String</span></code></td> <td><span class="cb">buf_x2</span></td> </tr> <tr class="row-even"><td colspan="2">The buffer model to use to drive sub-nets</td> </tr> </tbody> </table> </div> <div class="section" id="recursive-save-rsave"> <h3>Recursive-Save (RSave)<a class="headerlink" href="#recursive-save-rsave" title="Permalink to this headline">¶</a></h3> <p>Performs a recursive top down save of all the models from the top cell loaded in <span class="cb">cgt</span>. Forces a write of any non-terminal model. This plugin is used by the clock tree plugin after the netlist clock sub-nets creation.</p> </div> </div> <div class="section" id="a-simple-example-am2901"> <h2>A Simple Example: AM2901<a class="headerlink" href="#a-simple-example-am2901" title="Permalink to this headline">¶</a></h2> <p>To illustrate the capabilities of <span class="sc">Coriolis</span> tools and <span class="sc">Python</span> scripting, a small example, derived from the <span class="sc">Alliance</span> <span class="cb">AM2901</span> is supplied.</p> <p>This example contains only the synthetized netlists and the <span class="cb">doChip.py</span> script which perform the whole P&R of the design.</p> <p>You can generate the chip using one of the following methods:</p> <ol class="arabic"> <li><p class="first"><strong>Command line mode:</strong> directly run the script:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">dummy</span><span class="nd">@lepka</span><span class="p">:</span><span class="n">AM2901</span><span class="o">></span> <span class="o">./</span><span class="n">doChip</span> <span class="o">-</span><span class="n">V</span> <span class="o">--</span><span class="n">cell</span><span class="o">=</span><span class="n">amd2901</span> </pre></div> </div> </li> <li><p class="first"><strong>Graphic mode:</strong> launch <span class="cb">cgt</span>, load chip netlist <code class="docutils literal"><span class="pre">amd2901</span></code> (the top cell) then run the <span class="sc">Python</span> script <span class="cb">doChip.py</span>.</p> </li> </ol> <div class="admonition note"> <p class="first admonition-title">Note</p> <p>Between two consecutive run, be sure to erase the netlist/layout generated:</p> <div class="last highlight-default"><div class="highlight"><pre><span></span><span class="n">dummy</span><span class="nd">@lepka</span><span class="p">:</span><span class="n">AM2901</span><span class="o">></span> <span class="n">rm</span> <span class="o">*</span><span class="n">_cts</span><span class="o">*.</span><span class="n">vst</span> <span class="o">*.</span><span class="n">ap</span> </pre></div> </div> </div> </div> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="../PythonTutorial/index.html" class="btn btn-neutral float-right" title="Hurricane+Python Tutorial" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="ViewerTools.html" class="btn btn-neutral" title="CGT - The Graphical Interface" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <table class="footer1"> <tr> <td class="LFooter"><small> Generated by <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://readthedocs.org">RTD</a> theme on Oct 30, 2019. </small></td> <td class="RFooter"></td> </tr> </table> <table class="footer2"> <tr> <td class="LFooter">Coriolis 2 Documentation</td> <td class="RFooter"><small> © Copyright 2000-2019, Sorbonne Université. </small></td> </tr> </table> </div> </footer> </div> </div> </section> </div> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT:'../', VERSION:'2', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.StickyNav.enable(); }); </script> </body> </html>