riscv-software-src / riscv-tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatic commands on Spike - How to run spike by giving a text file as an input?

omerguzelelectronicguy opened this issue · comments

Hello, I am using Spike to run RISCV. I want to give commands to spike by taking from a text file.
For example, I create a text including:

    reg 0 
    run 100
    reg 0 1
    run 100 
    reg 0
    run 100
    reg 0 1
    ......

then I gave it to spike as a set of commands.
Is there any way to make it ? or a similar thing?

While I'am searching different GitHub pages, I entered the issue in the wrong repo I think. Although it is the case, I can insert the answer because spike already has such feature.
example command: spike -d --log-commits --debug-cmd=s_commands.txt hword.riscv
This will run the spike with the commands in s_commands.txt.
Sorry for my mistake.