Package: pymtl3
PyMTL 3 (Mamba)PyMTL 3 (Mamba) is the latest version of PyMTL, an open-source
Python-based hardware generation, simulation, and verification framework with
multi-level hardware modeling support. The original PyMTL was introduced
at MICRO-47 in December, 2014. Please note that PyMTL 3 is currentlybetasoftware that is under active development and documentation is
currently quite sparse.In June 2019,Keeping Computer Hardware Fast and Furious: "PyMTL is a fantastic example of what we need to jump-start the open-source hardware ecosystem…It’s a key missing link."was featured on Cornell Research.User ForumWe recommend the user to post onhttps://groups.google.com/forum/#!forum/pymtl-usersto ask questions about using PyMTL 3. The github issues are reserved for development purposes, e.g., bug reports and feature requests.Related publicationsShunning 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.Derek Lockhart, Gary Zibrat, and Christopher Batten."PyMTL: A Unified Framework for Vertically Integrated Computer Architecture Research."47th ACM/IEEE Int'l Symp. on Microarchitecture (MICRO-47), Dec. 2014.LicensePyMTL is offered under the terms of the Open Source Initiative BSD
3-Clause License. More information about this license can be found here:http://choosealicense.com/licenses/bsd-3-clausehttp://opensource.org/licenses/BSD-3-ClauseInstallationThe steps for installing these prerequisites and PyMTL on a fresh Ubuntu
distribution are shown below. They have been tested with Ubuntu Xenial 18.04.Install PyMTL 3tl; drpip install pymtl3PyMTL 3 requires Python 3.6+. We highly recommend you work inside avirtual environmentinstead of callingsudo pip install. Starting from Python 3.5, the use of venv is now recommended for creating virtual environments.$ cd <path to where venvs are stored>
 $ python3 -m venv pymtl3 # you can use whatever Python 3.6+ binary you have
 $ source pymtl3/bin/activatePyMTL 3 needs to use cffi, so install these packages first.$ sudo apt-get install git python-dev libffi-devPyMTL 3 is available on pypi.org. As a result, you are able to just callpip install pymtl3to install PyMTL 3.$ pip install pymtl3When you relaunch the bash session, you need to re-enable the venv.$ source <path to where venvs are stored>/pymtl3/bin/activateWhen you're done testing/developing but you don't want to close the terminal, you can deactivate the virtualenv:$ deactivateAdditional dependencies includeverilator(andpkg-config) when you want to integrate SystemVerilog blackbox into your PyMTL simulation.Install VerilatorVerilatoris an open-source toolchain for compiling SystemVerilog RTL
models into C++ simulators. You can install Verilator using the
standard package manager but the version available in the package
repositories is several years old. This means you will need to build and
install Verilator from source using the following commands:$ sudo apt-get install git make autoconf g++ libfl-dev bison
 $ mkdir -p ${HOME}/src
 $ cd ${HOME}/src
 $ wget http://www.veripool.org/ftp/verilator-4.036.tgz
 $ tar -xzvf verilator-4.036.tgz
 $ cd verilator-4.036
 $ ./configure
 $ make
 $ sudo make installVerify that Verilator is on your path as follows:$ cd $HOME
 $ which verilator
 $ verilator --versionPyMTL usespkg-configto find the Verilator source files when
integrating SystemVerilog blackbox. Installpkg-configand verify that it is setup correctly as follows:$ sudo apt-get install pkg-config
 $ pkg-config --print-variables verilatorIfpkg-configcannot find information about verilator, then you can
also explicitly set the following special environment variable:$ export PYMTL_VERILATOR_INCLUDE_DIR="/usr/local/share/verilator/include"