Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

lwIP image transmission on Zynq

Status
Not open for further replies.

theUltimateSource

Junior Member level 1
Joined
Dec 11, 2017
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Location
Europe
Activity points
216
hello,

I am working on a Zynq SoC from Xilinx (FPGA + A7) and want to transfer images to the PC.

xapp1026 provides a reference design for an http webserver using lwIP, as a bare metal application. After some modifications I am now able to send and receive simple HTTP POST messages to control my zynq board from the PC via 1GbE using the MAC on the ARM. I am also able to transfer images from my board to the PC.

I'd like to ask for some advice for some modifications on my current work:

The size of my ethernet frame buffer is 1kB. To overcome this limitation I am pointing to the image frame buffer, instead.
Since lwIP is taking care of packet splitting to meet MTU I am assuming that I can provide any number of bytes to be send using tcp_write().

The messages need to be stored in a buffer befor send over lwIP. Since I already have a tripple frame buffer for my video stream, it certainly would be conveniant to point to that data directly instead of copying it to another location. Therefore I generated the HTTP message header imediately before the video frame buffer. I found that I cannot send the entire image frame with a single tcp_write(). When I send it with multiple calls I need to generate the header every time, which is overriding the pixel data in my buffer. This is not a problem for me, but I wonder if I should rather use a seperate DMA, instead.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
// create a HTTP header POST message, store in memory right before frame
len = generate_http_header((char *)(frameBufferStartAddress-headerLength), "js", length);
 
// update length of payload, in bytes
len += framelength;
 
// create TCP packets from bytes in memory
if (tcp_write(pcb, (char *)(frameBufferStartAddress-headerLength), len, 1) != ERR_OK) {
    printf("error writing http POST response to socket\n\r");
    printf("http header = %s\r\n", buf);
    return -1;
}



I'd appreciate any comment, advice or reference,

thank you
 

The often scenario is the DMA transfer from PL to external memory (e.g. DDR) and then transfer from DDR to PS.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top