Commit Graph

2700 Commits

Author SHA1 Message Date
gatecat e1c5366fef crlcore: Add Python bindings for LEF export
Signed-off-by: gatecat <gatecat@ds0.me>
2022-01-10 16:54:04 +00:00
Jean-Paul Chaput 0d7deafe81 Remove mistakenly commited backup file. 2022-01-01 17:15:41 +01:00
Jean-Paul Chaput 581f557aef Fix: The SelectionPopup widget was deleted after first use.
* Bug: In Viewer::SelectionPopup(), the window attribute
   Qt::WA_DeleteOnClose was *not* cleared. So the window was deleted
   after first use while it was though staying allocated.
     Again, generating weird crashes.
     Took the occasion to slightly redesign the behavior to select
   and highlight individual components.
2022-01-01 16:47:09 +01:00
Jean-Paul Chaput 0c54d109cc Fix: Do not return transient string in PyTypeManager.
* Bug: In Isobar3::PyTypeManager, the accessors _getCppTypeName() and
    _getPyTypeName() where returning string *by value*, hence, short
    lived copies.
      But, in _setupPyType() and _addToModule(), as we interface with
    the Python/C API, we extract the c_str(). Which where removed as
    we used temporary objects. Leading to memory corruption and weird
    crashes.
      Now returns "const string&" so the c_str() stays allocated.
2022-01-01 16:46:41 +01:00
Jean-Paul Chaput 9aaaf33e6e Manage more interrupt signals in CRL::System::_trapSig(). Display value. 2022-01-01 16:46:15 +01:00
Jean-Paul Chaput 550b087f05 Takes even further appart the HTree buffer input/output. 2021-12-31 16:48:45 +01:00
Jean-Paul Chaput 084eee3b39 Added support for RHEL9. 2021-12-31 16:35:38 +01:00
Jean-Paul Chaput 5f8a0a944c Display bug for non-rectangular components in DrawinQuery::drawGo().
* Bug: In CellWidget::DrawingQuery::drawGo(), the display condition was
    wrong, it was requiring *both* width & height to be above the display
    threshold. Either one is sufficient to activate the display.
      Was causing the selective diseapearance of gates at low zoom level
    and printed version.
* Change: In CellPrinter, force the display threshold to one pixel in it's
    internal CellWidget used for printing.
2021-12-25 15:23:49 +01:00
Jean-Paul Chaput fdce75fdad Fix bad computation of perpandicular free space in DataNegociate, again.
* Bug: In Katana::DataNegociate::update(), when computing the length of
    source & target extension on a perpandicular segment, must use the
    extensions of the *directly* connected AutoSegment (the baseSegment)
    and not the canonical one that may be different, so with unrelated
    extensions.
2021-12-25 15:23:23 +01:00
Jean-Paul Chaput 104c043416 In the H-Tree, shift vertical H wire one pitch to the left.
* Bug: In cumulus/plugins.block.HTree._rrouteHTree(), the RoutingPads
    for the input and output of the buffer where sometimes put too
    close from each others, giving the pitch of the vertical tracks.
    Now shift one pitch left the vertical branchs of the H-Tree.
* Bug: In cumulus/plugins.block.HTree._rrouteHTree(), also shift down
    one pitch the horizontal branch, due to track rounding they *may*
    end up on the same track, generating a short.
2021-12-25 15:22:58 +01:00
Jean-Paul Chaput 64056d25ee Layer assignment step was ignoring the number of RoutingPad threshold.
* Bug: In Anabatic::layerAssign(), during the step of desaturation of
    GCells that contains too much terminals (i.e. lot of *local*
    congestion), the desaturation threshold was har-coded to 8.
    Wich is fine for symbolic cmos but way too low for Flexlib.
      End result was that most straight wires where moved towards
    the upper layers, creating congestion (imbalance of layer
    densities).
      Now the parameter:
        * "anabatic.saturateRp" (default value:8) is correctly taken
	  into account.
