chipyard icon indicating copy to clipboard operation
chipyard copied to clipboard

RTL emulation with verilog blackbox stays too long at WFI instructions

Open cinder023 opened this issue 1 year ago • 2 comments

Background Work

Chipyard Version and Hash

Release: 1.13.0 Hash: a6a6a6

OS Setup

Ex: Output of uname -a + lsb_release -a + printenv + conda list

Other Setup

Ex: Prior steps taken / Documentation Followed / etc...

Current Behavior

I built a custom rocc accelerator via the blackbox feature,There is a 4096164bit register array in this design.When I execute a binary program, it emulates very slowly.when i check the output of this program,it stays too long in WFI instruction. However,When I reduce the number of registers of the register array,it emulates faster than before,what is the problem of this situation?

Expected Behavior

The simulation speed with many registers should be the same as with few registers

Other Information

No response

cinder023 avatar Apr 08 '25 09:04 cinder023

There are some errors in the description above,the size of register array is 4096x16x4bit,it is not shown up"x"above Looking for your help!

cinder023 avatar Apr 08 '25 09:04 cinder023

This seems like a simulation performance property of Verilator.

Note that the stall for WFI can be bypassed if you use the LOADMEM feature, as this will instantaneously load the target binary into simulated DRAM.

jerryz123 avatar Apr 08 '25 21:04 jerryz123