Giter Club home page Giter Club logo

akashlevy / nem-relay-cgra Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 1.78 GB

Jade CGRA using NEM relay interconnect fabric. Related repositories: NEM-Relay-CGRA-Flow, NEM-Relay-CAD

License: BSD 3-Clause "New" or "Revised" License

Shell 0.30% Awk 0.01% Python 0.92% Makefile 0.01% Perl 3.23% Tcl 2.01% Verilog 62.74% Batchfile 0.01% SystemVerilog 1.11% C++ 0.05% C 0.01% HTML 29.63%
nems cgra fpga programmable-logic rtl verilog verilator vlsi

nem-relay-cgra's Introduction

NEM Relay CGRA (Coarse-Grain Reconfigurable Architecture) Generator

Instructions: RTL Simulation and Gate-Level Simulation (GLS)

The goal is first to get the waveforms as *.vcd files using verilator. Then, you want to take the input stimuli from the VCD and apply them to the gate-level netlist to get the gate-level activities:

  1. Clone modified TestBenchGenerator:
    • git clone https://github.com/akashlevy/TestBenchGenerator.git ../TestBenchGenerator
  2. Look at .travis.yml and install packages as done in there. Recommended: use Linux for setup. Current instructions:
    • sudo apt-get install csh verilator make g++
    • Install Miniconda:
      • wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
      • bash miniconda.sh -u -b -p $HOME/miniconda
      • Ensure that base is activated automatically
      • Restart terminal or source user profile script (e.g. .bash_profile) to activate it
      • rm miniconda.sh
    • pip install pytest numpy delegator.py bit_vector==0.42a0
  3. Go to testdir and run make vcdtest APP=<app_name> to generate the waveform. The VCD output will be in verilator/generator_z_tb
  4. Copy the VCD output to gls: cp verilator/generator_z_tb/<app_name>.vcd gls/inputs/<app_name>.vcd
  5. Symlink your mflowgen outputs/ directory from the signoff step as design in gls/
  6. Symlink your Liberty/Verilog files from the NEM-Relay-CAD repo in gls/lib/. This will work by default if your NEM-Relay-CAD repo and NEM-Relay-CGRA repo are cloned to the same directory.
  7. Copy the bitstream <app_name>.bsa for the app to gls/inputs/. The example application bitstreams are already copied there.
  8. Open the VCD and find the cycle number you want to start measuring toggling (activity factor) from
    • Typically, you want to skip the configuration phase of the CGRA, so choose the cycle that corresponds to the beginning of the usage phase after the end of configuration
    • For several CGRA applications, this cycle number has been found and stored in defines.py for convenience
    • If you are using one of these CGRA applications, you don't need to supply <active_cycle_number>
  9. Make sure the requirement modules are loaded. Add these lines to your ~/.cshrc or equivalent profile:
    • module load vcs/O-2018.09-SP1
    • module load prime
    • module load pts/K-2015.12
  10. Run GLS: python gls.py <app_name> <active_cycle_number>
  11. Then go into synopsys-ptpx-gl and configure your symlinks
    • nldm_nems40tt.db should point to the latest compiled NEMS lib file
    • stdcells.db should point to the compiled library cells from the PDK
    • nems should point to the mflowgen outputs/ directory from the signoff step of your NEMS design
    • vanilla should point to the mflowgen outputs/ directory from the signoff step of your vanilla design
  12. Finally, run run.sh <app_name> <nems_or_vanilla> which will run PTPX and generate signoff reports in gls/results/<nems_or_vanilla>.
  13. Done!

To visualize the power number breakdown after PTPX using sunburst-chart: 13. First go to gls/results/ and run powjson.py. - This will automatically parse all the power reports for all apps that were run and generate jsons. 14. Then upload the desired HSIB file to an online destination. - One good way to do this is simply to commit the json files to the repository and find the link to the raw file on GitHub. 15. Navigate to http://www.akashlevy.com/sunburst-chart/example/flare/ and enter the URL of the JSON file. 16. Done!

NOTES

VCD trace output from Verilator is in picoseconds.

Old Info from CGRAGenerator

Status
linux build status

See doc/srnotes.txt for Steve's notes on organization and such (still TBD as of this writing).

Quick guide to repository contents as of 03/2017:

  • doc/ => documentation (still TBD as of this writing)
  • Genesis2Tools => for building the project and running it with e.g. travis
  • hardware/generator_z => latest instantiation of the generator
  • hardware/generator_z/top => go here to run the generator
  • verilator => verilator experiments
  • verilator/generator_z_tb => go here to run the generator testbench (under development)

TODO

  • should replace Genesis2Tools with a build from within the travis script maybe

OBSOLETE: I think maybe these are obsolete?

  • hardware/pe => Artem's PE generator (right?)
  • hardware/sb => Ankita's switchbox generator (yes?)
  • sr-proposal/ => Steve's proposal for a unified framework for the generators

nem-relay-cgra's People

Contributors

akashlevy avatar mcoduoza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mfkiwl mcoduoza

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.