Coder Social home page Coder Social logo

easysteps's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.