You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Eyck Jentzsch 5651e1bcdd Incorporated latest updates 10 months ago
.settings Adapted generated code to support translation block linking 2 years ago
cmake Adapted plugin behavior obeying availabiltiy of instrumentation 2 years ago
dbt-core @ c1d65b863b Updated to accomodate latest changes in SystemC components library 10 months ago
etc Cleanup using clang-tidy & clang-format, updated license statements 1 year ago
external Updated to accomodate latest changes in SystemC components library 10 months ago
html Adapted hierarchy names 1 year ago
platform Updated to accomodate latest changes in SystemC components library 10 months ago
riscv Updated to accomodate latest changes in SystemC components library 10 months ago
riscv.sc Updated to accomodate latest changes in SystemC components library 10 months ago
sc-components @ b2b0279143 Incorporated latest updates 10 months ago
softfloat Cleanup of cmake files 1 year ago
.clang-format Added clang-format formatting 2 years ago
.cproject Updated to accomodate latest changes in SystemC components library 10 months ago
.gitignore Fixed WS output 1 year ago
.gitmodules Added pwm unit 1 year ago
.project Disabled SystemC many writer check 1 year ago
CMakeLists.txt Cleanup using clang-tidy & clang-format, updated license statements 1 year ago
LICENSE Initial commit 2 years ago
README.md Updated README 1 year ago
build.sh Moved to cmake4eclipse builder 2 years ago
conanfile.txt Updated to accomodate latest changes in SystemC components library 10 months ago
cycles.txt Made plugin call configurable 2 years ago
system-terminal.json Cleanup and typo fixes 1 year ago
system.json Extended CLI interface to also specify trace db name 1 year ago

README.md

RISCV-VP

An instruction set simulator based on DBT-RISE implementing the RISC-V ISA

RISCV-VP README

This is work in progress, so use at your own risk. The project implements SiFives HiFive1 as SystemC based Virtual Prototypes. DBT-RISE and code generation is used to allow easy extension and adaptation of the used instruction set. The RISC-V ISS runs at 65MIPS on recent Intel processors.

The implementation is based on LLVM >=4.0. Eclipse CDT is recommended as IDE.

RISCV-VP uses libGIS (https://github.com/vsergeev/libGIS) as well as ELFIO (http://elfio.sourceforge.net/), both under MIT license.

Quick start

    pip install --user conan
  • setup conan to use the minres repo:
    conan remote add minres https://api.bintray.com/conan/minres/conan-repo
    conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
  • checkout source from git
  • start an out-of-source build:
    cd DBT-RISE-RiscV
    mkdir build
    cd build
    cmake ..
    cmake --build .
  • if you encounter issues when linking wrt. c++11 symbols you might have run into GCC ABI incompatibility introduced from GCC 5.0 onwards. You can fix this by adding ‘-s compiler.libcxx=libstdc++11’ to the conan call or changing compiler.libcxx to
compiler.libcxx=libstdc++11

in $HOME/.conan/profiles/default

Detailed Setup steps

prepare Ubuntu 18.04

    sudo apt-get install -y git python-pip build-essential cmake libloki-dev zlib1g-dev libncurses5-dev \	
        libboost-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev \
        libboost-thread-dev llvm-dev
    pip install --user conan
    export PATH=${PATH}:$HOME/.local/bin

prepare Fedora 28

    #prepare system
    dnf install @development-tools gcc-c++ boost-devel zlib-devel loki-lib-devel cmake python2 python3 llvm-devel llvm-static
    #install conan
    pip3 install --user conan
    export PATH=${PATH}:$HOME/.local/bin

Build the ISS

    # configure conan
    conan remote add minres https://api.bintray.com/conan/minres/conan-repo
    conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan
    conan profile new default --detect
    # clone and build DBT-RISE-RISCV
    git clone --recursive https://git.minres.com/DVCon2018/RISCV-VP
    cd RISCV-VP/
    git checkout develop
    mkdir build;
    (cd build; MAKE_FLAGS="-j4" cmake ..)
    make -C build -j4

Run a SystemC simulation

You need to have a firmware image available. Examples can be found in the Freedom Studio which can be found at https://www.sifive.com/products/tools/ or at https://git.minres.com/DVCon2018/Firmware/src/branch/master/riscv-bldc-forced-commutation

    build/bin/riscv.vp -v4 -t1 -c system.json -l <path to FW ELF file>

If you get a SystemC error E115 please execute it as

    SC_SIGNAL_WRITE_CHECK=DISABLE build/bin/riscv.vp -v4 -t1 -c system.json -l <path to FW ELF file>