untethering the risc v rocket chip
play

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


  1. Untethering the RISC-V Rocket Chip -- A code release from the lowRISC project Wei Song Computer Laboratory, University of Cambridge 06/01/2015

  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

  3. Rocket Chip Rocket Tile Rocket Tile Rocket Tile UART Rocket Rocket Rocket Core Core Core Host ARM SD Interface I$ D$ I$ D$ I$ D$ EtherNet L2 Bus Cached TileLink L2 & L2 & L2 & Uncached TileLink Coherence Coherence Coherence Manager Manager Manager AXI MemIO Arbiter Issues: TileLink/AXI 1. Must work with a companion core (ARM). AXI Bus 2. No MMIO (now has). 3. No direct bootload (must through ARM). AXI/MemIO Memory Controller 3

  4. Untethered Rocket Chip Rocket Tile Rocket Tile Rocket Tile Cached TileLink Uncached TileLink Rocket Rocket Rocket Core Core Core NASTI NASTI-Lite I$ D$ I$ D$ I$ D$ Uncached TileLink for MMIO L2 Cache Bus IO Bus L2 & L2 & L2 & Chisel TileLink/NASTI-Lite Coherence Coherence Coherence Manager Manager Manager SystemVerilog NASTI-Lite Arbiter TileLink/NASTI UART SD NASTI Features: NASTI/NASTI-Lite MMIO On-FPGA UART, SD, DDR3, Boot RAM DDR3 DRAM Boot Ram On-chip NASTI interconnect in SystemVerilog 4

  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

  6. MMIO mem.grant io.grant mem.req io.req Features: Uncached (bypass L1 & L2) mshrs mshr I/O map mshrs.meta_write Program order mshrs.request mshrs.replay iomshr iomshr.replay replay io_data io_data s1_io_data request s2_hit s2_req ioaddr Arbiter s1_req addr io s2_req.addr s1_req.addr dtlb s1_addr s2_io_replay vpn s2_io_data meta meta ppn Arbiter s1_addr read resp write cpu.req = = = = data amoalu data Arb s1_tag_eq_way write Arbiter rhs out s2_data read resp lhs s1_data Stage 1 Stage 2 Stage 4 Stage 3 cpu.resp 6

  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

  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

  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

  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

Recommend


More recommend