Coder Social home page Coder Social logo

girishchukka / swerv_eh1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from westerndigitalcorporation/swerv_eh1

0.0 1.0 0.0 1.91 MB

A directory of Western Digital’s RISC-V SweRV Cores

License: Apache License 2.0

Perl 11.46% SystemVerilog 86.13% Verilog 1.86% Objective-C 0.17% C++ 0.18% Makefile 0.19%

swerv_eh1's Introduction

SweRV RISC-V core from Western Digital

This repository contains the SweRV core design RTL

License

By contributing to this project, you agree that your contribution is governed by Apache-2.0.
Files under the tools directory may be available under a different license. Please review individual file for details.

Directory Structure

├── configs                 # Configurations Dir
│   └── snapshots           # Where generated configuration files are created
├── design                  # Design root dir
│   ├── dbg                 #   Debugger
│   ├── dec                 #   Decode, Registers and Exceptions
│   ├── dmi                 #   DMI block
│   ├── exu                 #   EXU (ALU/MUL/DIV)
│   ├── ifu                 #   Fetch & Branch Prediction
│   ├── include             
│   ├── lib
│   └── lsu                 #   Load/Store
├── docs
├── tools                   # Scripts/Makefiles

Dependencies

  • Verilator (3.926 or later) must be installed on the system
  • If addding/reoving instructions, espresso must be installed (used by tools/coredecode)

Quickstart guide

  1. Clone the repository
  2. Setup RV_ROOT to point to the path in your local filesystem
  3. Determine your configuration {optional}
  4. Run make with tools/Makefile

Configurations

SweRV can be configured by running the $RV_ROOT/configs/swerv.config script:

% $RV_ROOT/configs/swerv.config -h for detailed help options

For example to build with a DCCM of size 64 :

% $RV_ROOT/configs/swerv.config -dccm_size=64

This will update the default snapshot in $RV_ROOT/configs/snapshots/default/ with parameters for a 64K DCCM.

Add -snapshot=dccm64, for example, if you wish to name your build snapshot dccm64 and refer to it during the build.

This script derives the following consistent set of include files :

$RV_ROOT/configs/snapshots/default
├── common_defines.vh                       # `defines for testbench or design
├── defines.h                               # #defines for C/assembly headers
├── pd_defines.vh                           # `defines for physical design
├── perl_configs.pl                         # Perl %configs hash for scripting
├── pic_ctrl_verilator_unroll.sv            # Unrolled verilog based on PIC size
├── pic_map_auto.h                          # PIC memory map based on configure size
└── whisper.json                            # JSON file for swerv-iss

Building a model

  1. Set the RV_ROOT environment variable to the root of the SweRV directory structure

    RV_ROOT = /path/to/swerv
    export RV_ROOT

  2. Create your configuration

    (Skip if default is sufficient)
    (Name your snapshot to distinguish it from the default. Without an explicit name, it will update/override the default snapshot)
    $RV_ROOT/configs/swerv.config [configuration options..] -snapshot=mybuild

    Snapshots are placed in $RV_ROOT/configs/snapshots/<snapshot name>/ directory

  3. Build with verilator:

    make -f $RV_ROOT/tools/Makefile verilator [snapshot=name]

This will create and populate the verilator obj_dir/ in the current work dir.

Other targets supported:

vcs  (Synopsys)  
irun (Cadence)  

swerv_eh1's People

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.