Inside an Open-Source Processor: An Introduction to RISC-V

Inside an Open-Source Processor

An Introduction to RISC-V

By Monte Dalrymple

Publisher Information

This is an Elektor Publication. Elektor is the media brand of Elektor International Media B.V.

PO Box 11, NL-6114-ZG Susteren, The Netherlands

Copyright © 2021: Elektor International Media B.V.

ISBN Print: 978-3-89576-443-1

ISBN Ebook: 978-3-89576-444-8

For more information, visit www.elektor.com.

Table of Contents

  • Chapter 1: Introduction

    • 1.1 Goals of This Book
    • 1.2 Target Audience
    • 1.3 Typeface Conventions
    • 1.4 What to Expect
  • Chapter 2: RISC-V Instruction Set Architecture

    • 2.1 Overview
    • 2.1.1 Instruction Formats
    • 2.1.2 Immediate Data Instruction Positions
    • 2.1.3 Register Set
    • 2.1.4 Standard Extensions
    • 2.1.5 Opcode Table Conventions
    • 2.2 Base Integer Instruction Set
    • 2.3 Control and Status Register Extension
    • 2.4 Integer Multiplication and Division Extension
    • 2.5 Atomic Instruction Extension
    • 2.6 Single-Precision Floating-Point Extension
    • 2.7 Double-Precision Floating-Point Extension
    • 2.8 Quad-Precision Floating-Point Extension
    • 2.9 Compressed (16-bit opcode) Extension
    • 2.10 Bit Manipulation Extension
    • 2.11 External Debug Support
  • Chapter 3: Privileged Architecture

    • 3.1 Privilege Levels
    • 3.2 Control and Status Registers
    • 3.3 Physical Memory Attributes
    • 3.4 Physical Memory Protection
    • 3.5 Supervisor Address Translation
    • 3.6 Hypervisor Extension
    • 3.7 Privileged Instructions
    • 3.8 User-Level Interrupts Extension
  • Chapter 4: Initial Design Work

    • 4.1 External Bus Interface
    • 4.2 Instruction Timing
    • 4.3 Load from Memory Timing
    • 4.4 Store to Memory Timing
    • 4.5 Atomic Memory Operation Timing
    • 4.6 CSR Interface and Timing
    • 4.7 Wait for Interrupt Timing
    • 4.8 Breakpoint Timing
    • 4.9 Reset Timing
  • Chapter 5: Organizing the Design

    • 5.1 Verilog Coding Standards
    • 5.2 Logic Synthesis Options
    • 5.3 Instruction Decode Macro Definitions
    • 5.4 Standard CSR Address Definitions
    • 5.5 Exception Code Definitions
    • 5.6 Top-level Module Connections
  • Chapter 6: Inside the CPU

    • 6.1 Start-up and Pipeline Control
    • 6.2 Stage 1: Memory Address Generation
    • 6.3 Load/Store/AMO Logic
    • 6.4 Stage 2: Memory Access
    • 6.5 Stage 3: Pre-Decode
    • 6.6 Stage 4: Register Read and Late Decode
    • 6.7 Stage 5: Execute
    • 6.8 CSR Interface
    • 6.9 Stage 6: Register Write
  • Chapter 7: Inside the Control and Status Registers

    • 7.1 Valid Address Check
    • 7.2 Control/Status Registers
    • 7.3 Debug Control/Status Registers
    • 7.4 CSR Read Data
    • 7.5 Cycle Counter
    • 7.6 Instructions-Retired Counter
  • Chapter 8: Inside the Interrupts

    • 8.1 Interrupt-Pending
    • 8.2 Interrupt Outputs
    • 8.3 Local Interrupts
  • Chapter 9: Hardware-Specific Modules

    • 9.1 Register File Module
    • 9.2 Adder Module
    • 9.3 Subtractor Module
    • 9.4 Incrementer Module
    • 9.5 Counter Module
  • Chapter 10: Putting Everything Together

  • Chapter 11: Design Verification Testbench

    • 11.1 Timing Generator
    • 11.2 Processor Memory
    • 11.3 Wait State Generation
    • 11.4 Instantiate the Design
    • 11.5 Error Log
    • 11.6 End-of-Pattern Detect
    • 11.7 Test Tasks
    • 11.8 Test Patterns
  • Chapter 12: A RISC-V Microcontroller

    • 12.1 Microcontroller Overview
    • 12.2 Memory Module
    • 12.3 Serial Port
  • Chapter 13: Alchrity FPGA Development System

    • 13.1 FPGA Development Boards
    • 13.2 Element Boards
    • 13.3 Bank Signal Assignments
  • Chapter 14: Example FPGA Implementation

    • 14.1 Example Hardware
    • 14.2 Example Software
    • 14.3 Memory Initialization
    • 14.4 FPGA Project Setup
    • 14.5 FPGA Results
    • 14.6 Hardware Programming
  • Chapter 15: What Now?

    • 15.1 Hardware Projects
    • 15.2 Software Projects
  • Appendix A: Resources

    • Official RISC-V
    • Alchrity FPGA Development
    • RISC-V Programming
    • YRV Verilog Code
  • Index

