MicroBlaze and Ethernet based design on Xilinx Artix 7 evaluation board (AC 701) and Vivado
ฝัง
- เผยแพร่เมื่อ 28 ส.ค. 2024
- This demonstration shows how to create a Ethernet based application on Microblaze processor using FreeRTOS operating system and lwip IP stack.
Previous video on Microblaze and UART:
• MicroBlaze Hello world...
This video is made based on my personal experience, only to help beginners and does not guarantee correctness. Please comment if anything needs to be corrected.
I find it helpful to frequently use the 'Regenerate Layout' button to redraw the block design. It re-draws the design to make it easier to read and it shows the signal flow from left to right.
Very nicely done!
Excellent tutorial.
One question, did you notice that your implementation returned a negative WNS score? Isn't that something one should take care before porting one's design on FPGA??
There is almost 1.3MB of block memory available in the Artix 7 200 on the AC701 board. You don't need external DRAM for small applications.
True. If your application including stack and heap is small enough to fit in to 1MB, you can use BRAM. If you are not using lwip, freertos, jumbo Ethernet frames, then it can easily be made less than 1MB.(And ofcourse if you are not planning to use any BRAM consuming RTL logic/IP core in your design)
@@letslearn39 I'm using the Full FreeRTOS+TCP stack with all features enabled. Turned off Jumbo frames, and still can build and debug with -O optimization. (Don't know why Xilinx/AMD keep pushing this trash LWiP stack...) Would still love to have a short FIFO for my application instead of the complexity of DMA, for my simple application.
I followed the same, but it doesn't work. The HW goes up to VITIS, but if you run it with Echo Server Terra, it will not change from a black screen. I added the xdc file separately, is there anything else I need to add? I would really appreciate it if you could answer. The version is 2022.2.
Hi keep up the good work!
Do you know where i can find video on TI 100Base-TX Ethernet implementation on zynq?
superb!!!
I'm still wondering if anyone has successfully used the FIFO connection instead of DMA for this IP? I have yet to see it work on my end.
I followed this tutorial exactly in Vivado 2021.2 but I get some timing constraint errors.
[Timing 38-282] The design failed to meet the timing requirements. Please see the timing summary report for details on the timing violations.
WNS -0.622 and TNS -265.714 Failing Endpoints 1732 ...
Very good tutorial!! Thanks for sharing
I would have probably been more useful for me a more versatile bare metal app than rtos....but very good anyway
The reason why I went for an OS is, lwip supports the SOCKET mode only with OS. Application development becomes much easier in SOCKET mode, as you can use the standard socket programming functions.
Hey man, thanks for this amazing tutorial ,
I ve follow it step by step and in the end, when i m waiting for PHY to complete autonegotiation i get this message :
unable to alloc pbuf in recv_handler lwip
is there a way to fix it ?
thanks
For those who have the same problem try to increase the pbuf_pool_buf_size ing the "modify this BSP's Settings" under pbuf_options
Again thanks for the amzing tutorial
Zak
Just a quick question. Would this also works for Standalone OS? If yes, what is the reason behind you used FreeRTOS?
Yes this will work with standalone mode as well. The reason I used FreeRTOS was to configure lwip (TCP/IP stack) in SOCKET mode. Once lwip is in socket mode, you can use the standard socket programming APIs to develop your applications. In RAW mode you have to use lwip specific APIs.
please do more videos on vivado artix 7
Sure..
@@letslearn39 I have seen the implementation in the given below link. please refer and make a video with help of this
reference numato.com/kb/100m-ethernet-example-design-for-neso-artix-7-fpga-module/🙏🏻🙏🏻🙏🏻
Hey, really video helps a lot to start with Xilinx FPGA. I am planning to do create JTAG Debugger using ARTIX-7, do you have any reference links or something that help to start with.
Thank you very much, worked for me i have configured ethernet port of zc702. Now can you tell me is possible to read received data from PS to my PL part. I want to see received packet data using ILA??
A simple way to transfer data from PS to PL would be to interface both using a Block RAM configured as Dual Port RAM in BRAM controller mode
Hi, did u need any licence for the eternet ip core for this design ? I have the same board but i was not able to fully generate the bitstream because of some licence issue related to the ethernet ip core. Thanks for this tutorial
I faced the same licensing issue when I was running Vivado on Ubuntu. But the same design worked well in Windows.
@@letslearn39 Hi, I am using Windows but it gave similar error, Do you know how to solve this issue? Do we need license for that?
@@1800haseeb You probably need a valid license for this. I am operating on a university license. If its not available you can try the design with evaluation license from Xilinx. You can get the evaluation license for Ethernet MAC from www.xilinx.com/products/intellectual-property/axi_ethernet.html
Hi shall i set my project as this project to get job and this project is helpful for my interview?
Sir please teach how to use and change user programmable clock in AC701 evaluation kit
You just need to add a clock wizard ip in your design and then you can generate the required clock
😊😊
I ve follow it step by step and in the end when I m waiting for displays to print IP address of the evaluation board on TERA TERM. nothing is displayed on tera term. am using sp701 spartan board
Hey, I have the same problem. Do you have a good ideal? Thank you very much!
I'm curious as to why you're using an old version of Vivado and SDK? Vivado and Vitis 2020.x are available.
:-) There is no specific reason. Just continuing with what was already available in my PC. For versions up to 2019.1 the procedure is identical. From 2019.2 onward Vitis started and the software development flow is slightly different. I have put out a video about hello world program on Vitis in my channel. Since more people are still using SDK I am doing more demos in SDK.
Hi,
Around 10:00, you're mentioning that we want to run the application from external DDR3 memory. But after that, you never come back to this point. So is the application effectively running from that DDR memory? If so, how is it loaded there?
If not, in video th-cam.com/video/cxl7Hh6TNb4/w-d-xo.html you're using the SREC SPI bootloader to download this application from flash into DDR. But DDR memory resides at 0x8000000 whereas the BRAM is located at 0x0. So I'm assuming that a change is needed to link the application correctly for that change in address space, but I couldn't find where that's happening.
Or maybe the address memory 0x80000000 is automatically mapped towards 0x0 by the SREC SPI bootloader (I remember from STM32 that this is done automatically somewhere in the bootloader).
I hope my question is somewhat clear?
In the meanwhile, I've understood that this is fully under control of the linker script. Furthermore, it's indeed vital to first generate the DDR3 controller before generating the microblaze processor. In that case, the linker will automatically select DDR3 memory to put the application in. And it's possible to revert back to BRAM.
I first added DDR3 memory on top of an existing microblaze design, and I never managed to get it working from DDR3 (and the linker automatically selects BRAM when creating the project). That's the sign that something is wrong. Possibly, the microblaze generation needs to happen after the DDR3 generation, so that the microblaze can immediately pick up the correct memory blocks and use DDR3 as default.
how the interrupt handlers are configured in sdk?
u r directly compiling and showing the ouput.
If you are using lwip stack in your application(which is the case in this demo), you need not manually configure interrupt handlers. It will be taken care by the Xilinx port files of lwip. Manual configuration is required only if you are developing a bare metal application without any TCP/IP stack.
@@letslearn39 thanks for the reply. lemme check this.
Haii.. Dude iam using ZC706.. I tried to implement Ethernet by using phy sfp, with Microblaze iam not able to generate bit file..till implementation it is happening.. When ever iam trying to generate bit file it showing error kind of xdc file. After that I entered two commands through tcl. Then bit generated. But when I was loading to FPGA through sdk then it is showing there is no ps in the design what could be the reason please tell me.. After that I need to go custom board..
Please note that Zynq is an SoC FPGA where Processor is the master and it is the PS which configures the PL. Even if you need only resources from the PL, PS needs to be initialized for booting the PL. For PL only design you can refer to the attachment in the following link taken from Xilinx forum
forums.xilinx.com/xlnx/attachments/xlnx/EmbBoot/14/1/Zynq_PL_Only_DesignNote.zip
Note: I have never tried this configuration
Nice tutorial sir. How can i do this with my custom board based on artix 7 50t. Please let me know.
Procedure for custom board is same except that you have to manually assign the pin details for your MAC-PHY interface and DDR interface in the XDC file.
Hey man, thanks for your video, i found that quite helpful, Now i'm trying to send my XADC data through Ethernet but i don't know how should i merge my independent XADC project with lwip and how can i do modification on lwip part?
Thanks in advance
You need not modify anything in lwip. In Vivado add XADC block in to the Ethernet based design. Directly read the XADC data using XADC APIs, copy this data in to your Ethernet packet payload and send. Please note the MIG block is internally using XADC for temperature compensation. So you need to reconfigure MIG to exclude the instantiation of XADC and connect the temperature port of your XADC block to the MIG temperature port.
@@letslearn39 Thanks for your response my friend but i didn't get the point and following question comes up for me :
1. which Ethernet based design you mean? There is no any ethernet based design, i want to use ethernet ability in my "exist XADC" design.
2. I don't understand why you are talking about MIG block because i don't using any external DDR3/4 in my exist design.
@@letslearn39 and something that i have to mention, I'm using zynq SoC device and i do not using microblaze.
@@emadmojaveri1404 Oh!! That should have been the starting point. Since you posted the comment under the Microblaze based design, I assumed you are using MicrBlaze..
@@letslearn39 YES, i've guess you don't know that and i have to mention it at the beginning, i was looking for zynq+ethernet videos that reach out to your video, it looks pretty close but still there is some differences that must be considered
Can you show the coding part of sending a packet data and receiving the packet data . Thanks in advance.
Sample Ethernet programs are available in xilinx SDK itself.
By using AXI ethernetlite block we can do this?If yes please make a video or please send me the implementation design.
Ethernet lite MAC supports only 10/100 speeds and MAC PHY interface is MII. But in AC701 board it is using RGMII for MAC-PHY interface. So I am not sure whether it will work on this board. I have never tried it.
@@letslearn39once try 😯
@@Kalyannik No luck. Refer UG952 Page 41::"The board supports RGMII mode only". Ethernet Lite wont work.
Could u please do a video on axi ethernet IP provided by xilinx to send updates packets with vhdl code
I have seen the implementation in the given below link. please refer and make a video with help of this
reference numato.com/kb/100m-ethernet-example-design-for-neso-artix-7-fpga-module/🙏🏻🙏🏻🙏🏻
how to transfer data packets
Write a simple socket program to transfer the data packets. You can find number of example programs in internet
How do I cope up with this..
I am a beginner
Do you really require Ethernet in your application? Otherwise you can watch other simpler videos to get started with vivado and Processor based design.
Hey dude can I use this method for my custom borad
Yes. You need to create the XDC files as per your custom board.
How to write to you on social media to talk about fpga?
write to me at letslearnembedded@gmail.com
can i have de code sir , can you send it on my email please ! thank you
please send a test mail to letslearnembedded@gmail.com
@@letslearn39 ok