ucb-bar / gemmini

Berkeley's Spatial Array Generator
Other
779 stars 160 forks source link

system freeze while running tests on FPGA. #154

Open 12ff7a6 opened 2 years ago

12ff7a6 commented 2 years ago

hello, I have deployed 2 rocketcores and Gemmini accelerator on Xilinx VC707 FPGA by using the repo https://github.com/eugene-tarassov/vivado-risc-v. But I got problems when I was running Gemmini tests. For example, if I run conv_with_pool-linux, then I get

debian@debian:/boot/bareMetalC$ ./conv_with_pool-linux
Output dimension: 112
Pooling output dimension: 56

Randomize inputs...
Randomize weights...
Randomize bias...
CPU conv...
CPU conv took 4275198029 cycles
CPU pool...
CPU pool took 122327864 cycles
CPU conv+pool took 4397525893 cycles
Flatten w[  911.674284] systemd[1]: Starting Cleanup of Temporary Directories...
[ 1027.062508] systemd[1]: systemd-udevd.service: State 'stop-watchdog' timed out. Killing.
[ 1027.078076] systemd[1]: systemd-udevd.service: Killing process 158 (systemd-udevd) with signal SIGKILL.

or if I run mvin_mvout-linux then I get no response and the system freeze forever. I must restart the FPGA. Does anyone know how to get rid of this problem?

johnny-wang16 commented 2 years ago

Hi there, I faced similar issues and noticed that the pointer mechanism is buggy. When I use a pointer to call functions like tiled_conv_A_stride, the system freezes. but when i call the functions directly, it seems to pass the test. Would you mind sharing your updates on this issue? Thanks!

hngenc commented 2 years ago

@12ff7a6 Hmm, we haven't tried to run on FPGAs before. Are you able to replicate this issue on Verilator/VCS or Firesim?

@johnny-wang16 I'm not familiar with that error. Do you have an example code where you run into that issue? Calling tiled_conv_A_stride with pointers should be fine...

johnny-wang16 commented 2 years ago

hi @hngenc thanks for the reply! It turns out that I had an illegal stack pointer initialization. after i modified _stack_start, the issue is resolved. Thanks.

gnodipac886 commented 1 year ago

@12ff7a6 could you share how you were able to get Gemmini running on VC707?

12ff7a6 commented 1 year ago

@gnodipac886 try this repo https://github.com/eugene-tarassov/vivado-risc-v

gnodipac886 commented 1 year ago

thanks!

gnodipac886 commented 1 year ago

hi @hngenc thanks for the reply! It turns out that I had an illegal stack pointer initialization. after i modified _stack_start, the issue is resolved. Thanks.

@johnny-wang16 Do you happen to remember how you were able to solve this issue? Thanks in advance!

johnny-wang16 commented 1 year ago

Hi there, it's been awhile but i think the problem i faced atm was different from yours. if my memory serves me right, there's a config file or somewhere that can specify the memory map. i had to change that config file to solve the issue.

gnodipac886 commented 1 year ago

ah, ok, thank you, I'll try to see if I can find it :)