Giter Site home page Giter Site logo

mfkiwl / hemera-pulp-mcu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iis-eth-zurich/hemera

0.0 1.0 0.0 30.72 MB

Hemera: Integrating a PULP Cluster With a Microcontroller Host Processor Using the HERO Framework

Makefile 1.08% C 28.17% Python 7.48% Shell 0.37% Objective-C 0.29% C++ 20.33% Emacs Lisp 0.01% SystemVerilog 33.60% Stata 2.17% Verilog 0.23% MATLAB 0.22% Tcl 0.37% TeX 0.18% Assembly 5.06% GDB 0.01% Batchfile 0.01% CSS 0.27% JavaScript 0.01% HTML 0.04% CMake 0.10%

hemera-pulp-mcu's Introduction

Hemera: Integrating a PULP Cluster With a Microcontroller Host Processor Using the HERO Framework

This variant of HERO provides the hardware and software to integrate PULP with a simple microcontroller host processor.

Repository Organization

  • doc contains the datasheet.
  • example-apps contains example applications and tests for PULP.
  • hardware contains RTL source code and scripts to simulate and synthesize PULP.
  • pulp contains system software for PULP.
  • toolchain contains the configuration to build the PULP toolchain.

Getting Started

Prerequisites

All build steps should work on any sufficiently recent Linux distribution (we have automated tests on CentOS 7). Most of the core dependencies are installed automatically as part of the toolchain. Required is at least GCC 4.8 / Clang 3.3 to bootstrap the toolchain installation. More details can be found here.

Setup

The toolchain is installed to the directory given by your HERO_INSTALL environment variable. Please set it to your preferred installation location before continuing with the next step

export HERO_INSTALL=<your_path>

We recommend you create an install subdirectory in this repository and set HERO_INSTALL to that.

After that, simply execute the setup.sh script to build the PULP toolchain.

Compilation

Environments

Compilation always requires a proper environment. When compiling with the minimal runtime source env/ehuawei-minimal-runtime.sh. For the full SDK use source env/esim.sh

Applications

The example-apps folder contains different example applications, which are supposed to be used with different environments.

  • Minimal runtime (source env/ehuawei-minimal-runtime.sh):
    • hello
    • mchan_tests
    • parMatrixMul
  • Pulp SDK (source env/esim.sh):
    • helloworld
    • tests-pulp

Run make in an application directory to build it, e.g., in example-apps/hello.

RTL Simulation

QuestaSim

An environment is provided to simulate the PULP accelerator in RTL. If QuestaSim is installed, the simulation infrastructure can be initialized as follows:

cd hardware/vsim
./compile.sh

Note that additional arguments can be passed to the compiler by setting VLOG_ARGS e.g. ```VLOG_ARGS=+define+USE_JTAG_DPI ./compile.sh``

Then, generate SLM files to initialize memory with

../test/gen_slm_files.sh <app_name>

where <app_name> is the path to the directory from the example-apps directory (for example hello).

Finally, start the simulation with

./start_sim.sh

VCS

The repository also includes VCS scripts for simulation. However, the VCS scripts are not as mature as the QuestaSim scripts:

cd hardware/vcs
./compile.sh

Then, generate SLM files to initialize memory with

../test/gen_slm_files.sh <app_name>

where <app_name> is the path to the directory from the example-apps directory (for example hello).

Finally, start the simulation with

./start_sim.sh

Virtual Platform

Build the virtual platfrom by executing make virtual-platform in the repository's root directory.

To launch an application use the run_vp.sh script in the pulp/virtual-platform repository. It takes the name of an application or the full path to a binary as an argument. For example to launch the hello application use:

./pulp/virtual-platform/run_vp.sh hello

The script contains two configuration variables.

  • out_dir: Contains the path to the output logs of the virtual platform.
  • trace: Indicates which events should be logged and to which files they should be written.

By default, the instruction trace of all cores is written to pulp/virtual-platform/output/cluster.

hemera-pulp-mcu's People

Contributors

andreaskurth avatar

Watchers

 avatar

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.