Skip to content

steveri/easysteps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EASYSTEPS - Simpler mflowgen step creation

Status
linux build status

What It Is

This easysteps package is designed to simplify construct.py scripts for new mflowgen flows; it aims to reduce duplicated/unnecessary extra effort involved for various simple tasks. See https://github.com/mflowgen/mflowgen for a description of what mflowgen is and how to use it.

Without easysteps, adding a node/step involves modifying your construct.py script in three separate places, once to define the node, once to add the node to the graph, and once to connect it to the other nodes in the graph, as in the "original syntax" examples below. (Note all "original syntax" examples are taken from test/design_before/Tile_PE/construct.py, copied from Stanford's garnet project https://github.com/StanfordAHA/garnet).

The main benefit of easysteps is the ability to define, add, and connect a new custom or default step all in the same place within the construct.py script, as in the "new syntax" examples below. (Also see test/design_after/Tile_PE/construct.py

ORIGINAL SYNTAX for building custom "extended" step "custom-genus-scripts"
and default step "synth": Twelve lines of code scattered throughout "construct.py".

  custom_genus_scripts = Step( this_dir + '/custom-genus-scripts' )
  synth = Step( 'cadence-genus-synthesis', default=True )

  # Later in the script
  synth.extend_inputs( custom_genus_scripts.all_outputs() )

  # Later still
  g.add_step( synth                    )
  g.add_step( custom_genus_scripts     )

  # Later yet again
  g.connect_by_name( custom_genus_scripts, synth )
  g.connect_by_name( synth,       iflow                )
  g.connect_by_name( synth,       init                 )
  g.connect_by_name( synth,       power                )
  g.connect_by_name( synth,       place                )
  g.connect_by_name( synth,       cts                  )
  g.connect_by_name( synth,       custom_flowgen_setup )

NEW SYNTAX: Two lines of code, one for each step.
  custom_genus_scripts = EStep( g, 'custom-genus-scripts', 'synth' )
  synth = DStep( g, 'cadence-genus-synthesis', 'iflow, init, power, place, cts, custom_flowgen_setup')

We also introduces a convenience method reorder() for adding/removing tcl scripts sourced by an existing step:

ORIGINAL SYNTAX for tcl script reorder: Six separate python ops
      order = place.get_param('order')
      read_idx = order.index( 'main.tcl' ) # find main.tcl
      order.insert(read_idx + 1, 'add-aon-tie-cells.tcl')
      order.insert(read_idx - 1, 'place-dont-use-constraints.tcl')
      order.append('check-clamp-logic-structure.tcl')
      place.update_params( { 'order': order } ) 

NEW SYNTAX: One new reorder() op
      reorder(place,
              'after  main.tcl: add-aon-tie-cells.tcl',
              'before main.tcl: place-dont-use-constraints.tcl',
              'last           : check-clamp-logic-structure.tcl')

For a more complete comparison see

  • original syntax example easysteps/test/design_before/Tile_PE/construct.py
  • vs. easysteps version easysteps/test/design_after/Tile_PE/construct.py

How To Use It: Example

See complete working example test/test.sh for how to use easysteps. Briefly, it's something like this:

  1. Download mflowgen and install mflowgen
    % git clone https://github.com/mflowgen/mflowgen.git
    % cd mflowgen; pip install -e .
  1. Download easysteps and set env var EASYSTEPS_TOP
    % git clone https://github.com/steveri/easysteps.git
    % export EASYSTEPS_TOP=$PWD/easysteps

  1. In each construct.py script, import easysteps packages
    from mflowgen.components import Graph, Step

    # easysteps packages
    sys.path.append(os.environ.get('EASYSTEPS_TOP')

    from easysteps import CStep
    from easysteps import DStep
    from easysteps import EStep

    from easysteps import reorder
    from easysteps import econnect
    from easysteps import connect_outstanding_nodes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published