Giter VIP home page Giter VIP logo

chp2prs's Introduction

chp2prs: Syntax-directed translation of CHP programs into production rules

CircleCI

Usage

Usage: [executable] [-Ob] [-e <exprfile>] [-o yosys] <actfile> <process> <outfile>

The options are:

  • -b : use bundled data datapath. Default is to use a QDI datapath
  • -O : run CHP optimizations. Requires the chp-opt package.
  • -e <exprfile>: process definitions for each expression evaluation are saved in <exprfile>. The default is expr.act
  • -o yosys : run expression optimization using yosys. Requires the expropt package.
  • <actfile> : the input ACT file that contains the design
  • <process> : the name of the ACT process to be translated (the top-level process)
  • <outfile> : where the result should be saved.

Installation

This program is for use with the ACT toolkit.

  • Please install the ACT toolkit first; installation instructions are here.
  • Install the ACT standard library
  • Run ./configure
  • Build this program using the standard ACT tool install instructions here.

Overview

A continuation of a project with Rajit Manohar's AVLSI group (see the original, which was developed by Zeb Mehring as part of his senior project at Yale). A program which takes in an .act file of the form:

defproc foo() {
  /* variable delcarations */
  chp {
    ...
  }
}

and compiles the constituent CHP into ACT:

defproc sdt_foo <: foo() {
  /* compiled ACT */
  ...
}

using the libraries provided. The translation is created by using the refine { ... } module, and so use the -ref=1 command-line option to ACT tools to use the generated circuit.

The conversion is accomplished using syntax-directed translation, which is jusfitied using direct process decomposition.

Test Suite

make runtest

will test the correctness of the repository by iterating through the the test/unit_tests folder and reporting the number of passing or failing tests. This runs through all variants of the translation as well.

License

The source code for this tool is released under the GNU GPLv2. The ACT files that provide supporting library functions (the lib/ directory) are released under GNU LGPLv2.1.

Contributors and History

Many have contributed to this implementation over the years, and the history is roughly the following. The initial version was hacked together by Rajit Manohar, as a sample solution to a class lab assignment, with support for a small subset of CHP. Zeb Mehring took this and turned it into a much more complete implementation (see the original) as part of his senior project at Yale (~2018). As part of her senior project, Amanda Hansen took Zeb's version, added many of the tests, and made many significant changes to the generated ACT as well as the library. In collaboration with Linc Berkeley, she also added certain optimizations to the translation to reduce overhead (~2020). After several discussions with Marly Roncken and Ebele Esimai who were modifying the tool to support their own flow, the entire implementation was re-factored in summer/fall 2020. The tool was converted over to the ACT pass framework in 2021. In 2021, Ole Richter added external expression optimization that invokes existing logic synthesis tools to optimize the logic for expressions.

chp2prs's People

Contributors

ajoann avatar henryheffan avatar olerichter avatar rmanohar avatar zebmehring avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chp2prs's Issues

make excution of guards paralell and group

currently guards are evaluated one by one, change that for extoptSDT and group expressions, think about also implementing this for basicSDT.

if they are synthesized in the same expression block, potential circuit size reductions because of double usage

extoptSDT: add support for singed int channels

analyse the signed and unsigned behaviour of the external synthesis, currently only testing for unsigned,

the verilog export does unsigned, for 2K the wires need the signed directive

A problem about installation

I cloned chp2prs and run "make depend","make","make install". Ather that I run "make runtest".It showed that it didn't pass all tests.The result is like this. How to solve this problem?
image

chp-opt

It says in the readme file:

-O : run CHP optimizations. Requires the chp-opt package.

Where can I find this package? Or has this not been published yet? I used the build script in the actflow repository, but when I try to use the -O flag I get:

FATAL: Optimize flag is not currently enabled in the build.

The reason why I ask is that I noticed that when a log statement is used in CHP code, this gets translated into a skip block in the resulting PRS which seems to be unnecessary. The generated PRS needs e.g., wider semi blocks to accommodate the log skips, increasing circuit size.

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.