Skip to main content

PyMTL3-Net: an open-source Python-based framework for modeling, testing, and evaluating on-chip interconnection networks

Project description

=======================================
    ____        ____  _______   __
   / __ \__  __/ __ \/ ____/ | / /
  / /_/ / / / / / / / /   /  |/ /
 / ____/ /_/ / /_/ / /___/ /|  /
/_/    \__, /\____/\____/_/ |_/
      /____/
=======================================

Build Status

PyOCN (PyMTL3-net) is a parameterizable and powerful OCN (on-chip network) generator to generate synthesizable Verilog for different OCNs based on user-specified configurations (e.g., network size, topology, number of virtual channels, routing strategy, switching arbitration, etc.). It comes with PyMTL implementation and is the first one to provide functional-level (FL), cycle-level (CL), and register-transfer-level (RTL) modeling for building OCNs. Furthermore, PyOCN is open-source with a modular design and standardized interfaces between modules. The configurability and extensibility are maximized by its parametrization system to fit in various research and industrial needs.

PyOCN supports OCN characterization by providing scripts (https://github.com/cornell-brg/mflowgen) that semi-automatically takes the generated Verilog and net activity file to drive a standard-cell-based electronic-design- automation (EDA) toolflow for area, energy, and timing analysis.

Demo

We have a demo at repl.it (https://repl.it/@ChengTan/pyocn-demo), which shows the key features of PyOCN.

Related publications

  • Cheng Tan, Yanghui Ou, Shunning Jiang, Peitian Pan, Christopher Torng, Shady Agwa, and Christopher Batten. "PyOCN: A Unified Framework for Modeling, Testing, and Evaluating On-Chip Networks." 37th IEEE International Conference on Computer Design. (ICCD-37), Nov 2019.

  • Shunning Jiang, Christopher Torng, and Christopher Batten. "An Open-Source Python-Based Hardware Generation, Simulation, and Verification Framework." First Workshop on Open-Source EDA Technology (WOSET'18) held in conjunction with ICCAD-37, Nov. 2018.

  • Shunning Jiang, Berkin Ilbeyi, and Christopher Batten. "Mamba: Closing the Performance Gap in Productive Hardware Development Frameworks." 55th ACM/IEEE Design Automation Conf. (DAC-55), June 2018.

License

PyOCN is offered under the terms of the Open Source Initiative BSD 3-Clause License. More information about this license can be found here:

Installation

PyOCN requires Python3.7 and has the following additional prerequisites:

  • graphviz, verilator
  • git, Python headers, and libffi
  • virtualenv
  • PyMTL3

The steps for installing these prerequisites and PyOCN on a fresh Ubuntu distribution are shown below. They have been tested with Ubuntu Trusty 14.04.

Install python3

 % sudo apt-get install python3.7

Install graphviz

 % sudo apt-get install -y graphviz

Install Verilator

Verilator is an open-source toolchain for compiling Verilog RTL models into C++ simulators. PyOCN uses Verilator for Verilog import.

 % wget https://github.com/cornell-brg/verilator-travisci-cache/raw/master/verilator-travis-4.008.tar.gz
 % tar -C ${HOME} -xzf verilator-travis-4.008.tar.gz
 % export VERILATOR_ROOT=${HOME}/verilator
 % export PATH=${VERILATOR_ROOT}/bin:${PATH}
 % export PYMTL_VERILATOR_INCLUDE_DIR=${VERILATOR_ROOT}/share/verilator/include
 % verilator --version

Install git, Python headers, and libffi

We need to install the Python headers and libffi in order to be able to install the cffi Python package. cffi provides an elegant way to call C functions from Python, and PyMTL uses cffi to call C code generated by Verilator. We will use git to grab the PyMTL source. The following commands will install the appropriate packages:

 % sudo apt-get install git python-dev libffi-dev

Create virtual environment

While not strictly necessary, we strongly recommend using virtualenv to install PyMTL3 and the Python packages that PyMTL3 depends on. virtualenv enables creating isolated Python environments. The following commands will create and activate the virtual environment:

 % python3 -m venv ${HOME}/venv
 % source ${HOME}/venv/bin/activate

Install PyMTL3 and Python requirements

 % pip install pymtl3
 % pip install --upgrade pip setuptools twine
 % pip install --requirement requirements.txt
 % pip list

Clone PyOCN repo

We can now use git to clone the PyOCN repo.

 % mkdir -p ${HOME}/cornell-brg
 % cd ${HOME}/cornell-brg
 % git clone --depth=50 https://github.com/cornell-brg/posh-ocn.git cornell-brg/posh-ocn

When you're done testing/developing, you can deactivate the virtualenv::

 % deactivate

Quickview

OCN generator hierarchy:

Test with a set of simple tests:

test table

OCN generator design flow:

Generic network architecture:

OCN generic router architecture:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymtl3-net-0.2.tar.gz (45.7 kB view details)

Uploaded Source

Built Distribution

pymtl3_net-0.2-py3-none-any.whl (80.4 kB view details)

Uploaded Python 3

File details

Details for the file pymtl3-net-0.2.tar.gz.

File metadata

  • Download URL: pymtl3-net-0.2.tar.gz
  • Upload date:
  • Size: 45.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for pymtl3-net-0.2.tar.gz
Algorithm Hash digest
SHA256 6a322b2e7d710b0a978450c784da13e3bdcfd4ef5640686286e3e2876872b374
MD5 d0d521e95dd48162625c1d1a6c7351c2
BLAKE2b-256 58100601defe6b2ca6b96ade6293c9a7a8ba54df971e9345c9a067d25774f78e

See more details on using hashes here.

Provenance

File details

Details for the file pymtl3_net-0.2-py3-none-any.whl.

File metadata

  • Download URL: pymtl3_net-0.2-py3-none-any.whl
  • Upload date:
  • Size: 80.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8

File hashes

Hashes for pymtl3_net-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92640b7d83a68134f33804c4af7c2213bc1d519b95543ee3aa3fa6d4a5e3fa2d
MD5 5392874f376f51e9f977d329c3dc3020
BLAKE2b-256 2ab725e09eb839ab079d2c6e2d25dd400a7d9bf8f82f666a7d49a42ba7d38aeb

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page