Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
Hardware

/

Semiconductor

Learning RISC-V Architecture Through Debugging - Part 3

Core concepts and practical tips of RISC-V, the latest open-source based CPU architecture, explained easily and in detail.

32 learners are taking this course

  • austinkim
시스템반도체
임베디드
이론 실습 모두
cpu
cpu-architecture
riscv

What you will learn!

  • I can well answer and explain questions related to RISC-V in technical interviews.

  • You can learn the operating principles of the virtual memory system, memory barrier, and cache, which are core functions that constitute RISC-V.

  • How the RISC-V architecture is utilized in operating system kernels, such as the Linux kernel, can be understood.

  • Bootloader or Linux kernel startup code running on RISC-V can be analyzed.

In the modern systems software industry
The Emerging RISC-V Architecture

Recently, the RISC-V architecture, an open source-based CPU architecture, is on the rise. If you look at IT-related media articles or news, you can immediately see the following:

  • Big tech companies like nVidia, Intel, and Qualcomm are developing RISC-V-based products (chipsets).

  • The number of startup companies designing various chips using RISC-V in Korea is increasing, and the proportion of products developed based on RISC-V devices is increasing.

  • When designing AI semiconductors, RISC-V-based CPU architecture is widely used.

  • 15 billion devices are expected to be RISC-V-based by 2026.

  • In the graduate school (processor design), various studies are being conducted using a toolkit that can design RISC-V CPUs.

Embedded and system software companies are increasingly developing products using RISC-V CPU architectures, so job seekers need to prepare for RISC-V during technical interviews.

Background on creating the lecture

For beginners, the RISC-V architecture is difficult to learn. Here are some reasons why:

  • I don't know what is important among the vast content that makes up RISC-V.

  • I don't know which functions of RISC-V are used in real projects.

  • No matter how hard you read the RISC-V specification document, it is difficult to understand it right away.


  • It is difficult to know what the term itself that describes RISC-V means.


This lecture is the third lecture in the series Learning RISC-V Architecture through Debugging , and covers the contents that will help you go beyond the beginner level and become a highly paid system software developer - explaining the memory system (virtual memory, memory barriers, cache) and Hypervisor Extension functions.

Lecture structure and roadmap for parts 2 and 3

This lecture covers the contents of Part 3, which is the core function of RISC-V, among the entire list of RISC-V lectures.

The full RISC-V architecture lecture can be found in the Roadmap - ' RISC-V Architecture for System Software Developers ' lecture.

Key differentiating points of the lecture

1. Explain the memory system of RISC-V architecture in an easy-to-understand manner.

To become an advanced systems software developer, understanding memory systems is essential. Here's why:

  • In order to properly debug exception problems encountered in real-world projects, you need to have a good understanding of the basic concepts of virtual addresses and MMU.

  • To optimize the performance of your system, you need to understand the capabilities of your memory system.

  • In order to successfully bring up a new project, you also need to have a good understanding of memory-related functions.

However, it is difficult to properly understand the memory system (virtual memory system, memory barrier, cache) by analyzing the RISC-V reference document. This lecture explains the core concepts essential for practice in an easy and clear way.

2. Learning RISC-V memory functions through practical examples

This lecture will explain in detail how the memory-related functions of RISC-V are used through practical examples.

  • Code that sets up page tables in the Linux kernel

  • Example of preventing memory reordering with the fence command

  • Assembly instruction to flush the instruction cache

You can quickly acquire practical experience naturally along with the contents of the RISC-V architecture.

3. Various debugging practice lectures

If you do not directly debug the contents of the memory system, it is difficult to digest the contents learned and it is difficult to apply the contents learned directly to actual development. In this lecture, we will conduct various practical exercises through memory dump debugging practice (Crash Utility, TRACE32).

  • Checking the addresses of functions and global variables (concept of virtual address)

  • Practice converting virtual addresses directly to physical addresses

  • Check the Entry information of the page table (using Crash Utility, TRACE32)

4. Explain RISC-V compared to Arm architecture

Many developers are already familiar with Arm-based SoCs or Arm architecture. This lecture explains the core concepts of RISC-V by comparing them to the Arm architecture to help with understanding.

  • Structure of the virtual memory system

  • Memory barrier method

  • How to control cache

As the educator is the author of a book on Arm architecture (winner of the Best Book Award - National Academy of Sciences of Korea - 2024), he can explain RISC-V better than anyone else by comparing it to the Arm architecture.

Learn about these things 📕

Introduces the main memory features of the RISC-V architecture, and also introduces the core functions that make up the virtual memory system. Explained in an easy-to-understand manner with a big picture.

Introduces the virtual memory map, which is the core of the virtual memory system. It also provides an easy-to-understand explanation of the range of virtual addresses for kernel space and user space.

Describes the satp register that sets up the page table, and explains the concept of virtual addresses in an easy-to-understand way through memory dump debugging practice. (Memory dumps are provided in the lecture materials.)

Explains the concepts of virtual addresses and page tables, and explains the scope of virtual addresses through a real case study.

Describes the structure of a multi-level page table and explains the Page Table Entry (PTE) in detail.

We will explain in detail the process of directly converting virtual addresses into physical addresses through multi-level page tables. We will also practice debugging by converting virtual addresses into physical addresses using the Crash Utility program.

By analyzing the MMU specifications of SiFive's U74 core and P550 core, we explain in detail how the MMU works from a hardware design perspective.


Explains memory reordering and explains in an easy-to-understand way how the fence command works to prevent memory reordering.

Describes the basic structure (form) of the fence command and explains in detail how the fence command works with various options applied.

