Untethering the RISC-V Rocket Chip -- A code release from the - - PowerPoint PPT Presentation

untethering the risc v rocket chip
SMART_READER_LITE
LIVE PREVIEW

Untethering the RISC-V Rocket Chip -- A code release from the - - PowerPoint PPT Presentation

Untethering the RISC-V Rocket Chip -- A code release from the lowRISC project Wei Song Computer Laboratory, University of Cambridge 06/01/2015 Background Rocket-chip An open-source SoC from UC Berkeley Rocket core RISC-V 64 ISA


slide-1
SLIDE 1

Untethering the RISC-V Rocket Chip

Wei Song

Computer Laboratory, University of Cambridge 06/01/2015

  • - A code release from the lowRISC project
slide-2
SLIDE 2

Background

  • Rocket-chip

– An open-source SoC from UC Berkeley – Rocket core

  • RISC-V 64 ISA
  • 5/6 stage single-issue in-order processor
  • lowRISC

– An opensource SoC provider

2

slide-3
SLIDE 3

Rocket Chip

Rocket Core L2 & Coherence Manager L2 & Coherence Manager I$ D$

Rocket Tile

L2 & Coherence Manager Rocket Core I$ D$

Rocket Tile

Rocket Core I$ D$

Rocket Tile

Arbiter

Memory Controller

Host Interface TileLink/AXI AXI/MemIO AXI Bus ARM

UART SD EtherNet

Cached TileLink Uncached TileLink AXI MemIO L2 Bus

Issues:

  • 1. Must work with a companion core (ARM).
  • 2. No MMIO (now has).
  • 3. No direct bootload (must through ARM).

3

slide-4
SLIDE 4

Untethered Rocket Chip

4 Rocket Core L2 & Coherence Manager L2 & Coherence Manager I$ D$

Rocket Tile

L2 & Coherence Manager Rocket Core I$ D$

Rocket Tile

Rocket Core I$ D$

Rocket Tile

Arbiter DDR3 DRAM TileLink/NASTI NASTI Cached TileLink Uncached TileLink NASTI L2 Cache Bus On-FPGA Boot Ram IO Bus NASTI-Lite UART SD TileLink/NASTI-Lite Chisel SystemVerilog Uncached TileLink for MMIO NASTI/NASTI-Lite NASTI-Lite

Features: MMIO UART, SD, DDR3, Boot RAM On-chip NASTI interconnect in SystemVerilog

slide-5
SLIDE 5

I/O and Memory Map

  • I/O map

– 4 I/O sections – CSR: io_base, io_mask, io_update hit = (addr & ~io_mask) == io_base

  • Memory map

– 4 memory sections – CSR: mem_base, mem_mask, mem_phy, mem_update hit = (addr & ~mem_mask) == mem_base addr’ = (addr & mem_mask) | mem_phy

5

slide-6
SLIDE 6

MMIO

6

data meta mshrs mshr data meta dtlb Arbiter Arbiter

mshrs.replay

Arbiter

s1_req

s1_req.addr

= = = =

s1_tag_eq_way s1_addr read read resp resp

s2_req

amoalu

write write

mshrs.request mshrs.meta_write

io.req io.grant cpu.req Stage 1 Stage 2 Stage 3 Stage 4

vpn ppn

rhs lhs

  • ut

s1_data s2_data s2_hit

cpu.resp Arb

s1_addr

ioaddr

s2_req.addr addr io

iomshr

request iomshr.replay io_data s1_io_data s2_io_data

s2_io_replay

io_data replay

mem.req mem.grant

Features: Uncached (bypass L1 & L2) I/O map Program order

slide-7
SLIDE 7

Bootloader

  • Two stage bootloaders

– First stage bootloader

  • Copy the second stage bootloader to DDR RAM
  • Uncached copy (mapping DDR RAM to IO)
  • Re-map DDR RAM to memory address 0
  • Reset Rocket

– Second stage bootloader

  • Revised Berkeley bootloader (BBL)
  • Driving I/O devices
  • Start multi-core, VM support
  • Load and boot RISC-V Linux in virtual address space

7

slide-8
SLIDE 8

A Code Release

  • The untethered Rocket chip has been released.

– A tutorial: http://www.lowrisc.org/docs/untether-v0.2/ – Code repo https://github.com/lowRISC/lowrisc-chip

  • Key Features

– FPGA demo with RISC-V Linux

  • Xilinx Kintex-7 KC705 suite (developing system)
  • Digilent NEXYS4-DDR board (low-end board) 320 USD

– Up-to-date Rocket code from Berkeley

  • Merged all updates up to October 2015.

– Nearly free development environment

  • Replace VCS with Verilator/ISim
  • Voucher or WebPACK Vivado license

8

slide-9
SLIDE 9

Summary of the Code Release

  • Remove host target interface
  • Add reconfigurable I/O and memory maps
  • Add memory mapped IO
  • Rewrite TileLink/NASTI interfaces
  • Provide on-chip NASTI interconnects
  • Integrate DDR2/3 controller, SD (FAT32), UART
  • 2 bootloader
  • New design environment using free tools
  • New make files and scripts
  • Tagged memory to be re-integrated
  • No support for Zedboard

http://www.lowrisc.org/docs/untether-v0.2/release/

9

slide-10
SLIDE 10

Future Works

  • Looking for help to remove HTIF in RISC-V Linux
  • Re-integrate tagged memory
  • Add an interrupt controller
  • Add trace debugging (with help from Stefan

Wallentowitz)

  • Add run-control debugger (SiFive)
  • Platform spec
  • For more information

Visit http://www.lowrisc.org/

10