You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trace gen doc update and announce Spike-STF (#258)
For olympia this is a documentation update for trace generation.
Also this PR announces public release of a Spike fork that supports STF
and BBV generation (called Spike-STF). Spike-STF was forked from the
main Spike and the STV/BBV/regression support was developed by me and
others at Condor. There are a number of other features included. BTW:
this version of spike supports the RVA23 profile, which includes vector.
The public repo is here
https://github.com/jeffnye-gh/cpm.riscv-isa-sim.git.
In the PR I have updated the trace/README.md with details on how to
generate traces under linux and baremetal and use them with olympia.
The trace README.md documents how to use the Spike-STF repo, cloning it
within the olympia tree, d/loading a baremetal and linux cross-compiler,
d/loading the kernel, buildroot and opensbi. There is a fair bit of
automation to support linux and build these packages. There are bash
scripts that illustrate how to use the constructed collateral to create
traces for olympia.
I have kept the Dromajo instructions, but I think long term this will
replace Dromajo because Spike's ISA support is current.
I have also added three dhrystone traces generated with Spike-STF. These
three dhrystone align with the accepted practice of 3 levels of
optimization, ground rules, in-lining, and LTO.
---------
Co-authored-by: jeffnye-gh <habanaro@gmail.com>
Exit the conda environment, if enabled, before compiling Spike-STF.
208
+
```
209
+
conda deactivate
210
+
conda deactivate
211
+
212
+
mkdir -p build install && cd build
213
+
../configure --prefix=`pwd`/../install
214
+
make -j$(nproc)
215
+
make regress
216
+
make install
217
+
```
218
+
219
+
The regress target executes the [riscv-tests](https://github.com/riscv-software-src/riscv-tests) test suite. Pass/fail is reported.
220
+
221
+
The compiler is a prebuilt RISC-V cross compiler from [Embecosm](https://embecosm.com/).
222
+
223
+
There is detailed information in the Spike-STF repo,
224
+
[README_FORK.mk](https://github.com/jeffnye-gh/cpm.riscv-isa-sim/blob/spike_stf/README_FORK.md) and [USAGE.md](https://github.com/jeffnye-gh/cpm.riscv-isa-sim/blob/spike_stf/USAGE.md).
225
+
226
+
### Generating the Baremetal Dhrystone Traces
227
+
228
+
When Spike-STF is initially configured the dhrystone ELFs are created. If they need to be re-created:
229
+
230
+
```bash
231
+
cd riscv-perf-model/traces/cpm.riscv-isa-sim
232
+
make -C dhrystone
233
+
```
234
+
235
+
This creates 3 versions of the dhrystone elf with 3 different levels of
236
+
optimization running 1000 iterations. The source code has been modified to
237
+
add the trace macros and to allow simplified execution under baremetal with
238
+
limited syscall support.
239
+
240
+
A discussion of the 3 optimization levels is available in [USAGE.md](https://github.com/jeffnye-gh/cpm.riscv-isa-sim/blob/spike_stf/USAGE.md#dhrystone-optimization-discussion).
Measured time too small to obtain meaningful results
388
+
Please increase number of runs
389
+
390
+
# <control-c>
391
+
# ^C(spike) quit
392
+
```
393
+
394
+
Once you have exited spike and are returned to the main o/s, the trace_out
395
+
directory will hold the trace file.
396
+
```
397
+
-rw-r--r-- 1 random agroup 12097 Jan 1 00:00 linux_trace.zstf
398
+
```
399
+
400
+
Note _any_ trace-enabled ELF you run while in spike linux will be added to the
401
+
same trace file.
402
+
403
+
This is useful in cases.
404
+
405
+
For other use cases, check the USAGE.md file in the Spike-STF repo for
406
+
instructions on how to use initd to automate linux based trace generation.
407
+
408
+
See [Automating Linux Tracing with INIT.d](https://github.com/jeffnye-gh/cpm.riscv-isa-sim/blob/spike_stf/USAGE.md#Automating-linux-tracing-with-initd)
0 commit comments