PDF preview unavailable. Download the PDF instead.

XznsElrw7j5GYc9njYm7zBum7PbVxrxY Adobe InDesign 16.3 (Macintosh) Adobe PDF Library 15.0

Related Documents

Preview RISC-V Assembly Language Programming: Using the ESP32-C3 and QEMU
A comprehensive guide to RISC-V assembly language programming, focusing on the ESP32-C3 microcontroller and the QEMU emulator. Covers architecture, instructions, calling conventions, flow control, memory addressing, floating-point operations, portability, and debugging.
Preview MSP430 Microcontroller Essentials: Architecture, Programming and Applications
A comprehensive guide to the MSP430 microcontroller family, covering its architecture, programming techniques, and practical applications. This book explores various MSP430 devices, development tools like Code Composer Studio and Energia, and includes numerous examples for GPIO, ADC, Timers, USCI, and more, along with project-based applications.
Preview Hardware Design with FPGA: Table of Contents
Table of contents for a technical guide on hardware design with FPGAs, covering digital systems, circuit technology, development processes, FPGA building blocks, IP cores, and a design example.
Preview Elektor Special: Microcontroller Projects and Know-How
A collection of articles from Elektor Special focusing on microcontroller projects, including an open-source Android oscilloscope, HDMI to VGA conversion, smartphone-controlled embedded systems, USB port monitoring, dual USB power supply, and wireless charging development. Also covers embedded CPU modules, FRAM memory, ARM microcontrollers, and gesture control.
Preview Technisches Konstruieren mit OpenSCAD: A Comprehensive Guide to 3D Modeling
Explore the capabilities of OpenSCAD for creating 3D models for 3D printing, CNC milling, process communication, and documentation. This guide covers installation, interface usage, parametric design, and advanced modeling techniques.
Preview KiCad wie ein Profi: A Practical Guide to Learning the World's Most Popular Open-Source Tool for PCB Design
This comprehensive guide, 'KiCad wie ein Profi,' offers a practical approach to mastering KiCad, the leading open-source software for Printed Circuit Board (PCB) design. It covers everything from basic PCB concepts and the design process to detailed tutorials on using Eeschema for schematic design and Pcbnew for layout. The book includes step-by-step instructions for various projects, such as designing a simple breadboard power supply and a Raspberry Pi HAT, along with advanced topics like Gerber file generation, version control with Git, and creating custom symbols and footprints. Aimed at both beginners and experienced users, this guide provides the knowledge needed to efficiently design PCBs using KiCad.
Preview Table of Contents: Android Open Accessory and Arduino Projects Guide
Comprehensive table of contents for a guide on using Android Open Accessory (AOA) with Arduino, covering hardware setup, data transmission, development environments, and various electronic projects.
Preview Mastering FPGA Chip Design: For Speed, Area, Power, and Reliability
A comprehensive guide to mastering FPGA chip design, covering topics from digital logic design and history of computer chips to advanced concepts like timing closure, placement, floorplanning, and design for reliability. The book includes practical examples and explanations for Verilog and VHDL.