Xilinx / systemctlm-cosim-demo

QEMU libsystemctlm-soc co-simulation demos.
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/862421112/Co-simulation
Other
131 stars 47 forks source link

AXI DMA modules attempt DMA copy on simulation start #12

Closed gyroknight closed 3 years ago

gyroknight commented 3 years ago

Because do_dma_copy() relies on regs.length to be 0 in order to properly wait for the ev_dma_copy event, it can cause a DMA transaction to happen on simulation start using random values since regs is not initialized on construction. Is this intended behavior? Seems like they should be set to the reset values in the constructor, or at least zeroed out; adding memset(regs.u32, 0, sizeof(regs.u32)) to the constructor stops this nondeterministic behavior.

franciscoIglesias commented 3 years ago

Dear Vincent,

A patch with a correction just got applied on the master branch: https://github.com/Xilinx/systemctlm-cosim-demo/commit/22e05b0ff353ea5ad9c9833cd6cc5ec6612a99ec.

Thank you for letting us know about the issue!

Best regards, Francisco Iglesias