nvdla / hw

RTL, Cmodel, and testbench for NVDLA
Other
1.68k stars 561 forks source link

It's OK to dubug the cmod in HW simulation by GDB? #314

Open zhanjf opened 4 years ago

zhanjf commented 4 years ago

Does anyone know how to debug cmod in HW simulation? Thanks!

Abraham-Xu commented 4 years ago

I tried that but disappointingly I found that if you set breakpoints in cmod code, the program can only stop before the vp started. It seems that after the vp started, GDB can not monitor the program.

sgarika commented 3 years ago

add compile flag '-g' .this flag enables debug capabilities on user C code and then you can set the breakpoints after attaching executable to GDB.