Hey, I am (also) having trouble with the GL simula...
# caravel
j
Hey, I am (also) having trouble with the GL simulation of my design. Based upon previous post in this channel I added a pullup statement to my simulation, but this did not help. Did any of you had a similar experience? and do you have any tips on how to approach debugging? Another question is should I even bother with this? Or is RTL simulation enough? To recreate the issue you can try downloading: https://github.com/jurevreca12/rvj1-caravel-soc/tree/b37633479be1716f5e6a8edab3d1099baf5eea70 and running make verify-adding-gl . I am also attaching both the (succesfull) RTL simulation VCD and the unsuccessful GL simulation VCD.
c
As well as needing the pullup, another issue I had encountered was that floating inputs from mprj_io could cause unknown values to be propagated in GL simulations and mess everything up. My fix was to add a pulldown onto all pins that where not being used. It could be that you have a similar problem.
j
I added a pull-up to all the mprj_io. But it did not fix it. Did you add pulldowns to others also?
c
Oh sorry, I just looked at my code and rather than the pullup, I just assigned all the unused pins to 0, I think that was so that I didn't need to have so many lines. No really sure what difference this would make, so maybe you've got a different problem.
j
I tried also assigning all mprj_io to 0 and it didnt help..
So I realized that my gatelevel must differ from the RTL. I've looked at the traces of instruction and data SRAM and I can see they differ at the point where my riscv core would have to write to d(ata)ram. I am not sure what to do now, why would this happen? I am attaching an image of a trace where at the exact same moment the RTL simulation writes 0xAB610000 to DRAM (for my simulation this signals an susccessfull end), but the GL simulation does nothing.
image.png
If anyone has a similar problem, I was able to solve this. The reason this was happening is because in my code somewhere I had a reg that was included in two always blocks. I picked up on this by using verilator as a linting tool.