2021-12-22 15:52:22 +01:00
Jean-Paul Chaput a4ad671739 Fix too naive obstacle detection on non-prefered metal2 wires.
* Fix: In Manipulator::avoidBlockage(), the dedicated function to check if
    there is an obstacle in the way of a non-prefered routing wire (done
    for metal2 connecting to terminals only) was too naive.
      We were checking the tracks for obstacles crossing exactly the axis
    of the segment. And for near-miss this is not enough. Now check on
    the whole x-span to be used by the segment.
      Code borrowed and simplified from Track::addOverlapcost().
* Change: In Manipulator::moveUp(), the default value for the extra
    reservation allowing a long wire to move up need to be customized
    for Flexlib/StdCellLib (allow successful routing of ChipFlow/MPW4).
      Add two new configuration parameters to katana:
        * "katana.longWireUpThresold1" : the length, expressed in number
	  of *slice height* above which a global wire is considered a
	  *long* wire (not close interconnect).
        * "katana.longWireUpReserve1" : the extra number of free tracks
	  that must remains free in the up layer after the move up,
	  in each GCell traversed by the wire. Expressed in number of
	  tracks, but can be non-integer (float, for instance: 1.5).
2021-12-21 16:13:31 +01:00
Jean-Paul Chaput 92e5f3fa4d Update ad-hoc patch for obstacles for Flexlib & StdCellLib.
* Bug: In Katana::PowerRailsPlane::Rail::doLayout(), to avaid tracks too
    close to an offgrid obstacle in the preferred routing direction, we
    expand the width/height of the segment by one pitch. BUT it seems to
    still be too close for Flexlib and StdCellLib, so there is an ad-hoc
    patch based on the *name* of the cell library. Update it to take
    "StdCellLib" into account.
2021-12-21 16:13:07 +01:00
Jean-Paul Chaput 3fa8d516bc Fix bad computation of perpandicular free space in DataNegociate.
NOTE: This is likely to explain why we still got overlap in the
      track coherency check in very rare occasions.

* Bug: In Katana::DataNegociate::update(), when computing the allowed
    free interval for the segment axis deduced from the perpandicularly
    connex segments, we account for the extension of the connecting
    VIA. Those extension varies according to the kind of VIA and are
    given by getExtensionCap().
      We were accounting for the source & target extension VIA on the
    parallel segments, assuming that source/target would not swap when
    the perpandicular is moved. Which is *not* true.
      Now account for the extension of the *connecting* VIA on all ends.
* Change: In AutoSegment::getTopologicalInfos(), enrich the list of
    perpandicularly connected segment with wether they are connex by
    their *source* or *target* contact. Mainly to be used by
    DataNegociate::update().
2021-12-18 17:45:17 +01:00
Jean-Paul Chaput ae1f08f039 Change SkyWater130 Caravel harness connecting strategy.
* Change: In cumulus/plugins/core2chip, instead of the user providing
    an explicit mapping towards the harness I/O pins, we expect that
    the core block must have I/O pins with names matching thoses of
    the harness. That way, connections are automatically made.
* Change: In cumulus/plugins/block/htree, if the root signal of the
    H-Tree is a bit from a vector (like "io_in(0)"), then remove the
    vector index notation on all the stem name of all the sub-nets.
    Done by the unbitify() function: "io_in(0)" => "io_in_bit0".
2021-12-17 15:58:57 +01:00
Jean-Paul Chaput 76d468f6d5 Change in feed & tie managements to fill the empty row spaces.
* Change: In EtesianEngine::_postCreate(), issue a warning if the list of
    feeds is empy (configuration: "cfg.etesian.feedNames").
* New: Add a FeedCeels::getFeedByWidth() method to get feeds by their
    width in DbU::Unit and not only pitches.
