• Stars
    star
    251
  • Rank 161,862 (Top 4 %)
  • Language SystemVerilog
  • License
    Other
  • Created almost 4 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CORE-V Wally is a configurable RISC-V Processor associated with RISC-V System-on-Chip Design textbook. Contains a 5-stage pipeline, support for A, B, C, D, F, M and Q extensions, and optional caches, BP, FPU, VM/MMU, AHB, RAMs, and peripherals.

core-v-wally

Wally is a 5-stage pipelined processor configurable to support all the standard RISC-V options, incluidng RV32/64, A, C, F, D, Q, M, and Zb* extensions, virtual memory, PMP, and the various privileged modes and CSRs. It provides optional caches, branch prediction, and standard RISC-V peripherals (CLINT, PLIC, UART, GPIO). Wally is written in SystemVerilog. It passes the RISC-V Arch Tests and boots Linux on an FPGA. Configurations range from a minimal RV32E core to a fully featured RV64GC application processor.

Wally block diagram

Wally is described in an upcoming textbook, RISC-V System-on-Chip Design, by Harris, Stine, Thompson, and Harris. Users should follow the setup instructions below. A system administrator must install CAD tools using the directions further down.

Verification

Wally is presently at Technology Readiness Level 4, passing the RISC-V compatibility test suite and custom tests, and booting Linux in simulation and on an FPGA. See the Test Plan for details.

New User Setup

New users may wish to do the following setup to access the server via a GUI and use a text editor.

Git started with Git configuration and authentication: B.1 (replace with your name and email)
	$ git config --global user.name "Ben Bitdiddle"
	$ git config --global user.email "[email protected]"
	$ git config --global pull.rebase false
Optional: Download and install x2go - A.1.1
Optional: Download and install VSCode - A.4.2
Optional: Make sure you can log into your server via x2go and via a terminal
	Terminal on Mac, cmd on Windows, xterm on Linux
	See A.1 about ssh -Y login from a terminal

Then clone the repo, source setup, make the tests and run regression

If you don't already have a Github account, create one
In a web browser, visit https://github.com/openhwgroup/cvw
In the upper right part of the screen, click on Fork
Create a fork, choosing the owner as your github account and the repository as cvw.

On the Linux computer where you will be working, log in

Clone your fork of the repo and run the setup script. Change to your github id.

$ cd
$ git clone --recurse-submodules https://github.com/<yourgithubid>/cvw
$ cd cvw
$ git remote add upstream https://github.com/openhwgroup/cvw
$ source ./setup.sh

Add the following lines to your .bashrc or .bash_profile to run the setup script each time you log in.

if [ -f ~/cvw/setup.sh ]; then
	source ~/cvw/setup.sh
fi

Edit setup.sh and change the following lines to point to the path and license server for your Siemens Questa and Synopsys Design Compiler installation and license server. If you only have Questa, you can still simulate but cannot run logic synthesis.

export [email protected]                # Change this to your Siemens license server
export [email protected]                # Change this to your Synopsys license server
export QUESTAPATH=/cad/mentor/questa_sim-2021.2_1/questasim/bin     # Change this for your path to Questa
export SNPSPATH=/cad/synopsys/SYN/bin                               # Change this for your path to Design Compiler

If the tools are not yet installed on your server, follow the Toolchain Installation instructions in the section below.

Build the tests and run a regression simulation with Questa to prove everything is installed. Building tests will take a while.

$ make
$ cd sim
$ ./regression-wally       (depends on having Questa installed)

Toolchain Installation (Sys Admin)

This section describes the open source toolchain installation. The current version of the toolchain has been tested on Ubuntu and Red Hat/Rocky 8 Linux. Ubuntu works more smoothly and is recommended unless you have a compelling need for RedHat.

Ubuntu users can install the tools by running

$ sudo $WALLY/bin/wally-tool-chain-install.sh

See wally-tool-chain-install.sh for a detailed description of each component, or to issue the commands one at a time to install on the command line.

Installing EDA Tools

Electronic Design Automation (EDA) tools are vital to implementations of System on Chip architectures as well as validating different designs. Open-source and commercial tools exist for multiple strategies and although the one can spend a lifetime using combinations of different tools, only a small subset of tools is utilized for this text. The tools are chosen because of their ease in access as well as their repeatability for accomplishing many of the tasks utilized to design Wally. It is anticipated that additional tools may be documented later after this is text is published to improve use and access.

Siemens Quest is the primary tool utilized for simulating and validating Wally. For logic synthesis, you will need Synopsys Design Compiler. Questa and Design Compiler are commercial tools that require an educational or commercial license.

