Skip to content

foss-for-synopsys-dwc-arc-processors/RVDS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RISC-V Unified Interrupt Architecture Demo

This example application demonstrates the flexibility and efficiency of Unified Interrupt Architecture based on RISC-V AIA standard. The goal is to improve the standard components by enabling advanced interrupt optimization technics such as late preemption and tail chaining.

Directory Tree

  / apps
    / hello                     hello world demo (environment check)
      - main.c                    C source file
      - linker.md                 linker script
      - Makefile                  build script
    / uclic                     uCLIC software driven late preemption and tail chaining
      - main.c                    C source file
      - linker.md                 linker script
      - Makefile                  build script
  / slib                        Supply library
    / arch                        riscv-vp (simulation) platform defines
      - crt0.S                    startup and C run-time code
      - printf.*                  compact printf()
      - semihost.*                semihost interface services
      - uclic.*                   UIA uCLIC driver  
      - utvec.S                   unified trap wrapper  

Host platform setup

The RISC-V Virtual Platform requires host computer with fresh Ubuntu 22.04 installation and working connection to the internet. Other host platforms are not yet verified/supported.

Before test applications can be executed, the following preparation steps are required on host PC:

  • Mandatory packages installation
$ sudo apt-get install git autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev libncurses-dev libgoogle-perftools-dev libboost-iostreams-dev libboost-program-options-dev libboost-log-dev
  • Create work folder
$ mkdir ~/Projects
  • Cloning required repositories
$ cd ~/Projects
$ git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git
$ git clone --branch rvvp-uclic-v0.1.0 --single-branch https://github.com/foss-for-synopsys-dwc-arc-processors/RVVP
$ git clone --branch uia-demo --single-branch https://github.com/foss-for-synopsys-dwc-arc-processors/RVDS
  • Build the RISC-V GNU toolchain
$ sudo mkdir /opt/riscv-gnu-toolchain
$ sudo chmod 777 /opt/riscv-gnu-toolchain
$ git clone  https://github.com/riscv-collab/riscv-gnu-toolchain.git
$ cd ~/Projects/riscv-gnu-toolchain
$ ./configure --prefix=/opt/riscv-gnu-toolchain --with-arch=rv32i --with-abi=ilp32
$ make
  • Build simulation environment
$ mkdir ~/Project/RVVP/vp/build
$ cd ~/Project/RVVP/vp/build
$ cmake ..
$ make

Now the host platform is ready to build and execute the sample applications in RISC-V Virtual Platform environment.

Custom Environment

If custom path/version is used for RISC-V toolchain, then environment variables should be defined to override the default values in demo application's Makefile:

$ export SIM_PATH=custom_path_to_riscv_vp_executable
$ export GNU_PATH=custom_path_to_riscv_gnu_toolchain
$ export LIB_PATH=custom_path_to_riscv_gcc_library

Sample application

Each example application consists of

  • application source code
  • simple Makefile capable of build, run and debug the application
  • ReadMe file

See the ReadMe files in each application folder for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published