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

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 116

  • @kancer5990
    @kancer5990 3 роки тому +14

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

  • @vantalane
    @vantalane Рік тому +3

    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  Рік тому

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

  • @richardcai4921
    @richardcai4921 2 роки тому +6

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

  • @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.

  • @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;
    }

  • @1DiscipleDragon
    @1DiscipleDragon 9 місяців тому

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

  • @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?

  • @brianbresnahan9718
    @brianbresnahan9718 3 роки тому +1

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

  • @ramazantemur9833
    @ramazantemur9833 3 роки тому +1

    It is a great video with clear explanations

  • @zhongzhengge5296
    @zhongzhengge5296 Рік тому

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

  • @카피카피룸룸-r8r
    @카피카피룸룸-r8r 4 роки тому +2

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

  • @michalorek195
    @michalorek195 3 роки тому +1

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

  • @dheerajchumble5602
    @dheerajchumble5602 3 роки тому +1

    Very nice video. Please make more such videos.

  • @jinli5391
    @jinli5391 3 роки тому

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

  • @johnsonhu5605
    @johnsonhu5605 2 роки тому

    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.

  • @fw3mbedded598
    @fw3mbedded598 2 роки тому

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

  • @ejonp
    @ejonp Рік тому

    Thank you for a very understandable explanation of this.

  • @eoin7049
    @eoin7049 3 роки тому +8

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

  • @Carlos-yg9ir
    @Carlos-yg9ir 3 роки тому +1

    extremely helpful video. thank you!

  • @miladdalim1
    @miladdalim1 2 роки тому

    Great content and explanation

  • @alexgian9313
    @alexgian9313 2 роки тому

    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...
    😀

  • @shri__can
    @shri__can 3 роки тому

    Great tutorial for beginners! Thank you!

  • @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.

  • @PowerDevicesandCircuits
    @PowerDevicesandCircuits 3 роки тому +1

    Wonderful tutorial. Thx

  • @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 2 роки тому

      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 2 роки тому

      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

  • @Epikmanager
    @Epikmanager 3 роки тому +1

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

  • @tahirsengine
    @tahirsengine 4 роки тому +2

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

  • @s514862
    @s514862 4 роки тому +2

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

  • @totolovesunsun
    @totolovesunsun 3 роки тому

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

  • @shinzon0
    @shinzon0 Рік тому

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

  • @Chris-hi2hn
    @Chris-hi2hn Рік тому +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  Рік тому

      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  Рік тому

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

  • @jorgerive7335
    @jorgerive7335 11 місяців тому

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

  • @saravanakumar8313
    @saravanakumar8313 2 місяці тому

    Great sir you saved me.😊

  • @Alright4good
    @Alright4good 9 місяців тому +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  9 місяців тому

      Haha thank you! Im glad you enjoyed it!

  • @JasperHatilima
    @JasperHatilima 6 місяців тому

    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  6 місяців тому +1

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

  • @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 Рік тому

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

  • @hassanmujtaba967
    @hassanmujtaba967 2 місяці тому

    hi, thanks for such nice video. can you make a video on spi interface through PS

  • @hassanhaq604
    @hassanhaq604 2 місяці тому

    Hi, I am having a problem while creating application project. I have followed both the parts carefully, but when creating a project on Vitis IDE, while selecting a template at 1:47 both the next and finish buttons are disabled except for the blank C and empty C++ project, and by doing so I do not have platform and configs libraries and headers

  • @tintinxyz
    @tintinxyz 2 роки тому

    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 ?

  • @mubasheer5584
    @mubasheer5584 4 роки тому +1

    Found the great one again ty 😊

  • @Min-w9t7k
    @Min-w9t7k 5 місяців тому

    Thank you for your video!

  • @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 2 роки тому

      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?

  • @dhanvinprajapati7049
    @dhanvinprajapati7049 10 місяців тому

    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 ?

  • @andreamodiano
    @andreamodiano 3 роки тому

    Bravo! Thank you Dom.

  • @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) ?

  • @AnupJal-t1l
    @AnupJal-t1l 4 місяці тому

    Hey @Dom I am doing a QPSK implementation on zedboard can i get any resources for this like how to implement sine waves and how to load serial data and how to add noise in fpga ....please if you can help that would be great.

  • @tahirsengine
    @tahirsengine 4 роки тому +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  4 роки тому

      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.

  • @tahirsengine
    @tahirsengine 4 роки тому +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  4 роки тому

      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.

  • @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...

  • @longwang3271
    @longwang3271 4 роки тому +1

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

    • @Dom-bo8wd
      @Dom-bo8wd  4 роки тому +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  4 роки тому

      *stdio.h

  • @焚琴煮鹤-y1t
    @焚琴煮鹤-y1t 3 роки тому

    This is really helpful!

  • @samifoery7498
    @samifoery7498 3 роки тому

    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!

  • @jairaja6924
    @jairaja6924 5 місяців тому

    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

  • @tahirsengine
    @tahirsengine 4 роки тому +1

    Was it microprocessor or microcontroller?

    • @Dom-bo8wd
      @Dom-bo8wd  4 роки тому

      Its a microprocessor :)

  • @mtboss4325
    @mtboss4325 3 роки тому

    Very helpfull. Thank you.

  • @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.

  • @XunLiu-k9d
    @XunLiu-k9d 4 місяці тому

    Hi, Dom. When you use XGpio_DiscreteRead() and XGpio_DiscreteWrite(). How do you know if you should use channel 1? Is it because in the AXI_GPIO IP you didn't enable dual channel, and the default channel is 1?

  • @mubasheer5584
    @mubasheer5584 4 роки тому +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

  • @VCodes
    @VCodes 3 роки тому

    superb.

  • @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 ?

  • @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!!

  • @alexandrosiii5676
    @alexandrosiii5676 4 роки тому

    Does this part involve transmitting data from ps to pl?

    • @Dom-bo8wd
      @Dom-bo8wd  4 роки тому

      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

  • @tr3kn3rd
    @tr3kn3rd 3 роки тому

    thanks for the videos!

  • @SB_Tommy
    @SB_Tommy 4 роки тому

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

    • @Dom-bo8wd
      @Dom-bo8wd  4 роки тому +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 4 роки тому

      @@Dom-bo8wd got it working thanks

  • @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

  • @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?

  • @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.

  • @382946rthu
    @382946rthu 2 роки тому

    Awesome

  • @alisalih9738
    @alisalih9738 2 роки тому

    Thank you so much

  • @myhofficiel4612
    @myhofficiel4612 4 місяці тому

    thank you sir !

  • @nikolaykostishen6402
    @nikolaykostishen6402 Рік тому

    Thanks a lot man!

  • @matthewjohnson3943
    @matthewjohnson3943 3 роки тому

    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?

  • @vishal_mesta
    @vishal_mesta 6 місяців тому

    Thanks my brother 🫂

  • @jajajaj666
    @jajajaj666 2 роки тому

    thanks!

  • @DvuongDo
    @DvuongDo 3 роки тому

    Thank!

  • @김성훈-r9c2q
    @김성훈-r9c2q 3 роки тому

    고마워요

  • @adrianamoreno2753
    @adrianamoreno2753 3 роки тому

    thanks!!

  • @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 😊

  • @chaoyangnz
    @chaoyangnz Рік тому

    Now it is Vitis IDE

  • @mdrezaulkarim47
    @mdrezaulkarim47 10 днів тому

    10.12.2024

  • @yacineyaker7485
    @yacineyaker7485 3 роки тому

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