* Change: In Placement::Slice::fillHole(), invert the tie filling and
    feeds filling stage. Now we first try to fill the row hole with
    feeds, using the widest first, and if they are not configured or
    too wide, use the tie.
      As the tie *should* also be integrated in the feed list, we may
    suppress altogether the fallback tie filling step. Keep it for now.
* Change: In Placement::slice::createDiodeUnder(), the inserted diode
    *may* be smaller than the feed it replace. So, in this case, add
    a complementary feed to fill the gap.
    NOTE 1: Out of lazyness, we add only *one* complementary filler
            cell. So there *must* be one of a width wich correspond
	    exactly to the difference between the original feed and
	    the diode. Otherwise, gap will remains.
    NOTE 2: With wider feed cells, they may cross the GCell border.
            But we must insert the diode under the GCell, otherwise
	    the global routing will be defective. So, for now, reject
	    feeds that cross the boundary. Must be done more smartly
	    by inserting the diode over the left or right side of
	    the feed.
2021-12-17 15:58:13 +01:00
Jean-Paul Chaput 4ab6888b94 Fix Pin managment on north & east side of the cell abutment box.
* Change: In AnabaticEngine::setupPrerouteds(), take into account the
    number of Pins. Now consider a net containing multiple Pins and, at most,
    one segment as *non-routed".
      This case may specifically happens for nets with pins on the north
    and east side, which are slightly *inside* the abutment box (to be
    seen by the router) and draw with them their *outside* direct
    connection wire.
* Bug: In cumulus/plugins.chip.CoreWire, no longer put the north or
    east side external Pin *exacyly* on the abutment box but *one pitch*
    inside so they are correctly seens by the P&R (must be *inside*
    the area of a GCell).
2021-12-17 15:56:15 +01:00
Jean-Paul Chaput 67ca0997c3 Merge branch 'fix-blif-zero-one' into 'devel'
blif: Improve detection of zero/one net by requiring it to be external

See merge request vlsi-eda/coriolis!12
2021-12-11 21:07:18 +00:00
Jean-Paul Chaput 73296503ad Merge branch 'devel' of gitlab.lip6.fr:vlsi-eda/coriolis into devel 2021-12-11 22:00:10 +01:00
Jean-Paul Chaput fe32916d14 Add support for the SkyWater130 Caravel harness to "core2chip".
It is now possible to automatically nest a core block inside a harness
frame, like we do for an ordinary chip whith I/O pads. The DEF harness
file "user_project_wrapper.def" must be made available though the block
configuration variable:
   conf.cfg.harness.path = './user_project_wrapper.def'
A first small example is given in:
   alliance-check-toolkit/benchs/counter/sky130_c4m
The harness layout is stripped from it's native power grid (but keep
the power ring). I/O pad information in block/configuration is
slightly "bent* to manage pins instead of complete I/O pads.

* Bug: In cumulus/plugins.block.Block.setupAb(), the routingBb was not
    set up when working in chip mode. Now set (to the corona AB).
* Change: In cumulus/plugins.chip.__init__, move there the CoreWire
    class (from chip/pads.py) so it can be shared with the harness
    version of pads.py.
* Change: In cumulus/plugins.chip.powerplane, compute the intersection
    between the vertical supply stripes and the deep horizontal power
    lines in a smarter fashion, so two (or more) vertically contiguous
    BigVias are merged into one (two BigVia side by side where causing
    mimimal spacing distance violation on the cut in Sky130).
2021-12-11 19:52:31 +01:00
Jean-Paul Chaput 2ca9e162ef Allow the detailed routing to be build from non-bottom P&R layers.
* New: In Anabatic::AutoSegment::create(), allow the created segment to
    be in any supported routing layer, and not only the bottom H & V.
    Modifications impact the *two* overload of the function.
* Change: In Anabatic::NetBuilderHV::doRp_AutoContacts(), for punctual
    METAL1, the protection has to be in METAL2. Bump the layer depth
    to correctly use the updated verstion of AutoSegment::create().
