ZYNQ for beginners: programming and connecting the PS and PL | Part 2

แชร์
ฝัง

ความคิดเห็น • 108

  • @kancer5990
    @kancer5990 2 ปีที่แล้ว +11

    Probably the best intro tutorial for Xilinx embedded flow I've seen.

  • @richardcai4921
    @richardcai4921 2 ปีที่แล้ว +6

    Thank you. This is a very detailed example of the basic interaction of PS and PL. Very inspiring

  • @brianbresnahan9718
    @brianbresnahan9718 2 ปีที่แล้ว +1

    Nice job explaining the basics of AXI and how it binds FPGA logic to the CPU. Thanks!!

  • @michalorek195
    @michalorek195 3 ปีที่แล้ว +1

    It was very useful! Thank you, and waiting for more!

  • @vantalane
    @vantalane 7 หลายเดือนก่อน +2

    Hey Dom, you're a hero and a blessing. Having someone someone walk you through everything you need is something I feel like lots of professional lecturers forget or don't realize to do. Although I've programmed before, due to not knowing how prepare the PL for use beside PS I've avoided Vivado at all costs. I will share this video and your channel to my peers. Thanks!

    • @Dom-bo8wd
      @Dom-bo8wd  7 หลายเดือนก่อน

      Thank you so much for watching and commenting! Im glad it helped ☺️

  • @SciHeartJourney
    @SciHeartJourney 3 ปีที่แล้ว +3

    I'm following from part 1. I just want to offer my thanks for this great video.

    • @abahadoran
      @abahadoran 3 ปีที่แล้ว

      Are you working with SDK or Vitis if I may ask?

  • @user-du2qy2xy5k
    @user-du2qy2xy5k 3 ปีที่แล้ว +2

    Thank you for the amazing video!! I'm waiting for another video to be uploaded.

  • @chinmayapanda9686
    @chinmayapanda9686 ปีที่แล้ว

    Thank you very much.
    I have followed both videos exactly as explained and changed the .xdc file of ZedBoard and it's working perfectly.

  • @johnsonhu5605
    @johnsonhu5605 ปีที่แล้ว

    Thank you, Dom. I'm quite frustrated after I tried the GPIO tests from other guys. I believed there is something wrong on their demo/code. You states the most important part step-by-step which helps me out. Hope it helps others from the beginning.

  • @SciHeartJourney
    @SciHeartJourney 3 ปีที่แล้ว +2

    I figured out how to use multiple switches with the XGpio commands. I took Dom's code and modified it a little here. I made my BTN, MY_SW and LED arrays are 2 bits wide. I'm sure there's a better way using "masks" to set and clear bits, but I wanted to make the fewest changes possible to make this example helpful.
    Thank you Dom for paving most of the path to success!
    #include
    #include "platform.h"
    #include "xgpio.h"
    #include "xparameters.h"
    #include "xil_printf.h"
    int main()
    {
    init_platform();
    XGpio input;
    XGpio output;
    int a; // a is the input to the NOT gate
    int y; // y is the output of the NOT gate
    // Initialize AXI Gpio
    XGpio_Initialize(&input,XPAR_AXI_GPIO_0_DEVICE_ID);
    XGpio_Initialize(&output,XPAR_AXI_GPIO_1_DEVICE_ID);
    // Code
    XGpio_SetDataDirection(&input,1,1);
    XGpio_SetDataDirection(&output,1,0);
    print("Running");
    while(1)
    {
    a = XGpio_DiscreteRead(&input,1);
    if (a == 1)
    {
    y = 2;
    }
    else if (a == 2)
    {
    y = 1;
    }
    else if (a == 3)
    {
    y = 0;
    }
    else
    {
    y = 3;
    }
    XGpio_DiscreteWrite(&output,1,y);
    }
    cleanup_platform();
    return 0;
    }

  • @tahirsengine
    @tahirsengine 3 ปีที่แล้ว +2

    what a enlightening piece of engineering. Thanks man. It was so compact yet so powerful.

  • @1DiscipleDragon
    @1DiscipleDragon 3 หลายเดือนก่อน

    thanks for the big picture explanation to help us all get on the same page of what is going on. It is really helpful.

  • @jinli5391
    @jinli5391 3 ปีที่แล้ว

    It is a good example for me,I just learned zynq for two weeks.

  • @alexgian9313
    @alexgian9313 ปีที่แล้ว

    Once again, many thanks. What a great set of videos!
    I think I'll try and do the whole thing in reverse (AND in software, NOT on PL) to see if I've retained anything...
    😀

  • @ramazantemur9833
    @ramazantemur9833 2 ปีที่แล้ว +1

    It is a great video with clear explanations

  • @dheerajchumble5602
    @dheerajchumble5602 3 ปีที่แล้ว +1

    Very nice video. Please make more such videos.

  • @miladdalim1
    @miladdalim1 2 ปีที่แล้ว

    Great content and explanation

  • @andreamodiano
    @andreamodiano 3 ปีที่แล้ว

    Bravo! Thank you Dom.

  • @shri__can
    @shri__can 2 ปีที่แล้ว

    Great tutorial for beginners! Thank you!

  • @zhongzhengge5296
    @zhongzhengge5296 ปีที่แล้ว

    Thank you for sharing this informative video. It was very helpful to me.

  • @Carlos-yg9ir
    @Carlos-yg9ir 3 ปีที่แล้ว +1

    extremely helpful video. thank you!

  • @totolovesunsun
    @totolovesunsun 2 ปีที่แล้ว

    Thank you so much, I am new to SDK. It is very helpful !!

  • @ejonp
    @ejonp 10 หลายเดือนก่อน

    Thank you for a very understandable explanation of this.

  • @Epikmanager
    @Epikmanager 3 ปีที่แล้ว +1

    You just saved me man. Thank you so much!!!

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Glad to help!

  • @mubasheer5584
    @mubasheer5584 3 ปีที่แล้ว +1

    Found the great one again ty 😊

  • @Alright4good
    @Alright4good 3 หลายเดือนก่อน +1

    my good man, you are the best teacher.🙏 all the documents i have been trying to understand for the past one week was a wast. how come they didn't make it as simple as this one?😭

    • @Dom-bo8wd
      @Dom-bo8wd  3 หลายเดือนก่อน

      Haha thank you! Im glad you enjoyed it!

  • @PowerDevicesandCircuits
    @PowerDevicesandCircuits 2 ปีที่แล้ว +1

    Wonderful tutorial. Thx

  • @eoin7049
    @eoin7049 3 ปีที่แล้ว +7

    Great video! Could you do a similar video using Vitis instead of SDK?

  • @fw3mbedded598
    @fw3mbedded598 ปีที่แล้ว

    thanks a lot .. following these 2 parts I was able to do the same things on a Zynq104 MPSoC Board [ Programmed via SD boot ]

  • @user-pw3jn2dz5e
    @user-pw3jn2dz5e 3 ปีที่แล้ว

    This is really helpful!

  • @SciHeartJourney
    @SciHeartJourney 3 ปีที่แล้ว +5

    The next step is to do a BSP, then create a boot-image. This is Tutorial #4 or #5 of the MicroZed Chronicles by Adam Taylor.

  • @s514862
    @s514862 3 ปีที่แล้ว +2

    Good tutorial!! I just follow this video and then I made it!!!!

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Glad you liked it!

  • @382946rthu
    @382946rthu 2 ปีที่แล้ว

    Awesome

  • @VCodes
    @VCodes 2 ปีที่แล้ว

    superb.

  • @nikolaykostishen6402
    @nikolaykostishen6402 ปีที่แล้ว

    Thanks a lot man!

  • @mtboss4325
    @mtboss4325 3 ปีที่แล้ว

    Very helpfull. Thank you.

  • @shinzon0
    @shinzon0 ปีที่แล้ว

    :DD Made me grin :D I just thought "ow, that's opposite of Atmel" and the you said it :D

  • @SciHeartJourney
    @SciHeartJourney 3 ปีที่แล้ว +2

    Very cool, I got all the way through this example using my MiniZed board. Now the next step is to create a FSBL and an image file, then set the QSPI (non-volatile memory) to boot up this code. This would complete a "Bare Metal" project.

    • @KasLewis
      @KasLewis ปีที่แล้ว

      Hey,
      I see you got this working with a MiniZed, I was wondering if you would/could share your code/project. I tried to do this with a MiniZed but I have the LED turning on only when I use the Arduino header (my SW2) connected to ground, the button (PS_PB) has no impact on the state of the LED.
      Whiling looking for the correct pin names I may have figured out some of my issue. I assumed the push button was the one I was using but I was using the PL_PS instead of PS_PB. I will update my code and verify when i get back to my board and update my comment here based on that outcome.
      K

    • @KasLewis
      @KasLewis ปีที่แล้ว

      Tested my board with my new insights and information with no success. The LED turns on when either SW1 or SW2 is low. This seems to suggest that I have it somehow setup as an IR gate instead of an AND gate.
      Any help, suggestions or sharing of your code/project would be very much appreciated.
      Thanks
      K

  • @tr3kn3rd
    @tr3kn3rd 2 ปีที่แล้ว

    thanks for the videos!

  • @alisalih9738
    @alisalih9738 2 ปีที่แล้ว

    Thank you so much

  • @tintinxyz
    @tintinxyz ปีที่แล้ว

    Thank you Dom !! u made the whole thing look like a breeze! can u pls let me know where can i get good useful info on the xilinx library functions ?

  • @DvuongDo
    @DvuongDo 3 ปีที่แล้ว

    Thank!

  • @jajajaj666
    @jajajaj666 ปีที่แล้ว

    thanks!

  • @samifoery7498
    @samifoery7498 2 ปีที่แล้ว

    Thanks for this video, it'll help me a lot for starting my hardware implementation. A question, if i'm using Vivado HLS for the FPGA design part. The first video is automatically generated or I need to configure the hardware part too ? From Vivado HLS, I have a packaged IP with Checkpoint format, can I use it directly on SDK ? Thanks in advance!

  • @jorgerive7335
    @jorgerive7335 6 หลายเดือนก่อน

    Great video, thank you! How did you select what core in the Zynq was to run the ‘Not’ code?

  • @joerit633
    @joerit633 ปีที่แล้ว

    Spectacular tutorial!!! Thank you for going into detail on all explanations ESPECIALLY the "C" programming part!!! I have really been struggling to find and documentation or anyone explaining as well as you did!!! Can anyone please direct me to documentation for the "C" part of the the SDK (VITIS)?
    Thanks again!!!

    • @Timanoin
      @Timanoin 11 หลายเดือนก่อน

      If you have found any documentation on that matter, I'm interested too. Thanks !

  • @adrianamoreno2753
    @adrianamoreno2753 2 ปีที่แล้ว

    thanks!!

  • @rushit04
    @rushit04 ปีที่แล้ว

    Great Video! I have one question, is it possible to use only programmable logic part of Zync 7000 chip without using ARM part of the chip (both I/O should directly communicate to FPGA fabric) ?

  • @dhanvinprajapati7049
    @dhanvinprajapati7049 4 หลายเดือนก่อน

    Thank you so much for such a great tutorial, but i dont have any fpga present with me, so how can i test my file ?

  • @user-rb6gw9th8s
    @user-rb6gw9th8s 2 ปีที่แล้ว

    고마워요

  • @shinzon0
    @shinzon0 ปีที่แล้ว

    For Vitis, you can disable a lot of stuff you don't need :D I have everything in a VM and cannot waste 100s of GB to spill my host... I think both Vivado and Vitis 2022.2 take around 86 GB for 7 Series (Arty A7, S7, Z7, ...) and another 60 for Petalinux and one linux project...

  • @SciHeartJourney
    @SciHeartJourney 3 ปีที่แล้ว +1

    One last request. This example uses a single discrete. Can you please show us how to do this same example using an array? For example, I was using 2 sets of switched and LEDs. This code worked, but only 1 of the LEDs responds to this code. I tried to alter it to make the variables arrays, but the DiscreteRead and DiscreteWrite functions don't like arrays. Maybe it's possible that another set of function exist that work with arrays.

  • @jairaja6924
    @jairaja6924 13 วันที่ผ่านมา

    can we do this without block diagram ??
    do the processing system have internal memory to store the program.
    and if ,we can store ,how much we can store in the internal memory

  • @mubasheer5584
    @mubasheer5584 3 ปีที่แล้ว +1

    Hi. Kindly proceed me link if you have made a video to create a bin file and how to boot from SD card.ty

  • @vishal_mesta
    @vishal_mesta 19 วันที่ผ่านมา

    Thanks my brother 🫂

  • @matthewjohnson3943
    @matthewjohnson3943 2 ปีที่แล้ว

    In your block diagram you are using M_AXI_GP0 from the Zynq IP, and M00_AXI & M01_AXI on the AXI Interconnect. In your C code you use XPAR_AXI_GPIO_0_DEVICE_ID & same with 1; I assume these GPIO_0/1 apply to the AXI Interconnect. What if you have M_AXI_GP1 as well? How with XPAR_AXI_.. does it know M_AXI_GP0 from M_AXI_GP1 to then specify the device ID? Or does it know based off the name of the AXI GPIO module? So if I call my AXI GPIO module led_lightshow (vs axi_gpio_0 & axi_gpio_1 in your example), my C code would be XPAR_LED_LIGHTSHOW_DEVICE_ID for the parameter?

  • @asifiqbal6437
    @asifiqbal6437 ปีที่แล้ว

    Hello Dear I have implemented the same project on my Zedboard. I am able to execute the project succesfully but I am no seeing any message "We are up" on the SDK terminal. Can you please guide what could be the reason ?

  • @longwang3271
    @longwang3271 3 ปีที่แล้ว +1

    Thanks, a great Tutorial. Should it be Xil_print?
    Really looking forward for your next video.

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว +1

      Xil_print.h is the library for the xilinx function "print()" which has less overhead than printf. If you just want to use printf than you only need stio.h

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      *stdio.h

  • @JasperHatilima
    @JasperHatilima 23 วันที่ผ่านมา

    Do we need the Cortex A9 to have an operating system (Ubuntu?) for it to function? I mean, the FPGA uses the bitstream to process signals. And therefore what processes the app built with C (the NOT operation)? If yes, did you have an SD card with some Linux of sort on your board as you demonstrated the NOT gate communicating with the AND gate in the video?

    • @Dom-bo8wd
      @Dom-bo8wd  22 วันที่ผ่านมา +1

      no operating system needed. Its just a bare metal program based off the "hello world" application which doesnt need an OS either.

  • @jankastbjerg4017
    @jankastbjerg4017 3 ปีที่แล้ว +2

    if this works for me, you have just in 2 videos explained simply, what a bunch of xilinx documents and tutorials complicates the heck out of :)

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Haha I know your struggle all to well 😅. I really hope it works! 1

    • @jankastbjerg4017
      @jankastbjerg4017 3 ปีที่แล้ว +1

      @@Dom-bo8wd it worked like a charm, so now i have some hope for my exams! :D

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Glad to hear it!! Thanks for watching!!

  • @Chris-hi2hn
    @Chris-hi2hn 7 หลายเดือนก่อน +1

    Great video, where did you learn how to do this? Can you point out any good learning material or other example projects? I'm attempting do do something similar but I'm looking to stream data to the Zynq and out over an ethernet port.

    • @Dom-bo8wd
      @Dom-bo8wd  7 หลายเดือนก่อน

      Thanks! I looked at an example of making an LED blink through the axi gpio, then just connected it to the PL to see if it would work and it did! I think stacy from FPGAforbeginners channel has an ethernet video?

    • @Dom-bo8wd
      @Dom-bo8wd  7 หลายเดือนก่อน

      This is one of the videos in her ethernet series. Maybe it could help? th-cam.com/users/livevs0rCiJ2kSs?si=19d0soTQbX0c2k2m

  • @tahirsengine
    @tahirsengine 3 ปีที่แล้ว +1

    One question: Launch on hardware means Programming the microprocessor? and program will be there even after power reset? Or does that mean just run that program on microprocessor and you need to do that again if power-reset?

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Launch on hardware means program the processor. The program will not stay after power reset unless it is stored in the flash or an SD card. Please view this link: reference.digilentinc.com/learn/programmable-logic/tutorials/zedboard-programming-guide/start
      Although you may not have this FPGA board, the process is very similar for most xilinx boards.

  • @SciHeartJourney
    @SciHeartJourney 3 ปีที่แล้ว +1

    Bummer thing: SDK is no longer available on versions after 2019.1. They've integrated everything into a new tool called Vitis. That's another learning curve I don't want right now though. I was trying to use Vivado 2020.2 and couldn't find SDK.

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Yes, I did watch a video on Vitis and it looks extremely similar to SDK as far as this project's flow. I need to play around with it.

    • @alexgian9313
      @alexgian9313 ปีที่แล้ว

      WHAT???!!
      Oh no, that's taken the steam outta me, I was just about to go and try it. On my 2022.2...
      OTOH, I have an older installation somewhere (the last one that worked with Windoze 7) can't remember the number offhand, 2016? 2019?
      Maybe that will work.
      PS. It's 2019.2. Damn. Wouldn't you know!
      Any good Vitis HLS videos about?

  • @tahirsengine
    @tahirsengine 3 ปีที่แล้ว +1

    To program FPGA and microprocessor(microcontroller?) permanently, what we need to do? Bit file program Flash of FPGA ? and what file goes in microprocessor(or this goes also in flash)?

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Okay, the FPGA and Processor share the same flash, however this is not on-chip boot memory like in an atmel chip. The bitstream file and software files for the processor are stored in the flash, and read when the board powers on.

  • @madhurajoshi5400
    @madhurajoshi5400 3 ปีที่แล้ว

    Hello Sir
    video was really helpful but i have completed the entire process till program FPGA in SDK.After the as you explained we have to do Run as and then Launch on hardware .After doing launch on hardware I am getting error as "AP transaction error,DAP status f0000021".After searching a lot also I couldn't able to resolve that .Please let me know how to solve it.
    thank you

    • @madhurajoshi5400
      @madhurajoshi5400 3 ปีที่แล้ว

      I am only getting .elf file but not .c file after launch on hardware step.

  • @rizwanarshad3844
    @rizwanarshad3844 ปีที่แล้ว

    on my zynq when I do run as -> launch on hardware, it throws error, Memory write error at 0x100000. APB AP transaction error, DAP status f0000021

  • @chaoyangnz
    @chaoyangnz 10 หลายเดือนก่อน

    Now it is Vitis IDE

  • @alexandrosiii5676
    @alexandrosiii5676 3 ปีที่แล้ว

    Does this part involve transmitting data from ps to pl?

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      It involves transmitting data from the PS and to the io pins using FPGA fabric. If you wanted to transfer the data from PS to PL, you can just hook up your RTL code to the Axigpio instance that is the output of the PS. Just one way of doing it

  • @FPGA_Frontier
    @FPGA_Frontier 3 ปีที่แล้ว

    why i got this error when i choose in available template Hello world? " This application requires a Uart IP in the hardware." whereas i am using zynq 7000 zedboard. is this problem with hardware or something else?

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      There are two uart cores in the zynq processor

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      You could try the other one and see if that gives you the same error

    • @FPGA_Frontier
      @FPGA_Frontier 3 ปีที่แล้ว

      @@Dom-bo8wd i solved that error, but my final output is not coming. i uploaded program successfully and i am also not getting message "we are up". is my uart is not working?

  • @SB_Tommy
    @SB_Tommy 3 ปีที่แล้ว

    how would i do the connection if the PL design have a clk?

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว +1

      You would do the same design, but add the clock port in your RTL module. Then, right click on that port in the block diagram, and select "make external." That will creat an external connection to your clock for the RTL that you can map to your clock pin using the xdc constraints file.

    • @SB_Tommy
      @SB_Tommy 3 ปีที่แล้ว

      @@Dom-bo8wd got it working thanks

  • @tahirsengine
    @tahirsengine 3 ปีที่แล้ว +1

    Was it microprocessor or microcontroller?

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      Its a microprocessor :)

  • @muhammadahmed-og9jq
    @muhammadahmed-og9jq 3 ปีที่แล้ว

    Switches are connected on PL, so it was controlled in verilog HDL by AND logic but how led connected on PL side can be controlled by PS through axi gpio since led is not connected on PS.

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      The AXI GPIO in this case is acting like an access channel connecting the PS through the PL to the LED. It is acting similar to a wire running from the PS, to the PL out the IO blocks to the LED. Please ask more questions if you are still confused.

    • @muhammadahmed-og9jq
      @muhammadahmed-og9jq 3 ปีที่แล้ว

      Got the point. Thanks

    • @muhammadahmed-og9jq
      @muhammadahmed-og9jq 3 ปีที่แล้ว +1

      I can use output of PS (led) in PL(input) and make some decision in PL verilog code and then switch another led in PL ?

    • @Dom-bo8wd
      @Dom-bo8wd  3 ปีที่แล้ว

      @@muhammadahmed-og9jq yes. If I understand your question you have a few options here.
      1). You can just tie another LED output to the axi gpio instance, and that will make two LEDS come on at the same time.
      2). You can double click on the output axi gpio and enable a dual channel. I am not sure if both channels can be outputs so you need to do some research. Then you have to change the software around but basically you could have one axi gpio instance controlling two LEDS.
      3). You can instantiate another axi gpio block in the block diagram and use that.
      4). You can take the output of the existing axi gpio output instance and route it (in the block diagram) to an LED, then also route it to some more RTL code that you create. The output of that RTL code you can then map to another LED. To insert the RTL into the block diagram, remember you must have the block diagram open in vivado, and right click on your RTL file in the "sources" tab, then click "add module to block diagram."
      Thanks and I hope this helps 😊

  • @yacineyaker7485
    @yacineyaker7485 2 ปีที่แล้ว

    I guess u could have just wrote:
    Write(&output,1,!read(&input,1));