This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x ICSS EMAC LLD driver collision queue

Guru 10570 points

Hi,
I have a question about ICSS EMAC LLD driver of ISDK v2.01.01.02. - lld/icss_emacDrv.c ICSS_EmacRxPktGet()
I am refering ICSS EMAC LLD developers guide as follows:
processors.wiki.ti.com/.../ICSS_EMAC_LLD_developers_guide

How does the Collision Queue work?

I guess collision may occur when port1 and port2 receive data simultaneously and give notice to the host, because there is only one queue in host.
then one of two recieve data(port1 or port2) is saved into the collision queue.
Actually in our exam, we can observe the work of reading from collision queue frequently.

Is my understanding right?

Best regards, RY

  • Hi,

    I will forward this to the ISDK team.
  • Hi RY,

    Which firmware are you running? Is it in EMAC mode or Switch Mode?

    Regards,
    Anjandeep
  • Anjandeep,

    Thanks for your response.

    Firmware .. Profinet
    I am checking regarding mode now. Please wait a while.

    Best regards, RY

  • Anjandeep,
    We are using Switch Mode.
    Best regards, RY
  • Hi RY,

    Your understanding is correct. In Switch Mode, collision/queue contention happens when both the PRUs or a PRU and Host want to acquire the same queue at same time. It can happen as follows:

    Queue Contention on Host Queue:
    Queue contention happens on a host queue when both the PRUs try to acquire the same queue (for example, queue 3) to store a frame at the same time. Only one PRU can hold the queue at one point of time. Lets say, if PRU0 takes hold of queue 3 first, PRU1 will then store in the collision queue and vice versa.

    Queue Contention on Port Queue:
    Queue contention happens on a port queue when Host and PRU try to acquire a queue to store the frame at the same time. This can happen on the queues of both the ports:
    • On Port1, contention can happen between Host and PRU1.
    • On Port2, contention can happen between Host and PRU0.

    Queue Contention Resolution
    When queue contention happens then one of the core will store/queue the frame in the collision queue. Frame stored in the collision queue has to be moved to the main queue. Host always receives the frames through the four 'host receive queues' and frames are always transmitted from the four 'port transmit queues' on both the ports. So, if there is a frame waiting in collision queue of Port1 then it is moved to one of the transmit queue of Port1 by the PRU1. If there is a frame waiting in collicion queue of Port2 then it is moved to one of the transmit queue of Port 2 by PRU0.

    Collision queue can have maximum one frame at a time.

    Regards,
    Anjandeep