Hi,
I use Spike to generate trace log to compare how to execute a program
with my core in Icarus Verilog.
my example:
spike --isa=RV32I_zicsr --priv=m
-m0x20000000:0x8000,0x20100000:0x1000,0x8000000:0x100000 -d
--debug-cmd=spike.cmd --log-commits -l --log=progname_spike.log
progname.elf
where:
-m0x20000000:0x8000,0x20100000:0x1000,0x8000000:0x100000 determine
memory region:
- 0x20000000 size 0x8000 - program RAM
- 0x20100000 size 0x1000 - pheripherial mapped RAM
- 0x80000000 size 0x100000 - Flash
--log-commits set to generate logfile with information about data. What
is data read/write to/from reg/memory.
spike.cmd is a file with simple command flow. In may case it is:
until pc 0 0x80000090 // execute a program until Program counter not
0x80000090
r 1 // execute a program 1 step
quit // stop emulation and exit
Best regards,
Amr Zaky писал 29-08-2024 03:01:
> Hi
> I am not sure if this is the suitable forum for this question, but
> please guide me if there is a more appropriate forum to ask it.
>
> I want to get RISC V instruction traces to feed an educational
> microarchitectural trace. Were talking here about the Hennessy and
> Patterson (book 2) kind of microarchitecture: advanced cache
> techniques, dynamic scheduling, speculation, etc.
>
> Towards that end, I was able to install the RISC V toolchain on a
> VMWare Linux client on my PC. I was "almost" able to get the Spike
> instruction set simulator installed correctly.
>
> Before I put more effort into fixing the Spike installation, I want
> to
> be reassured that there is a path of using it to acquire an
> instruction trace. One-at-a-time is fine, instruction file is also
> fine, speed is not an issue (the assignments will be mostly simple
> loops like DAXPY).
>
> If there is a way to get the instructions executed from Spike, please
> explain it to me in some detail, considering I am mostly an
> Architect/Professor rather than a very experienced SW guru.
>
> In the past, people pointed to FPGAs and commercial tools,
> unfortunately, our school circumstances do not make use of this
> possible.
>
> Thanks
> --Amr Zaky
>
> --
> You received this message because you are subscribed to the Google
> Groups "RISC-V ISA Dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
isa-dev+u...@groups.riscv.org [1].
> [2].
>
>
> Links:
> ------
> [1] mailto:
isa-dev+u...@groups.riscv.org
> [2]
>
>
https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAD4pL_Pyg48J%3D60rp4rwLzfj715eqocjkg9rdm5Aevv8J_K3JQ%40mail.gmail.com?utm_medium=email&utm_source=footer