* Change: In AnabaticEngine::checkPlacement(), for the Pin, check that
    it's layer is in the routing gauge before anything else.
* New: In Katana::NegociateWindow::createTrackSegment(), if the track
    nearest the segment axis (refTrack) do not exists, call a
    breakpoint just before crashing.
2021-12-11 19:51:24 +01:00
Jean-Paul Chaput ba2a74e35d Tweaked DEF support to load the Caravel harness.
* Bug: In CRL::BlifParser::Model CTOR, forgot to set the direction
    on auto-generated power supply global nets. So they were put
    in "linkage" in the VST files.
* New: In CRL::DefImport, add specific support for the Sky130/Caravel
    harness "user_project_wrapper".Mainly:
    - Do not fuse together "io_in" and "io_out" as a single net as
      they should (according to the DEF). So we can connect separately
      on each of them. We only allow one port for each net, as in VHDL.
2021-12-11 19:48:57 +01:00
Jean-Paul Chaput 2f0bf5456d Added Etesian to the measurment system.
* Bug: In CRL::MeasureSet::toStringHeaders(), check and issue a warning
    if a measure label ends with a "." (dot).
* Change: In CRL::ToolEngine::getMeasure(), return the data measure
    by pointer instead of by reference (easier to manipulate afterwards).
* New: In EtesianEngine::place(), add the placement runtime (under label
    "placeT") to the measure set.
* New: In KatanaEngine::dumpMeasures(), add the Etesian runtime to the
    set of measures.
2021-12-11 19:47:24 +01:00
Jean-Paul Chaput be598c9b96 Update the Python wrapping of Hurricane::Entity.
* New: In Hurricane::PyEntity, export the getBoundingBox() method.
2021-12-11 19:44:20 +01:00
gatecat 3f08b3789f blif: Improve detection of zero/one net by requiring it to be external
Signed-off-by: gatecat <gatecat@ds0.me>
2021-12-10 19:17:03 +00:00
Jean-Paul Chaput f14ef8adc2 Updated PDFs, December 10, 2021 (15:07). 2021-12-10 15:07:58 +01:00
Gabriel Gouvine b4a7d1a6fd Add SUPPORT.rst file 2021-12-09 22:32:02 +01:00
Gabriel Gouvine 4e23dff0dc Update URL in the README 2021-12-09 22:31:58 +01:00
Jean-Paul Chaput f954f69574 Suppress error message when NDA plugins directory does not exists. 2021-11-28 19:40:59 +01:00
Jean-Paul Chaput b1b67d18e6 Add support of vertical power rails made of powmid cells in Block.
* New: In cumulus/plugins.block.congiguration: New PowersConf config
    sub-object to store characteristics of the "powmid_x0" cell.
    The name of the Cell with which to build the vertical power
    rails is given though the cfg parameter:
      "cfg.etesian.cell.power"
* New: In cumulus/plugins.block.spares, add support for creating
    vertical power lines along with the buffers pools of the H-Trees.
    At most, one vertical power rail will be put exactly at the right
    edge of the buffer pool of each leaf QuadTree. We can reduce that
    number, using the parameter:
      "cfg.block.vRailsPeriod = N"
      Which give the ratio to use (one over N QuadTree leaf).
   WARNING: This may not work if the QuadTree is "dented" not in a
            corner but in the *middle* of the side. Needs to be
	    improved and/or checked.
2021-11-28 19:12:59 +01:00
Jean-Paul Chaput df972b7250 Add Diode/Feed flags in Cell. Correct computation of Instance count.
WARNING: We are partially duplicating the informations pertaining
         to the Alliance catalog (stored in the Catalog property)
	 directly into the Cell. This is needed for Flexlib which
	 is not using the Alliance loading mechanim. Ideally the
	 Catalog information should be moved into the Cell.

* New: In Cell, add new state flags Diode, PowerFeed (in addition to
    Pad & Feed).
      Export flags setter/getter to Python. For Flexlib usage.
