core-v-mcu icon indicating copy to clipboard operation
core-v-mcu copied to clipboard

spi_decoder false instruction during modelsim simulation

Open jaedenzou opened this issue 2 years ago • 3 comments

Hi,

I'm trying to run simulation with make buildsim and make sim. After modelsim gui is opened and run, These errors were appeared after releasing the reset:

core_v_mcu_tb.qspi.spi_decoder.decode @ 3163550ns: ERROR : False instruction (66), please retry

core_v_mcu_tb.qspi.spi_decoder.decode @ 3170950ns: ERROR : False instruction (99), please retry

And eventually the trace timeout potentially due to this error. Could you guys help by giving any insights of why this might happen? Thanks!

Some previous errors that I got around that might be relevant and to be noted are, I was running into errors for make buildsim initially about linux so files like following: ./vish: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory The way I got pass those is by installing i386 version of those set of libs. And the modelsim was running the 32bit version default, it was conflicted with the uartdpi.so file compiled locally with 64bit ubuntu. I changed the modelsim to be 64bit to make it work.

jaedenzou avatar Jun 21 '22 08:06 jaedenzou

Hi @jaedenzou, thanks for raising this issue. I am not familiar with ModelSim, particularly on Windows systems, so I cannot help there.

The error is clearly being generated by the QSPI model (link), so it seems the memory image being read by the model has a problem.

MikeOpenHWGroup avatar Jun 22 '22 14:06 MikeOpenHWGroup

This is a non-issue, the 66 and 99 commands are reset command to various flash devices and are not decoded by the GIGa flash version that is the repo. The simulation only runs for a fixed amount of time and I assume you created and copied appropriate memory init files, otherwise the simulation will be looping in the boot loader.

On Jun 22, 2022, at 9:10 AM, Mike Thompson @.@.>> wrote:

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi @jaedenzouhttps://github.com/jaedenzou, thanks for raising this issue. I am not familiar with ModelSim, particularly on Windows systems, so I cannot help there.

The error is clearly being generated by the QSPI model (linkhttps://github.com/openhwgroup/core-v-mcu/blob/2e452a1eb58e7daad19226ed58ff1940370457e3/tb/qspi_model/GD25Q128B.v#L2520), so it seems the memory image being read by the model has a problem.

— Reply to this email directly, view it on GitHubhttps://github.com/openhwgroup/core-v-mcu/issues/235#issuecomment-1163152840, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP2QBU324WB5TJZ6SDAQW63VQMNGDANCNFSM5ZLQYMGQ. You are receiving this because you are subscribed to this thread.

gmartin102 avatar Jun 22 '22 19:06 gmartin102

Thanks for replying, the simulation terminated at timeout and the waveform does not seem right with many signals are either high impedance or x and others to be stuck at certain values. Here is the waveform attached. Thus I think it might be problematic rather than a non-issue here. For mem_init_files, how should I check if I have the right one inside the tb folder? Besides, is there a way to get the disassembled assembly code for the same trace that the simulation is running? So I can read that accordingly to figure out what instruction is running and where are we stuck at. image

This is a non-issue, the 66 and 99 commands are reset command to various flash devices and are not decoded by the GIGa flash version that is the repo. The simulation only runs for a fixed amount of time and I assume you created and copied appropriate memory init files, otherwise the simulation will be looping in the boot loader. On Jun 22, 2022, at 9:10 AM, Mike Thompson @.@.>> wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi @jaedenzouhttps://github.com/jaedenzou, thanks for raising this issue. I am not familiar with ModelSim, particularly on Windows systems, so I cannot help there. The error is clearly being generated by the QSPI model (linkhttps://github.com/openhwgroup/core-v-mcu/blob/2e452a1eb58e7daad19226ed58ff1940370457e3/tb/qspi_model/GD25Q128B.v#L2520), so it seems the memory image being read by the model has a problem. — Reply to this email directly, view it on GitHub<#235 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP2QBU324WB5TJZ6SDAQW63VQMNGDANCNFSM5ZLQYMGQ. You are receiving this because you are subscribed to this thread.

jaedenzou avatar Jun 23 '22 09:06 jaedenzou