Skip to content

UCTECHIP/rocket_chip_vpu

rocket_chip_vpu

the repository contains VPU source code writen in Chisel, corresponding to rocket-chip and patch for rocket-chip.

  • VPU implementation is base on 0.8-release RVV SPEC.
  • patch for rocket-chip is base on tag v1.2.6.

Usage

checkout tag v1.2.6 of rocket-chip

  $ git clone https://github.com/chipsalliance/rocket-chip.git
  $ cd rocket-chip
  $ git checkout v1.2.6
  $ git submodule update --init --recursive

Set up rocket-chip environment (for Ubuntu)

Install riscv-gnu-toolchain

checkout riscv-gnu-toolchain rvv-0.8.x branch

  $ git clone https://github.com/riscv/riscv-gnu-toolchain.git
  $ cd riscv-gnu-toolchain
  $ git checkout rvv-0.8.x
  $ git submodule update --init --recursive

install riscv-gnu-toolchain prerequisites describes:

  $ sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev

install riscv-gnu-toolchain

  $ export RISCV=/path/to/install/riscv-gnu-toolchain
  $ ./configure --prefix=$RISCV
  $ make

Set up environment for chisel3

install sbt for chisel3

  $ sudo apt-get install default-jdk
  $ echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/  apt/$ sources.list.d/sbt.list$   
  $ sudo apt-key adv --keys$ erve  r hkp://keyserver.ubuntu.com:80 --rec  v $   642AC823$   
  $ sudo apt-get update
  $ sudo apt-get install sbt

install verilator, optional, which will be auto installed when running simulation in rocket-chip/emulator

  $ sudo apt-get install git make autoconf g++ flex bison
  $ git clone http://git.veripool.org/git/verilator
  $ git pull
  $ git checkout v4.016
  $ unset VERILATOR_ROOT
  $ autoconf
  $ ./configure
  $ make
  $ sudo make install

copy and apply the patch to rocket-chip

  $ cd rocket_chip_vpu
  $ cp 0001-feat-integrate-VPU-which-is-based-on-0.8-release-SPE.patch /path/to/clone/rocket-chip
  $ cd /path/to/clone/rocket-chip
  $ git am 0001-feat-integrate-VPU-which-is-based-on-0.8-release-SPE.patch

make verilog

first copy vpu folder to rocket-chip

  $ cp -R vpu /path/to/clone/rocket-chip

then make verilog

  $ cd /patch/to/clone/rocket-chip/vsim
  $ make verilog CONFIG=VPUConfig

compile VPU only (optional)

VPU depends on hardfloat repo.
To compile VPU, there are three ways to supply source files.

  • the first way is to copy all scala files to vpu/src/main/scala/hardfloat
  $ cd vpu
  $ mkdir -p src/scala/main/hardfloat
  $ cp /path/to/clone/hardfloat/src/main/scala/* src/scala/main/hardfloat
  $ make verilog
  • the second way is to depend on remote repo, which is writen in build.sbt
  $ cd vpu
  $ make verilog
  • the last way is to place hardfloat repo in rocket_chip_vpu/vpu
  $ git clone https://github.com/ucb-bar/berkeley-hardfloat.git
  $ sed -i '62,63s/^\/\///g' vpu/build.sbt
  $ cd vpu
  $ make verilog

About

No description or website provided.

Topics

Resources

License

BSD-3-Clause, Apache-2.0 licenses found

Licenses found

BSD-3-Clause
LICENSE.SZU
Apache-2.0
LICENSE.UCTECHIP

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy