When using Simulink External Mode with an AXI4-Stream IIO Read block, if the timeout value is greater than zero, it cause the simulation time to be slower than actual time
Show older comments
Hello
I started implementing AXI4-stream IIO Read block and HDL FIFO block to aqcuire the ADC sampling data in externl mode.
ADC Acquisition(SPI interface) is designed with HDL Coder
The ADC sampling Hz is hundreds of times that of external mode sampling(1kHz).
So, frame size of HDL FIFO has a value of several hundred.
When the time out value of AXI4-Stream IIO Read block is greater than zero, Time goes slowly waiting for the results of AXI4-Stream IIO Read block. And the valid output of AXI4-Stream IIO Read block is false. The time out value is set to 10 seconds.
I don't know why AXI4-Stream IIO Read block can't read the data even though it's a long time out.
But, Sometimes it worked properly and I saw the desired result. I think it is unstable.
One suspect point is that this may happen if the data size is too large.
It was designed by referring to the link below.
Accepted Answer
More Answers (1)
Kiran Kintali
on 1 Apr 2023
0 votes
The timeout behavior is expected, the timeout leads to overrun in the software task and so the time step will get out of sync with real time. There may be an issue with the hardware design. Please check the problematic logic around the FIFO or sorrounding logic.
Categories
Find more on Code Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!