Explains how the fence command works in a multi-core system environment - Analyzes how the fence command synchronizes with other cores when executed. Also explains the fence command while analyzing example assembly instructions.

We introduce the fence.i command and explain the big picture of the process flow when the fence.i command is executed.

We analyze the fence.i instruction by analyzing various example assembly routines. We analyze the fence.i instruction by comparing it to the Arm architecture.

Explains the basic concepts of caching and why caching is used.

We explain how caches work in multi-core systems and analyze the key features of caches defined in RISC-V, while comparing them to the Arm architecture.

Describes the basic components that make up a cache, and details how addresses are handled during a cache lookup.


We introduce the hypervisor and describe the privileged mode in which the hypervisor runs on the RISC-V architecture.

Introduces the core features of the Hypervisor Extension defined in the RISC-V architecture and explains how to enable the Hypervisor Extension.


Describes the execution flow in which the Hypervisor first controls an exception when it occurs in the Guest OS.


Based on my experience writing books and giving lectures
More in-depth and detailed than anyone else!

Unparalleled in the domestic system software field! Author of 'Arm Architecture (Armv8-A, Armv7-A)' and 'Linux Kernel' ( both books selected as excellent books by the Korean Academy of Sciences ) and global author who wrote the book "Reverse Engineering Armv8-A Systems" (English) through a foreign publisher (Packt) for the first time in Korea . Above all, he is a working developer who knows the latest system software trends (electric vehicles, system semiconductors - system software) the best. He is also an educator who is most active in knowledge dissemination in the field of system software.

  • Author of the book 'Reverse Engineering Armv8-A Systems: A practical guide to Kernel, Firmware, and TrustZone analysis' (Packt Publishers)

  • Author of 'Structure and Principles of Arm Architecture for System Software Development' ( 2024, Korean Academy of Sciences Outstanding Book Award )

  • Author of 'Learning the Structure and Principles of the Linux Kernel through Debugging' ( 2021, Korean Academy of Sciences Outstanding Book Award )

  • 'Programmers Dev Course: Linux System and Kernel Expert' Main Instructor

  • June 2022, Korea Computer Conference (KCC2022) - Tutorial presentation [Conquering the Linux Kernel using ftrace]

  • LG Electronics 'Linux Kernel' and 'Armv8 Architecture' In-house Instructor ( including domestic and overseas developers ) - (2020~2024)

Recommended for
these people

Who is this course right for?

  • Junior developer seeking to build skills in system software, including system semiconductors (fabless) and electric vehicles (autonomous driving, infotainment).

  • Job applicant aspiring to system software development in system semiconductor (fabless) and electric vehicle sectors.

  • System software developer (system semiconductors, electric vehicles) interested in practical debugging using RISC-V architecture features.

  • Developer from another field transitioning to system software

  • University student targeting graduate school in system software (memory, file system, OS)

Need to know before starting?

  • Computer Architecture

  • C language

  • Operating System

Hello
This is

5,419

Learners

147

Reviews

84

Answers

4.9

Rating

21

Courses

글로벌 저자 & 리눅스 시스템 소프트웨어 개발자 (Arm, RISC-V 아키텍처)

국내 시스템 소프트웨어 분야에서 전무후무한! 'Arm 아키텍처(Armv8-A, Armv7-A)'와 '리눅스 커널' 책을 쓴 저자(2권의 책 모두 대한민국 학술원 우수도서에 선정)이며, 국내 최초로 해외 출판사(Packt)를 통해 "Reverse Engineering Armv8-A Systems" 책(영어)을 집필한 글로벌 저자입니다. 무엇보다 최신 시스템 소프트웨어 트렌드(전기자동차, 시스템 반도체- 시스템 소프트웨어)를 가장 잘 알고 있는 현업 개발자입니다. 또한 시스템 소프트웨어 분야에서 가장 지식 전파 활동을 활발하게 하는 교육자입니다. 

  • 'Reverse Engineering Armv8-A Systems: A practical guide to Kernel, Firmware, and TrustZone analysis' 책(영어) 저자, (Packt 출판사)

  • '시스템 소프트웨어 개발을 위한 Arm 아키텍처의 구조와 원리'(2024년, 대한민국 학술원 우수도서상) 저자

  • '디버깅을 통해 배우는 리눅스 커널의 구조와 원리' (2021년, 대한민국 학술원 우수도서상) 저자

  • '프로그래머스 데브 코스: 리눅스 시스템 및 커널 전문가' 메인 강사

  • 2022년 6월, 한국컴퓨터종합학술대회 (KCC2022) - 튜토리얼 발표 [ftrace를 이용해 리눅스 커널 정복하기]

  • LG전자 '리눅스 커널' 및 'Armv8 아키텍처' 사내 강사(국내 및 해외 개발자 포함) - (2020년~현재)

국내에서 어느 누구보다 리눅스 커널과 Arm 아키텍처(Armv8-A, Armv7-A)를 잘 설명할 수 있는 교육자라고 자신있게 말씀드릴 수 있습니다.

강의문의 : austindh.kim@gmail.com

주요 로드맵 🎯

'시스템 소프트웨어 개발자를 위한 Arm - basic course'

'시스템 소프트웨어 개발자를 위한 Arm - advanced course'

시스템 소프트웨어 개발자를 위한 Linux kernel - basic course

Curriculum

All

82 lectures ∙ (9hr 17min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

Not enough reviews.
Please write a valuable review that helps everyone!

$93.50

austinkim's other courses

Check out other courses by the instructor!

Similar courses

Explore other courses in the same field!