This thesis compares the M-33 implementation of the Arm ISA with the Hazard3 implementation of the RISC-V ISA on the RP2350 microcontroller chip. It details why this chip, containing two different cores, presents unique opportunities to learn about their implementation. The two implementations are compared. Custom benchmarks were developed, and existing benchmarks were ported to the Pico platform to collect performance, power consumption, and binary data about both core implementations. Our results show that, although ARM benefits from specialized hardware, both implementations perform similarly on real-world benchmarks, depending on the task. A copy of this thesis is available via the Lafayette College Digital Repository
This repository contains the source code for the thesis. It also contains Python scripts used for data collection, and the PCB design files for the testing board.
- Pico SDK
- A RISC-V toolchain (Like CoreV)
To build the benchmarks, you will need to set up the Pico SDK and the RISC-V toolchain. Then follow these steps:
- Clone the repository:
git clone https://github.com/leslier7/thesis.git - Navigate to the benchmark directory that you want to build, e.g.,
cd thesis/floatmark - Make a build directory and navigate into it:
mkdir build-arm && cd build-armormkdir build-riscv && cd build-riscv - Run CMake to configure the build:
- For Arm:
cmake .. -DPICO_PLATFORM=rp2350 -DARCH=arm - For RISC-V:
cmake .. -DPICO_PLATFORM=rp2350-riscv -DARCH=risc
- For Arm:
- Then build the benchmark with:
make - Do this for each benchmark you want to build.
- Upload the resulting
.uf2files to the Pico 2 board by dragging and dropping them onto the board when it is in bootloader mode (hold the BOOTSEL button while plugging in the MicroUSB cable). - The benchmark will automatically run when the board is powered on. It will output the results to the serial port, which can be read using a terminal program or the provided Python scripts.
- The TestingPCB has a USB-C port for connecting a serial adapter to a computer
- Python 3.x with the following packages:
numpyserialcsv
- A Nordic Semi Power Profiler II power measurement device (if measuring power consumption)
- Connect the USB-C port on the testing board to your computer.
- Run the script:
python UartScript.py file_name.csv port_name- Replace
file_name.csvwith the desired output file name (it can be a path). - Replace
port_namewith the serial port name (e.g.,/dev/ttyUSB0on Linux).
- Replace
- Plug the Micro-USB cable into the Pico 2 board to power it on.
- Unplug and replug the Micro-USB cable to reset the board 10 times to fully test each benchmark.
- If using the PPK2 to measure the power consumption, toggle the power source in the software 10 times instead.
- Follow the instructions in
Section 4.3.2.4of the thesis to set up the PPK2 and collect power measurements.
- Make sure that you have exported the data from the PPK2 software to a CSV file following the instructions in section 4.3.2.4 of the thesis.
- Run the script:
python ChargeScript.py folder_path- Replace
folder_pathwith the top level folder containing the CSV files exported from the PPK2 software. It will process all CSV files in all subfolders and put the outputs of each folder in anOutputsfolder.
- Replace
The PCB design files are located in the TestingPCB directory. They were created using KiCad8. To view or modify them, you will need to install KiCad and open the .kicad_pro project file.