./build-gem5 --arch aarch64 --gem5-build-id ruby -- PROTOCOL=MESI_Two_Level+
./build-gem5 --arch aarch64 --gem5-build-id ruby -- PROTOCOL=MESI_Two_Level +./run --arch aarch64 --emulator -gem5 --gem5-build-id ruby -- --ruby
diff --git a/index.html b/index.html index 595e1c3..188d858 100644 --- a/index.html +++ b/index.html @@ -1175,12 +1175,18 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
see also: Section 18.16, “gem5 ARM platforms”.
+see also: Section 18.17, “gem5 ARM platforms”.
This generates yet new separate images with new magic constants:
@@ -20069,7 +20075,8 @@ Indirect leak of 1346 byte(s) in 2 object(s) allocated from:./build-gem5 --arch aarch64 --gem5-build-id ruby -- PROTOCOL=MESI_Two_Level+
./build-gem5 --arch aarch64 --gem5-build-id ruby -- PROTOCOL=MESI_Two_Level +./run --arch aarch64 --emulator -gem5 --gem5-build-id ruby -- --ruby
A minimized ruby config which was not merged upstream can be found for study at: https://gem5-review.googlesource.com/c/public/gem5/+/13599/1
Python 3 support was mostly added in 2019 Q3 at arounda347a1a68b8a6e370334be3a1d2d66675891e0f1 but remained buggy for some time afterwards.
+In an Ubuntu 18.04 host where python is python2 by default, build with Python 3 instead with:
./build-gem5 --gem5-build-id python3 -- PYTHON_CONFIG=python3-config+
Python 3 is then automatically used when running if you use that build.
+gem5 has a few in tree CPU models for different purposes, here is an overview of the most interesting ones:
+BaseSimpleCPU descendants. Have no CPU pipeline.
AtomicSimpleCPU: the default one. Memory accesses happen instantaneously. The fastest simulation except for KVM, but not realistic at all. Useful to gem5 restore checkpoint with a different CPU.
TimingSimpleCPU: memory accesses are realistic, but the CPU has no pipeline. The simulation is faster than detailed models, but slower than `AtomicSimpleCPU. TODO: application?
MinorCPU: in-order core. Its 4 stage pipeline is described at the "MinorCPU" section of gem5 ARM RSK.
HPI: derived from MinorCPU simply by parametrization. According to gem5 ARM RSK: "The HPI CPU timing model is tuned to be representative of a modern in-order Armv8-A implementation."
DerivO3CPU: out-of-order core
Dated 2017, it contains a good overview of gem5 CPUs.
+The gem5 platform is selectable with the --machine option, which is named after the analogous QEMU -machine option, and which sets the --machine-type.
The interaction uses the Python C extension interface https://docs.python.org/2/extending/extending.html interface through the pybind11 helper library: https://github.com/pybind/pybind11
or in one go with tmux:
+./run \ + --arch aarch64 \ + --gdb-wait \ + --tmux-args=--no-continue \ + --userland userland/arch/aarch64/freestanding/linux/hello.S \ +;+
You are now left on the very first instruction of our tiny executable!
This is analogous to step debugging baremetal examples.
+Scalable Vector Extension.
+Example: userland/arch/aarch64/sve.S
Scalable Vector Extension.
+To understand it, the first thing you have to look at is the execution example at Fig 1 of: https://alastairreid.github.io/papers/sve-ieee-micro-2017.pdf
aarch64 only, newer than ARM NEON.
@@ -25961,10 +26049,20 @@ AArch64, see Procedure Call Standard for the ARM 64-bit Architecture.It is called Scalable because it does not specify the vector width! Therefore we don’t have to worry about new vector width instructions every few years! Hurray!
The instructions then allow implicitly tracking the loop index without knowing the actual vector length.
+The instructions then allow:
+incrementing loop index by the vector length without explicitly hardcoding it
+when the last loop is reached, extra bytes that are not multiples of the vector length get automatically masked out by the predicate register, and have no effect
+Added to QEMU use mode in 3.0.0.
+Added to QEMU in 3.0.0 and gem5 in 2019 Q3.
TODO announcement date. Possibly 2017: https://alastairreid.github.io/papers/sve-ieee-micro-2017.pdf There is also a 2016 mention: https://community.arm.com/tools/hpc/b/hpc/posts/technology-update-the-scalable-vector-extension-sve-for-the-armv8-a-architecture
@@ -25989,9 +26087,6 @@ AArch64, see Procedure Call Standard for the ARM 64-bit Architecture.https://www.rico.cat/files/ICS18-gem5-sve-tutorial.pdf step by step of a complete code execution examples, the best initial tutorial so far
https://alastairreid.github.io/papers/sve-ieee-micro-2017.pdf paper with some nice few concrete examples, illustrations and rationale
-https://static.docs.arm.com/dui0965/c/DUI0965C_scalable_vector_extension_guide.pdf
analogously to what is done for Freestanding programs.
+Now you can just stepi to when jumping into main to go to the C code in userland/c/hello.c.