Note: Some EDA tools utilize LM_LICENSE_FILE for their environmental variable to point to their license server. Some operating systems may also utilize MGLS_LICENSE_FILE instead, therefore, it is important to read the user manual on the preferred environmental variable required to point to a user’s license file. Although there are different mechanisms to allow licenses to work, many companies commonly utilize the FlexLM (i.e., Flex-enabled) license server manager that runs off a node locked license.

Although most EDA tools are Linux-friendly, they tend to have issues when not installed on recommended OS flavors. Both Red Hat Enterprise Linux and SUSE Linux products typically tend to be recommended for installing commercial-based EDA tools and are recommended for utilizing complex simulation and architecture exploration. Questa can also be installed on Microsoft Windows as well as Mac OS with a Virtual Machine such as Parallels.

Siemens Questa

Siemens Questa simulates behavioral, RTL and gate-level HDL. To install Siemens Questa first go to a web browser and navigate to https://eda.sw.siemens.com/en-US/ic/questa/simulation/advanced-simulator/. Click Sign In and log in with your credentials and the product can easily be downloaded and installed. Some Windows-based installations also require gcc libraries that are typically provided as a compressed zip download through Siemens.

Synopsys Design Compiler (DC)

Many commercial synthesis and place and route tools require a common installer. These installers are provided by the EDA vendor and Synopsys has one called Synopsys Installer. To use Synopsys Installer, you will need to acquire a license through Synopsys that is typically Called Synopsys Common Licensing (SCL). Both the Synopsys Installer, license key file, and Design Compiler can all be downloaded through Synopsys Solvnet. First open a web browser, log into Synsopsy Solvnet, and download the installer and Design Compiler installation files. Then, install the Installer

$ firefox &

Navigate to https://solvnet.synopsys.com Log in with your institution’s username and password Click on Downloads, then scroll down to Synopsys Installer Select the latest version (currently 5.4). Click Download Here, agree, Click on SynopsysInstaller_v5.4.run Return to downloads and also get Design Compiler (synthesis) latest version, and any others you want. Click on all parts and the .spf file, then click Download Files near the top move the SynopsysIntaller into /cad/synopsys/Installer_5.4 with 755 permission for cad, move other files into /cad/synopsys/downloads and work as user cad from here on

$ cd /cad/synopsys/installer_5.4
$ ./SynopsysInstaller_v5.4.run
Accept default installation directory
$ ./installer
Enter source path as /cad/synopsys/downloads, and installation path as /cad/synopsys
When prompted, enter your site ID
Follow prompts

Installer can be utilized in graphical or text-based modes. It is far easier to use the text-based installation tool. To install DC, navigate to the location where your downloaded DC files are and type installer. You should be prompted with questions related to where you wish to have your files installed.

The Synopsys Installer automatically installs all downloaded product files into a single top-level target directory. You do not need to specify the installation directory for each product. For example, if you specify /import/programs/synopsys as the target directory, your installation directory structure might look like this after installation:

/import/programs/synopsys/syn/S-2021.06-SP1

Note: Although most parts of Wally, including the software used in this chapter and Questa simulation, will work on most modern Linux platforms, as of 2022, the Synopsys CAD tools for SoC design are only supported on RedHat Enterprise Linux 7.4 or 8 or SUSE Linux Enterprise Server (SLES) 12 or 15. Moreover, the RISC-V formal specification (sail-riscv) does not build gracefully on RHEL7.

The Verilog simulation has been tested with Siemens Questa/ModelSim. This package is available to universities worldwide as part of the Design Verification Bundle through the Siemens Academic Partner Program members for $990/year.

If you want to implement your own version of the chip, your tool and license complexity rises significantly. Logic synthesis uses Synopsys Design Compiler. Placement and routing uses Cadence Innovus. Both Synopsys and Cadence offer their tools at a steep discount to their university program members, but the cost is still several thousand dollars per year. Most research universities with integrated circuit design programs have Siemens, Synopsys, and Cadence licenses. You also need a process design kit (PDK) for a specific integrated circuit technology and its libraries. The open-source Google Skywater 130 nm PDK is sufficient to synthesize the core but lacks memories. Google presently funds some fabrication runs for universities. IMEC and Muse Semiconductor offers full access to multiproject wafer fabrication on the TSMC 28 nm process including logic, I/O, and memory libraries; this involves three non-disclosure agreements. Fabrication costs on the order of $10,000 for a batch of 1 mm2 chips.

