Entries from 2022-11-01 to 1 month

Re-reading the Matrix Scheduler Paper (3. Picker)

I want to replace the instruction issue scheduler of my own CPU with a Matrix Scheduler, so I am re-reading the paper. My understanding is that a Matrix Scheduler fundamentally needs a matrix as large as the number of instruction window en…

Re-reading the Matrix Scheduler Paper (2. Issue Wakeup Matrix)

I want to replace the instruction issue scheduler of my own CPU with a Matrix Scheduler, so I am re-reading the paper. My understanding is that a Matrix Scheduler fundamentally needs a matrix as large as the number of instruction window en…

Re-reading the Matrix Scheduler Paper (1. Issue Wakeup Matrix)

I want to replace the instruction issue scheduler of my own CPU with a Matrix Scheduler, so I am re-reading the paper. My understanding is that a Matrix Scheduler fundamentally needs a matrix as large as the number of instruction window en…

Trying Vivado Logic Synthesis on Various Configurations of My Own CPU

I have been trying Vivado logic synthesis on my own CPU with several configurations. There are about 50 configurations in total, but for now I made a graph using only the ones whose logic synthesis has finished. By the way, for some reason…

Studying the Interrupt Controller of My Own CPU and the Timing of ISS Lockstep Verification

I am implementing an interrupt controller for my own CPU, and I am struggling with a few points when coordinating it with the verification environment. The main issue is how to align the behavior of interrupt controllers such as the CLINT …

Investigating the RISC-V Core Local Interrupt (CLINT) Specification (3. Debugging the CLINT Test Case)

I want to implement the CLINT in my own CPU, so I am investigating the specification. The test case is now complete, so I have been running it in RTL simulation, but there are a few things I need to think about. First, when the mtime regis…

Investigating the RISC-V Core Local Interrupt (CLINT) Specification (2. Creating a CLINT Test Case)

I want to implement the CLINT in my own CPU, so I am investigating the specification. I wanted to run a test case, so I looked into a few options. For now I decided to port the test case below. It requires quite a lot of include files, so …

Analyzing rv8 to Make the Log Output of the Cycle-Accurate Simulator Sniper Easier to Read

rv8 is a rich set of tools that includes a RISC-V simulator and JIT. It also has an instruction decoder, and Sniper uses rv8's decoder to decode instructions. However, this part is actually a bit tricky. To add instructions correctly, I ne…

Investigating How the Cycle-Accurate Simulator Sniper Computes Cycles

https://msyksphinz-en.hatenablog.com/entry/2022/11/15/040000msyksphinz-en.hatenablog.com On reflection, the work from last time of splitting vector instructions according to register accesses also has to be applied to arithmetic instructio…

I Want to Unravel the MSHR of BOOM, the Out-of-Order RISC-V CPU Core

Out of necessity, I have been looking at how the MSHR of BOOM, the out-of-order RISC-V processor, behaves, but Chisel is so flexible to write that I can't really grasp what is happening. What I can tell is that the MSHR has two entries. Is…

Investigating How the Cycle-Accurate Simulator Sniper Computes Cycles

About the Instruction Information sniper/common/performance_model/instruction.h class Instruction { public: Instruction(InstructionType type, OperandList &operands); Instruction(InstructionType type); virtual ~Instruction() { }; virtual Su…

Building a RISC-V Linux Boot Environment with buildroot (12. Introducing initrd)

Now that I have built a RISC-V Linux boot environment, I am running it in the RTL environment. The Linux kernel boot looks like it is going well, so next I will take on loading the root file system, that is, building the rootfs. After intr…

Investigating the RISC-V Core Local Interrupt (CLINT) Specification

I want to implement a CLINT in my own CPU, so I am investigating the specification. First, I am looking at the following document. chromitem-soc.readthedocs.io The registers that need to be defined are MSIP, MTIME, and MTIMECMP. First, the…

On the Spike Verification Environment for RISC-V Boot (2. Building the Linux Boot Environment)

To boot the Linux generated by Buildroot on Spike, I am running simulations on Spike and checking the behavior. I am investigating what it takes to reproduce a Linux boot on Spike. Basically, we specify an OpenSBI bootloader, a kernel, and…

Investigating How to Run My Own CPU's Regression Tests on GitHub Actions (2. Updating the Environment)

I want to run regression tests and CI for my own CPU on GitHub, so I am investigating several approaches. https://msyksphinz-en.hatenablog.com/entry/2022/11/05/040000msyksphinz-en.hatenablog.com Several people showed me how to do it, and I…

What to Do When WSL2 Runs Out of Disk Space (Deleting with DISKPART)

Something I had long wondered about was why the free space reported by the df command on WSL2 differs from the free disk space shown in Windows Explorer, and I never understood the reason. The disk usage on the Windows side was finally run…

Building a RISC-V Linux Boot Environment with buildroot (11. Introducing initrd)

Now that I have built a RISC-V Linux boot environment, I am running it in the RTL environment. The Linux kernel boot looks like it is going well, so next I will take on loading the root file system, that is, building the rootfs. First, the…

Investigating Cycle Accuracy in the Cycle-Accurate Simulator Sniper

Looking at the trace of the div instruction, it appears that the time is not spent after issue, but rather that it is waiting on Dispatch the whole time. The div latency calculation is where it first looks wrong: getInstructionLatency(68) …

Investigating How to Run My Own CPU's Regression Tests on GitHub Actions

I want to run regression tests and CI for my own CPU on GitHub, so I am investigating several approaches. One approach is to build the regression environment with a Dockerfile. I installed the RISC-V toolchain and Verilator on a Docker ima…

Andes Technology's AX65 RISC-V Out-of-Order Processor

A look at the AX65 RISC-V out-of-order processor announced by Andes. https://www.andestech.com/en/2022/11/02/andes-technology-unveils-the-andescore-ax60-series-an-out-of-order-superscalar-multicore-risc-v-processor-family/ 4-way superscala…

Building a RISC-V Linux Boot Environment with buildroot (10. Fixes Around RMW Instructions)

Now that I have built a RISC-V Linux boot environment, I am running it in the RTL environment. When I ran it with a different configuration, Linux stopped partway through booting. The cause was that the LR/SC update logic sits in different…

Building a RISC-V Linux Boot Environment with buildroot (9. Debugging and a Successful Linux Boot)

Now that I have built a RISC-V Linux boot environment, I am running it in the RTL environment. After some debugging, Linux finally booted successfully. It ended with a Kernel Panic in the end, but that apparently happens because the rootfs…