Running snitch matmul with gvsoc
#1
Hello, I have a modified version of this matrix multiplication on the snitch repo that I have been running with verilator, but I'd like to use gvsoc since it is faster.

So far, I mave made gvsoc a submodule in my fork of the snitch repo, and built gvsoc for the snitch target and then tried to run my .elf file with
Code:
make all TARGETS=snitch
./gvrun --target snitch --work-dir "placeholder" --param chip/soc/binary="$myElf" run

but I get the following error:
Code:
1642800000: 16428: [/chip/soc/cluster_0/cluster_registers/trace                              ] Accessing invalid register (offset: 0x11a8, size: 0x4, is_write: 0)
Input error: Platform returned an error (exitcode: 1)

I think this means the version of snitch I compiled for is different from the one gvsoc was built to model. I know from the snitch repo that all my hardware configurations come from this json file, but I don't know how to find the equivalent configuration settings when building gvsoc.

1. Is it very hard to get this matmul running with gvsoc? Should I be approaching it this way (adding gvsoc as a submodule in the snitch repo) or would it be easier to use Deeploy? 


2. How do I know which snitch configurations are used when I build with TARGETS=snitch?

Any advice would would be greatly appreciated!
Reply
#2
(09-16-2026, 04:40 PM)esillars Wrote: Hello, I have a modified version of this matrix multiplication on the snitch repo that I have been running with verilator, but I'd like to use gvsoc since it is faster.
So far, I mave made gvsoc a submodule in my fork of the snitch repo, and built gvsoc for the snitch target and then tried to run my .elf file with
Code:
make all TARGETS=snitch
./gvrun --target snitch --work-dir "placeholder" --param chip/soc/binary="$myElf" run

but I get the following error:
Code:
1642800000: 16428: [/chip/soc/cluster_0/cluster_registers/trace                              ] Accessing invalid register (offset: 0x11a8, size: 0x4, is_write: 0)
Input error: Platform returned an error (exitcode: 1)

I think this means the version of snitch I compiled for is different from the one gvsoc was built to model. I know from the snitch repo that all my hardware configurations come from this json file, but I don't know how to find the equivalent configuration settings when building gvsoc.
1. Is it very hard to get this matmul running with gvsoc? Should I be approaching it this way (adding gvsoc as a submodule in the snitch repo) or would it be easier to use Deeploy? 

2. How do I know which snitch configurations are used when I build with TARGETS=snitch?
Any advice would would be greatly appreciated!heardle
I think your suspicion about a mismatch between the Snitch configuration and the GVSoC model is a good starting point. The invalid register offset could indicate that your ELF is accessing a register that the modeled platform doesn't implement at that address.

I'd first try running one of the unmodified Snitch examples with the same GVSoC build to confirm the simulator setup works. Then compare the hardware configuration, generated headers, and linker settings used to compile your modified matmul against the configuration expected by GVSoC. Also check that both repositories use compatible revisions, since matching the target name alone doesn't guarantee compatibility.

I wouldn't switch to Deeploy just yet unless you specifically need its deployment flow. Getting the existing kernel running on a compatible GVSoC model seems like the simpler first step. If you can share the exact Snitch and GVSoC commits you're using, it should be easier to narrow down where the register mismatch comes from.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)