cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
505 Views
Registered: ‎04-03-2018

DMA descriptors of Rx frames are being overwritten

Backgraound: I am using Ultrascale MPSoc+ hardware for Ethernet testing (GEM2 is being used presently). I have configured Rx buffer length as 512 bytes and total number of Rx buffers as 4. Extended descriptors are not being used as time stamping and 64 bit addressing is not used so only Word0 and Word 1 is used.

 

Testing scenario: I am sending 400 bytes initially and calling Eth_Receive API (Autosar API)  to process the same frame. Next, the descriptor index gets incremented and I am sending 1236 bytes which gets updated in the subsequent 3 descriptors. Now the wrap around bit of word 0 4th descriptor is set as a result when I send 400 bytes again, the first descriptor is re-used. After this I am sending 400 bytes 3 more times.

 

Issue: Under such circumstance, descriptor which already contains 1236 bytes of data i.e. descriptor 1 (Start Bit is 1 and Used bit is 1)  , descriptor 2 (Used bit is 1)  are over written by new frames received by the GEM i.e. frames consist 400 bytes but  descriptor 3 ( which also contains data of frame having length 1236 , End bit is 1 and Used bit is 1) is not over written by frames having length 400 bytes.

 

Question: Is this a know issue in the HW? and how GEM allows to over write the data all descriptors used bit is set to 1 (which means access of descriptor is with Application not with controller)

 

Seq1_Descriptors_Init.png
Seq-2_Desc_1126.png
Seq-3_Desc_Overwritten.png
0 Kudos
1 Reply
Highlighted
Moderator
Moderator
448 Views
Registered: ‎07-31-2012

Re: DMA descriptors of Rx frames are being overwritten

Hi @varsha_bosch,

 

Looks like you are using AUTOSAR APIs.

Do you have chance to use baremetal APIs provided by Xilinx?

 

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos