Entries from 2024-08-01 to 1 month

An Overview of the RISC-V Advanced Platform Interrupt Controller (APLIC) (2. Required Registers)

I'm going to study the RISC-V Advanced Platform Interrupt Controller (APLIC). First, let's read the following blog to get an overview. blog.stephenmarz.com This time I summarized the register layout. I think this is roughly what's needed. …

An Overview of the RISC-V Advanced Platform Interrupt Controller (APLIC)

I'm going to study the RISC-V Advanced Platform Interrupt Controller (APLIC). First, let's read the following blog to get an overview. blog.stephenmarz.com Overview of the APLIC The APLIC is an evolution of SiFive's PLIC, and the differenc…

Analyzing a Build Failure When Building LLVM 18 After a Long Time (3. Verifying Bare-Metal Compilation)

I had been struggling for a long time because I didn't know how to build LLVM 18 with the RISC-V target, but I've figured out that, for the time being, at least the following method works. https://msyksphinz-en.hatenablog.com/entry/2024/05…

Analyzing a Build Failure When Building LLVM 18 After a Long Time (2. How to Compile the Bare-Metal Version)

I had been agonizing over not knowing how to build LLVM 18 for the RISC-V target, but I've figured out that, at least for now, the following method works. https://msyksphinz-en.hatenablog.com/entry/2024/05/31/040000msyksphinz-en.hatenablog…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (6. The RVC Decompressor Written in SpinalHDL)

https://msyksphinz-en.hatenablog.com/entry/2024/08/07/000000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.com/entry/2024/08/08/040000msyksphinz-en.hatenablog.com I'd like to somehow get better at reading Spinal HDL's incomp…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (7. RTL Simulation of NaxRiscv with RVC Support)

https://msyksphinz-en.hatenablog.com/entry/2024/08/07/000000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.com/entry/2024/08/08/040000msyksphinz-en.hatenablog.com Let me write down how to run RTL simulation for NaxRiscv with…

A Case Study of Netflix's Analysis for Improving Instance Load

An interesting microarchitecture case study that I came across while browsing through LinkedIn articles. It's the story of what tools were used, and how, to solve a problem that required understanding the CPU microarchitecture at an even d…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (5. Analysis of the SpinalHDL Source Code)

https://msyksphinz-en.hatenablog.com/entry/2024/08/07/000000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.com/entry/2024/08/08/040000msyksphinz-en.hatenablog.com I'd like to somehow get better at reading Spinal HDL's incomp…

SiFive Announced the P870-D, So Let's Look Back at the Details of the P870 Core (2. Cache Memory)

Continued from the previous article: Cache and Memory Access The P870 has three pipes for address generation. Two of the pipes handle either loads or stores, and the third pipe handles only loads. This is similar to what is seen in the Cor…

SiFive Announced the P870-D, So Let's Look Back at the Details of the P870 Core (1. Overview)

SiFive has announced its P870-D core, but personally, I think this shows that SiFive has effectively stopped developing its main cores. Quoted from https://www.sifive.com/cores/performance-p870d The vertical axis of this graph seems to rep…

Reading the GhostWrite Paper (5. Instruction Sequences That Halt the CPU)

I'm going to read the RISCVuzz paper, the fuzzing paper that describes the GhostWrite attack. ghostwriteattack.com https://msyksphinz-en.hatenablog.com/entry/2024/08/14/040000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.co…

Reading the GhostWrite Paper (3. GhostWrite Attack Overview)

I'm going to read the RISCVuzz paper, the fuzzing paper that describes the GhostWrite attack. ghostwriteattack.com https://msyksphinz-en.hatenablog.com/entry/2024/08/14/040000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.co…

Reading the GhostWrite Paper (2. How RISCVuzz Works)

I'm going to read the RISCVuzz paper, the fuzzing paper that describes the GhostWrite attack. ghostwriteattack.com About the RISCVuzz framework. A server that controls the tests & a client (RISC-V CPU) The client receives instruction seque…

Reading the GhostWrite Paper (1. Overview)

I'm going to read the RISCVuzz paper, the fuzzing paper that describes the GhostWrite attack. ghostwriteattack.com The authors developed RISCVuzz, a framework for detecting hardware CPU vulnerabilities without requiring source code or emul…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (4. Analysis of the Generated Verilog Code)

https://msyksphinz-en.hatenablog.com/entry/2024/08/07/000000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.com/entry/2024/08/08/040000msyksphinz-en.hatenablog.com As for NaxRiscv's Verilog code, I still have absolutely no id…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (4. Waveform Tracing)

https://msyksphinz-en.hatenablog.com/entry/2024/08/07/000000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.com/entry/2024/08/08/040000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.com/entry/2024/08/09/040000m…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (3. About SpinalHDL's Special Constructs)

https://msyksphinz-en.hatenablog.com/entry/2024/08/07/000000msyksphinz-en.hatenablog.com https://msyksphinz-en.hatenablog.com/entry/2024/08/08/040000msyksphinz-en.hatenablog.com Looking at NaxRiscv's Verilog code, I still can't make any se…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (2.)

https://msyksphinz-en.hatenablog.com/entry/2024/08/07/000000msyksphinz-en.hatenablog.com Looking at NaxRiscv's Verilog code, I still can't make any sense of what it says. The rough system hierarchy looks like the following, but you can't r…

An Overview of the Open-Source Out-of-Order CPU NaxRiscv (1.)

NaxRiscv is an open-source out-of-order CPU core. I think it's a very instructive design, but it's written in SpinalHDL, a mysterious Scala-based language. spinalhdl.github.io Out-of-order execution with register renaming Superscalar (e.g.…

Investigating RISC-V-Based SoC Platforms (1. Overview Survey)

Someone introduced me to X-HEEP, a SoC platform based on RISC-V. x-heep.readthedocs.io It lets you build a customizable SoC around a RISC-V microcontroller written in SystemVerilog. By customizing the CPU, common peripherals, memory, and s…

RISC-V Summit China 2024 Agenda Released

I won't be attending in person, but compared with events in Japan the volume and quality look overwhelmingly higher, so I'm making a note of it here. riscv-summit-china.com Time Duration Title Speaker 8:30 30 Registration - 9:00 30 Remarks…

How Scalable Are Programs That Use OpenMP? (2)

I've been trying out parallel programs using OpenMP, and something has puzzled me: in some cases, performance doesn't improve at all. https://msyksphinz-en.hatenablog.com/entry/2024/07/31/040000msyksphinz-en.hatenablog.com I checked whethe…

Getting Started with the RTL Simulator DSim (3. Investigating How to Launch DSim from the Command Line)

I'm going to look into how to launch DSim from the command line. The environment is Ubuntu 22.04 LTS on WSL2. Enabling the DSim Command-Line Environment With the environment from the previous posts already set up, $ cd /home/msyksphinz/met…

Getting Started with the RTL Simulator DSim (2. Opening the Example Design)

Last time I installed DSim and activated the license, so next I'd like to open a sample design. https://msyksphinz-en.hatenablog.com/entry/2024/08/01/040000msyksphinz-en.hatenablog.com I'll proceed using the following tutorial as a referen…

Getting Started with the RTL Simulator DSim (1. Installation and License Activation)

I'm hopelessly late to the party, but I'm going to get started with DSim, an RTL simulator whose desktop version is apparently free to use. I've been finding Verilator extremely handy so far, but if DSim turns out to be usable, I'd like to…