gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Help integrating a CPU model based on DerivO3CPU

A
Antonio
Mon, Jan 22, 2024 8:38 AM

Hello all:

I am new on gem5 and I know little about compiling. I followed gem5's
tutorials on building ARM and everything went fine. So I decided to go
further.

After reading this: https://pierreay.github.io/reproduce-spectre-gem5
And its paper:
https://github.com/pierreay/reproduce-spectre-gem5/blob/main/docs/master_thesis.pdf

I wanted to replicate the steps explained there to use a custom CPU model
into gem5.
The paper basically consists on simulate Spectre attacks using a variation
and more realistic version of the O3CPU model, called ARMv8A_Cortex_A72.
This is in a Python script with the same name. In order to try it, it has
another script called RPIv4.py, that initializes a full system emulation.
This last file is like the file on
<gem5_root>/configs/example/arm/starter_fs.py.

The thing is I am not able to do that since when I try the command as shown
in the web:

$ gem5.opt RPI4.py --help

Because it says:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 16569:
ordinal not in range(128)

At:
/usr/lib/python3.10/encodings/ascii.py(26): decode
src/python/m5/main.py(606): main

My first thought was that I needed to recompile and create SimObjects but
that stuff is not shown on the webpage nor on the paper. But as it does not
show any .cc or .hh so I guess that is not the way to go.

Thank you for your patience. Non native speaker here.

Hello all: I am new on gem5 and I know little about compiling. I followed gem5's tutorials on building ARM and everything went fine. So I decided to go further. After reading this: https://pierreay.github.io/reproduce-spectre-gem5 And its paper: https://github.com/pierreay/reproduce-spectre-gem5/blob/main/docs/master_thesis.pdf I wanted to replicate the steps explained there to use a custom CPU model into gem5. The paper basically consists on simulate Spectre attacks using a variation and more realistic version of the O3CPU model, called ARMv8A_Cortex_A72. This is in a Python script with the same name. In order to try it, it has another script called RPIv4.py, that initializes a full system emulation. This last file is like the file on <gem5_root>/configs/example/arm/starter_fs.py. The thing is I am not able to do that since when I try the command as shown in the web: $ gem5.opt RPI4.py --help Because it says: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 16569: ordinal not in range(128) At: /usr/lib/python3.10/encodings/ascii.py(26): decode src/python/m5/main.py(606): main My first thought was that I needed to recompile and create SimObjects but that stuff is not shown on the webpage nor on the paper. But as it does not show any .cc or .hh so I guess that is not the way to go. Thank you for your patience. Non native speaker here.