07-19-2018 12:21 AM
Hi guys, I am planning to build a ZYBO Led Blinker controlled by ethernet communication. Essentially, what this means is that I will be controlling the blinking speed of the led on the zybo through ethernet communication. Regarding this, I would like to get some advice on how I should build the c code. I already am able to send data through TCP/IP and get it to light up the way I want it to be, meaning if I were to put 1100, the led would light up in the sequence. Sorry if this is unclear as I am new to this.
07-19-2018 12:43 AM - edited 07-19-2018 12:47 AM
Regarding this, I would like to get some advice on how I should build the c code.
Is it a must that you want to do it using C code?
This functionality can be achieved purely using the PL side.
Use the Xilinx TEMAC core (paid) or axi_eth_core (free but supports only 10/100 Mbps). RAW Ethernet frames can be used, you don't need a TCP/IP stack.
Send frames from your PC to Zybo (min length frames should suffice to pass your control info for the LEDs) Ethernet port. The Rx buffer placed after the MAC core will be filled with the frames as you send them. Now all you have to do is write a small state-machine to read out the frames from the Rx buffer, decode the control info (this should be the Payload part of the frame) and send out this info to the LEDs.
In-fact the example_design for the TEMAC core (the bitstream with the MAC core will run for a couple of hours, I think it can suffice as a proof-of-concept demo) comes with the Rx buffer built in. You can re-use that and just write code on how to read out from the rx buffer and so on.
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem
07-19-2018 12:53 AM