Zynq_UDP icon indicating copy to clipboard operation
Zynq_UDP copied to clipboard

How to transfer "Packet Buffer" from SDK (PS) to Vivado (PL) side?

Open wSafwan opened this issue 2 years ago • 5 comments

I have successfully implemented this code on zedboard and monitored the packet over Wireshark. Now I want to process the packet on the PL side. Could you help me with how can I transfer the packet from PS to the PL side?

wSafwan avatar Aug 23 '22 02:08 wSafwan

Take a look at my github repository "VGA_mem_mapped"  It shows two different techniques for moving data from the CPU into the logic fabric. Good luck,Del

On Monday, August 22, 2022 at 07:39:12 PM PDT, wSafwan ***@***.***> wrote:  

I have successfully implemented this code on zedboard and monitored the packet over Wireshark. Now I want to process the packet on the PL side. Could you help me with how can I transfer the packet from PS to the PL side?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

delhatch avatar Aug 23 '22 06:08 delhatch

Actually, the VGA is too complicated. It has the Zynq CPU write to DRAM, but then the transfer to PL is done via DMA. Fast, but complicated.

For simple transfers, see the "IIR_EQ" repository. The CPU writes to addresses that the PL reads up directly. Good luck.

On Monday, August 22, 2022 at 07:39:12 PM PDT, wSafwan ***@***.***> wrote:  

I have successfully implemented this code on zedboard and monitored the packet over Wireshark. Now I want to process the packet on the PL side. Could you help me with how can I transfer the packet from PS to the PL side?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

delhatch avatar Aug 23 '22 06:08 delhatch

@delhatch Thank You for Giving Me Your Valuable Time. 👍👍

wSafwan avatar Aug 24 '22 16:08 wSafwan

Hi @delhatch , I have successfully implemented the Zynq_UDP by monitoring the packet over Wireshark (as I told earlier). I have defined an array in "main.c" i.e. " volatile u8 packetBuffer[EthBytesReceived]; ". I tried to copy the received udp packet to my packetBuffer[] using this command in "echo.c" i.e. "memcpy(packetBuffer, (u32*) p->payload, EthBytesReceived); " But it is giving me an error on building project.

I would be very grateful to you if you help me in copying the incoming udp packet to my custom packetBuffer array.

wSafwan avatar Sep 26 '22 16:09 wSafwan

I'm not a C expert. Since you are receiving bytes, wouldn't you need to re-cast the pointer to u8 instead of u32? Like: (u8*) instead of (u32*) Maybe (uint8_t*) or (u8_t*), whatever the compiler understand. I hope this helps.

delhatch avatar Sep 26 '22 22:09 delhatch