Startups can expect to spend more than $1 million on CAD tools to get a chip to market. Commercial CAD tools are not realistically available to individuals without a university or company connection.

More Repositories

1

cva6

The CORE-V CVA6 is an Application class 6-stage RISC-V CPU capable of booting Linux
Assembly
2,230
star
2

cv32e40p

CV32E40P is an in-order 4-stage RISC-V RV32IMFCXpulp CPU based on RI5CY from PULP-Platform
SystemVerilog
941
star
3

core-v-verif

Functional verification project for the CORE-V family of RISC-V cores.
Assembly
430
star
4

cvfpu

Parametric floating-point unit with support for standard RISC-V formats and operations as well as transprecision formats.
SystemVerilog
426
star
5

force-riscv

Instruction Set Generator initially contributed by Futurewei
C++
259
star
6

cv32e40x

4 stage, in-order, compute RISC-V core based on the CV32E40P
SystemVerilog
210
star
7

core-v-cores

CORE-V Family of RISC-V Cores
202
star
8

programs

Documentation for the OpenHW Group's set of CORE-V RISC-V cores
HTML
187
star
9

core-v-mcu

This is the CORE-V MCU project, hosting CORE-V's embedded-class cores.
SystemVerilog
165
star
10

cv32e40s

4 stage, in-order, secure RISC-V core based on the CV32E40P
SystemVerilog
128
star
11

cva6-sdk

CVA6 SDK containing RISC-V tools and Buildroot
Makefile
59
star
12

core-v-xif

RISC-V eXtension interface that provides a generalized framework suitable to implement custom coprocessors and ISA extensions
SystemVerilog
59
star
13

cva5

The CORE-V CVA5 is an Application class 5-stage RISC-V CPU specifically targetting FPGA implementations.
SystemVerilog
59
star
14

cv-hpdcache

RTL sources of the High-Performance L1 Dcache (HPDcache) for OpenHW CV cores
SystemVerilog
51
star
15

cv32e41p

4 stage, in-order, secure RISC-V core based on the CV32E40P with Zfinx and Zce ISA extentions
SystemVerilog
26
star
16

corev-gcc

C++
22
star
17

core-v-mcu-uvm

CORE-V MCU UVM Environment and Test Bench
SystemVerilog
17
star
18

openhwgroup.org

OpenHW Group is a not-for-profit, global organization driven by its members and individual contributors where hardware and software designers collaborate in the development of open-source cores, related IP, tools and software. OpenHW provides an infrastructure for hosting high quality open-source HW developments in line with industry best practices.
HTML
16
star
19

core-v-sw

Main Repo for the OpenHW Group Software Task Group
15
star
20

riscv_vm

Instructions to import Ubuntu guest Virtual Machine for RISC-V development for the VEGA board
Shell
14
star
21

core-v-sdk

Java
14
star
22

core-v-mcu-devkit

This is the CORE-V MCU DevKit project, hosting the open-source artifacts for the CORE-V MCU Development Kit.
HTML
13
star
23

corev-llvm-project

12
star
24

tristan-isolde-unified-access-page

Unified Access Page for the TRISTAN project
HTML
11
star
25

riscv-ovpsim-corev

11
star
26

cv32e40x-dv

CV32E40X Design-Verification environment
Assembly
11
star
27

corev-binutils-gdb

C
9
star
28

core-v-mcu-cli-test

Eclipse/FreeRTOS/core-v-mcu example program
C
9
star
29

core-v-ide-cdt

Java
9
star
30

cva6-platform

CVA6-platform is a multicore CVA6 with CV-MESH software and regression platform
9
star
31

advanced-riscv-verification-methodologies

Advanced Verification Methodologies for RISC-V and related IP
SystemVerilog
7
star
32

cv-hpdcache-verif

Verification environment for the OpenHW Group's CORE-V High Performance Data Cache controller.
SystemVerilog
5
star
33

obi

Repository that maintain the OpenBus Interface spec
4
star
34

core-v-freertos

C
4
star
35

cv-mesh

3
star
36

u-boot

Unofficial development fork of U-Boot
C
2
star
37

cvw-arch-verif

The purpose of the repo is to support CORE-V Wally architectural verification
SystemVerilog
2
star
38

core-v-freertos-kernel

C
1
star
39

downloads.openhwgroup.org

downloads.openhwgroup.org
SCSS
1
star
40

osdforum.org

The Open Source Developer Forum is a workshop that brings open source software and hardware (chips, boards and systems) developers together to collaborate and learn.
HTML
1
star