Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Introduction to RISC-V Interrupts
Rating: 3.3 out of 5(3 ratings)
16 students
Last updated 9/2024
English

What you'll learn

  • Understand privilege levels, traps and control and status registers in RISC-V
  • Platform Level Interrupt Controller Specification for RISC-V
  • Sample implementation of PLIC module on RISC-V based FE310 SoC
  • Writing assembly code, compiling, linking with GNU tools and debugging with OpenOCD and GDB
  • Demonstration of interrupt generation & handling in RISC-V assembly

Course content

6 sections15 lectures2h 4m total length
  • Course Overview2:18

Requirements

  • Brief knowledge on any processor like interrupts, interrupt priority & interrupt handling would help

Description

Interrupts in RISC-V are governed by standards and specification. Each RISC-V core's interrupt generation and handling process should be compliant to the specification.


This course discusses the following:

a. Privilege Levels in RISC-V

b. Traps in RISC-V

c. Platform Level Interrupt Controller (PLIC) Specification

d. Compares PLIC Implementation on FE310 SoC to Spec

e. Control and Status Registers (CSRs)

f. Instructions to read and write CSRs in RISC-V

g. Configuring GPIO peripheral in FE310 SoC

h. Configuring PLIC to allow GPIO interrupt

i. Configure MIE & MSTATUS CSRs on the core  to enable machine mode interrupts and machine mode external interrupts

j. Installation of GNU tools (compilers, OpenOCD)

k. Test application in assembly to blink blue LED on Hifive1-Rev B board.


Students who enrol would be taken through a journey starting from basics of what are interrupts, exceptions and traps in RISC-V, followed by PLIC standard discussing the parameters, how to configure those parameters on PLIC to generate interrupt and claiming and completing the interrupt handling process and finally on writing an test application to blink LED.


The major exercise and focus on this course is on writing RISC-V assembly code, assembling & linking with GNU tools, generating ELF, and programming it on Hifive1-RevB board to blink blue LED on board.


Update on Sept 5, 2024: Corrected the memory map address for Context1 Threshold, Claim and enable registers and attached as pdf for Section 3, Lecture 7. The PLIC specification pdf too is attached for reference.


Who this course is for:

  • Anyone interested in understanding the Platform Level Interrupt Controller Standard in RISC-V