Forum Discussion
Hi Wincent_Altera ,
Thanks for your explanation regarding the queue reset timeout. We will increase the timeout value as suggested.
However, we are currently observing a different issue during runtime testing.
Previously, all channels were working correctly in D2H mode when initialized one by one. But now, during testing of same design and same application with/without timeout added:
- When we initialize Channel 1 -> it works fine.
- When we initialize Channel 2 -> it starts reading initially, but after 1-2 seconds, DMA gets stuck.
- If we stop Channel 1 -> Channel 2 immediately resumes normal operation.
Please provide insights regarding the same.
I have a few questions regarding MCDMA behaviour as well:
- How does channel scheduling or balacing work internally in multi channel mode in AVMM configuration? Is there any mechanism and how to configure it, or do we need to manage balancing from software?
- Is it possible for one active chanel to starve other channel requests (e.g., due to descriptor fetch or AVMM bandwidth sharing)?
- We also observe that during each channel initialization, the queue reset sequence for each new channel initialized takes even more time.
Please provide concrete reasoning.
Regards,
Ashoo
Hi Ashoo ,
Based on my understanding..
Question 1 - The behavior where Channel 2 gets stuck when Channel 1 is active, but resumes once Channel 1 stops, is classic evidence of resource contention or starvation. This typically happens at the memory bus (AVMM) or descriptor fetch interface, where one channel monopolizes shared hardware resources, preventing others from proceeding.
Question 2 - MCDMA typically using round-robin for channel access. This can depend on your IP configuration, but in most cases, the arbitration policy is not designed for strict fairness or bandwidth balancing.
Question 3 - As more channels are initialized, each new queue reset takes longer. This is likely due to the reset logic waiting for access to shared hardware (e.g., AVMM, state machines, FIFOs). These delays are aggravated when other channels are active and holding bus resources.
Hope that able to help you to move forward.
I am just trying to share some experience based on what I understand from your issue, do correct me if there is anything I misunderstand.
Regards,
Wincent