* Change: In AllianceFramework::getInstancesCount(), correctly skip
    Diode & Feeds based on Cell flags. Those flags must correctly
    be set in the various Flexlib_fix.py scripts.
2021-11-28 19:03:02 +01:00
Jean-Paul Chaput 01224e6a06 Forgot to disable debug in Track::repair() ... 2021-11-26 23:33:05 +01:00
Jean-Paul Chaput d8218d0698 Fix bad computation of gap in Tracks in some special cases.
* Bug: In Track::repair(), when closing a same net gap, the amount the
    "right" segment duSource must be shifted left was incorrectly
    computed in some instances.
      The previous calculation was assuming that the right edge of the
    gap was at the exact same position than the source extension.
    But when there is a non-preferred direction connected to it, this
    is wrong. Now compute the delta accounting for a difference
    between the right edge of the gap and the source extension.
2021-11-26 18:59:46 +01:00
Jean-Paul Chaput 6a3c9d1d54 Set the a default pixel threshold in CRL/etc/commons.display.
NOTE: Due to Python pathes, the NDA.common is *not* seen, even by NDA
      protected configuration. They are using the non-NDA one. No harm
      in that, just need to be known...
2021-11-26 11:32:33 +01:00
Jean-Paul Chaput 7c0f1fcf58 Fairly compute the flat numbers of instances in a design.
* New: In AllianceFramework::getInstancesCount(), add a flag TerminalNetlist
    to stop recursion on "terminal for netlist" instance level. This is to
    avoid counting physical only or non-routed instances inside hard macros,
    like SRAM blocks. This was leading to an overstimation of the "size"
    in number of gates of the routing problem.
* Change: In KatanaEngine CTOR, call for the terminal for netlist number of
    gates...
2021-11-26 11:29:23 +01:00
Jean-Paul Chaput 966a25181f Optimize Cell::getDeeNet() to fix the slow-down in PowerRails.
* New: In DeepNet, add an DeepNet::Uplink property on the HyperNet
    root net Occurrence so we have a direct two-way link between
    the top (flattened net) and the root of the HyperNet.
      Down link is ensured by the Occurrence, up link by the Uplink
    property.
* Change: In Cell::getDeepNet(), now use the DeepNet Uplink property
    instead of looping over *all* top nets. This was the cause of the
    terrific slow down in PowerRails, especially on flatteneds designs.
2021-11-25 10:49:45 +01:00
Jean-Paul Chaput ca499e024c Restore the measurements taking in Anabatic/Katana.
* New: In AnabaticEngine::printMeasures(), re-enable runtime & memory
    footprint in measurements.
* Bug: In Anabatic::AutoSegment CTOR, correct computation of the initial
    number of global segments. We were relying on the "global" flag,
    which is *not* set at this stage. Now compare source and target
    GCells.
* New: In KatanaEngine::runGlobalRouter(), store H-ovE & V-ovE in
    measurements.
* New: In KatanaEngine CTOR, add the number of gates (flattened) to
    the measurments.
* New: In KatanaEngine::runNegociate(), add the number of GCells to
    the measurements.
* Change: In KatanaEngine::printCompletion(), compute the wirelengths
    in either lambdas (symbolic) or *nanometers* (real).
* New: In cumulus/plugins.block.Block, add a setting to request the
    Katana measurements dumping: "cfg.katana.dumpMeasures"
2021-11-24 15:52:56 +01:00
Jean-Paul Chaput 10bd5510da Fix library linking problem for gcc 9 and above (Ubuntu 20/Debian 11).
* Bug: In all CMakeLists.txt, it seems I was doing a worng use of
    target_link_library(). No longer add dependencies to the C++ base
    library but instead either to the Python associated module or
    to the final binaries. This was inderectly causing the linking
    problem related to Python (which was a misdirection).
* Bug: Typo in FindLibexecinfo.cmake, do not use FindLib[E]xecinfo.
* Change: In CRL/ccore/CMakeLists.txt, activate SKIP_AUTOMOC on
    bison/flex generated files.
