Entries from 2022-09-01 to 1 month
Now that I have built the RISC-V Linux boot environment, I want to try running it on the RTL environment. First, the bootloader. It is stored in ELF format, so it is easy to run. However, it crashed right after loading. Huh, why does it fa…
I want to use buildroot as the build environment for RISC-V Linux, but I couldn't find any material on an environment that builds reliably, so I decided to make one myself. I work on WSL, which has some annoying aspects such as setting up …
RISCOF stands for RISC-V Compliance Framework, a Python-based framework that uses RISC-V architectural assembly tests to test hardware and software against the standard RISC-V reference model. https://github.com/riscv-software-src/riscof F…
PerformanceModel::queueInstruction() just keeps pushing instructions into m_instruction_queue. I don't think ENABLE_PERF_MODEL_OWN_THREAD is defined. void PerformanceModel::queueInstruction(DynamicInstruction *ins) { if (m_fastforward || !…
I decided to write up how Sniper works once. I'll try to build a trace based on a simulation. main() : standalone.cc - Instantiate the Simulator - getTraceManager()->init() -getTraceManager()->run() - TraceThread::start() - TraceThread::ru…
I am trying to implement RISC-V RMW (Read Modify Write) instructions in my own OoO core. The basic functionality is now implemented, so next I added features such as issue restrictions for dependent instructions. Instructions younger than …
It started when I noticed the viota.m instruction in the list of RISC-V vector instructions. According to the instruction's description, The viota.m instruction reads a source vector mask register and writes to each element of the destinat…
I am trying to implement RISC-V RMW (Read Modify Write) instructions in my own OoO core. The AMOADD implementation is done. Next, I implemented a feature that detects and stops instructions trying to overtake an RMW instruction. I added a …
On my own RISC-V CPU core, I improved several parts of the configuration and the GShare branch predictor now works correctly. The tricky part of GShare is that it is quite hard to predict multiple branches at the same time when multiple in…
I am trying to implement RISC-V RMW (Read Modify Write) instructions in my own OoO core. I am starting with the implementation of the AMOADD.W instruction. RMW instructions are basically sent into the pipeline from the STQ. However, unlike…
Continuing the Sniper analysis. I want to be able to do cycle analysis of RISC-V vector instructions. In the previous result, the cycle count was still not what I expected. If 16 memory requests are generated, I would like it to take about…
I'm trying to implement RISC-V RMW (Read Modify Write) instructions in my own OoO core. There seem to be several ways to implement them, so let's think about how to build the basic atomic instruction flow. First, the RISC-V AMOADD instruct…
Currently, Sniper can trace at most two memory accesses per instruction, so we first need to change that. In Sniper's SIFT trace format, I modify MAX_DYNAMIC_ADDRESSES so that it can accept more memory accesses. diff --git a/sift/sift.h b/…
I wanted to experiment with a few things, so I'm going to run NaxRISCV. github.com # Get the repo git clone https://github.com/SpinalHDL/SpinalHDL.git --recursive git clone https://github.com/SpinalHDL/NaxRiscv.git --recursive cd NaxRiscv …
On my own RISC-V CPU core, I changed several configurations and reworked the RAS. The RAS latency has increased, but it now predicts stably, so let's measure Dhrystone. The previous measurement results look like this. Configuration IPC tin…
Experiments in Converting Sniper's Results to O3Pipeview Let's modify it a bit more and pull in more information. Let's use the Tracer's times information. We'll assume that fetch / decode / rename each come one cycle before the previous s…
Experiments in Converting Sniper's Results to O3Pipeview I added some output to LoopTracer::traceInstruction() as shown below. Only the commit time is real; everything else is arbitrary. I simply hacked it so that every pipeline stage adva…
Let's dump the SQLite commands generated by Sniper. ROI: Region of Interest apparently means the measurement range. For now I'll ignore it and observe the overall state. This time, I'll extract the SQLite information and simply print it hi…
The cycle-accurate simulator Sniper has basic support for executing RISC-V binaries, but there are problems such as the Spike version being old and unable to run vector instructions. So I updated the Spike simulator bundled with Sniper and…
LLVM 15 has been released, so I tried migrating the development repository of the "RISC-V + LLVM book" to the LLVM 15 series. The details are written on the following support page. github.com git clone https://github.com/msyksphinz-self/ll…
I have been doing some debugging on the previous RVVLoad definition. There is very little documentation, so investigating is hard, and I am reading through how the code behaves one step at a time in GDB. seanzw.github.io It looks like defi…
Continuing my attempt to add instructions to gem5. I have been experimenting by trial and error to find out what is needed to define a vector instruction. First, I define a class called RVVLoad to define the vector instructions as a whole.…
That said, all I did was translate and read the ISA Parser page. I'm leaving it here as a memo. www.gem5.org ISA Parser The gem5 ISA description language is a custom language designed specifically to generate the class definitions and deco…
The toolchain situation at the time of publication of "Learn by Building: Computer Architecture" (the so-called RISC-V + LLVM book) has changed considerably from the situation when I was writing it, and I have caused trouble for many reade…
Summarizing SVE Memory Access Instructions While looking at the gem5 code, I am summarizing what configurations exist for AArch64 memory access instructions. First of all, I don't really understand the structure of AArch64 memory access in…
Continuing my attempt to add instructions to gem5. I have been looking into instruction definitions and investigating why VLE and VSE didn't work properly last time. It turned out that the VSETVLI instruction has to be implemented reasonab…
make: Leaving directory '/home/msyksphinz/work/riscv/chipyard/chipyard/toolchains/riscv-tools/riscv-isa-sim/build' cp: cannot stat '/home/msyksphinz/work/riscv/chipyard/chipyard/toolchains/riscv-tools/riscv-isa-sim/build/libfesvr.a': No su…
I want to understand gem5's instruction definition tables, so I will start by adding some simple RISC-V vector instructions. To run the simplest case, memcpy, it is enough to define the following three instructions. copy_data_vec: mv a3, a…