* Bug: In viewer/PyHApplication, do not delete the C++ object in
    the Python destroy method.
2021-11-22 00:05:48 +01:00
Jean-Paul Chaput 302accfbb1 Update documentation (by mistake, nothing new). 2021-11-21 23:40:40 +01:00
Jean-Paul Chaput c67e326205 Updated PDFs, November 21, 2021 (22:10). 2021-11-21 22:10:34 +01:00
Jean-Paul Chaput 3b971ddf3e Updated PDFs, November 21, 2021 (19:41). 2021-11-21 19:41:13 +01:00
Jean-Paul Chaput 972ed1be20 In Stratus.st_model, make Model derive from object. 2021-11-21 19:37:32 +01:00
Jean-Paul Chaput 5bf80a95d0 In Katana::Configuration::print(), display the _{h,v}TrackReservedMin. 2021-11-21 19:37:06 +01:00
Jean-Paul Chaput 66e7fd648d In ccb.py, update the organization name to "Sorbonne Université". 2021-11-21 19:36:35 +01:00
Jean-Paul Chaput c595a8e73e No longer straight route the root of a H-Tree.
* Change: In cumulus/plugins.block.HTree._rrouteHTree(), make the
    non-routing of the root net the default policy. Straight routing
    can still be activated with the use of Spares.ROUTE_ROOT_NET.
2021-11-16 17:11:00 +01:00
Jean-Paul Chaput 0f636912e0 Support more configuration 1G_xM1_1PinM2.
* Change: In Anabatic::NetBuilder::construct(), add support for up to 5 M1
    terminals in calling _do_1G_xM1_1PinM2(). When inserting diodes on
    long wires, when there is not enough space underneath, they may end
    up gouped at an end.
2021-11-16 00:28:43 +01:00
Jean-Paul Chaput d72ccca88e Fix wrongly exported internal pin to the north side in H-Tree.
* Bug: In cumulus/plugins.block.HTree._rrouteHTree(), on the top level
    H-Tree, draw a wire to the north side of the abutment box *only*
    if the root (usually clock) signal is *external*. It may be that
    it is *internal*, so must be routed as a normal one to the root of
    the tree.
2021-11-14 23:20:33 +01:00
Jean-Paul Chaput 68ae46ef20 Shift the wire connecting to the root of the H-Tree to avoid shorts. 2021-11-13 22:13:16 +01:00
Jean-Paul Chaput fcf6ec97c3 More fixes for the selection & inspector mechanisms.
* Bug: In Common.h, makes the INSPECTOR_PV_SUPPORT to generate a getRecord()
    by *value* instead of *by reference*. Seems the overload resolution
    system has changed and discriminate between them using now the exact
    match.
      This was causing InspectorWidget::setRootoccurrence() to fail, the
    getRecord(Occurrence) not corectly resolved always returning NULL.
* Change: In Occurrence, now use INSPECTOR_PV_SUPPORT (instead of PR).
* Change: In SelectionPopup, added a _cellWidget attribute to be able
    to call setShowSelection() in ::mouseReleaseEvent(), same as for
    SelectCommand.
* Bug: In SelectionWidget::changeSelectionMode(), reset the _updateState
    to ExternalEmit in *all cases* at the end of the function call.
    Failing to do that was another cause for the selection check box
    to desinchronize.
2021-11-09 10:53:56 +01:00
Jean-Paul Chaput f5bfeb3eae Fix auto-scaling of the grid over the displayed area.
* Bug: In CellWidget::drawGrid(), the scaling of grid was never recomputed
    according to the zoom level. So in low zoom, it was too fine and
    hidding everything underneath...
      Now always display between 1 and 10 lines. Lines are put on the
    grid step.
      Makes the grid draw in dotted lines, seems to looks nicer.
2021-11-06 13:41:15 +01:00