element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Blog Summer of FPGA, Workshop 4: Elaborating on the workshop design
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
FPGA requires membership for participation - click to join
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Andrew J
  • Date Created: 27 Aug 2021 6:02 PM Date Created
  • Views 1162 views
  • Likes 3 likes
  • Comments 4 comments
  • ultra96-v2
  • click mezzanine
  • summer of fpga
Related
Recommended

Summer of FPGA, Workshop 4: Elaborating on the workshop design

Andrew J
Andrew J
27 Aug 2021

Introduction

Workshop 4 of the Summer of FPGA series for the Ultra96-V2 board went through a design for using the Mezzanine Click board.  It was covered 'at pace' and this blog is my jottings on the steps taken, specifically elaborating on some of them with more information.  Really, I'm providing them for others to get some of the insights I gained whilst re-creating the design from scratch.

 

You should watch the Video associated with this workshop and read this blog in tandem as it isn't recreating all the steps that were taken.

 

The steps I run through below were completed with Vivado 2021.1 on Ubuntu 20.04.

 

Initial Problem

The intention was to start from the hardware design that was created in Workshop 2.  This was a very simple setup with the Zynq PL with just the clocks connected - absolutely fine for a Hello World application.  I found that when I opened that particular project and dropped the UART IP on to the Block Diagram, Vivado just hung and nothing happened: the only recourse I found was to kill the Vivado process.  At least one other person had the same issue and it may be specific to the OS/Version used: Ubuntu 20.04 and Vivado 2021.1.

 

To resolve this I created a new project, from scratch and on the Block Diagram, dropping the Zynq and UART IP before doing anything else.  From there, the Board Automation and Connection help can be used to end up with the design as it stands early on in the workshop.

 

Another approach I thought of, but didn't try, was to Right Click on the design file and Reset Output Products and then drop the UART IP.  The issue may be related to having already gone through synthesis, implementation and generating bitstream.  I'm guessing here but if this works for you, please comment below.

 

image

 

You will also find that when you drop the UART IP on the board design, you get an Info message in the TCL Console stating that there's no Compatible Board Interface found.   I don't know what this is TBH, but you can ignore it.

 

Mezzanine Board

My board came with bent header pins which required judicious straightening.  I also saw that pins 7 and 8 of U6 were bridged with solder.  From the schematic, these pins are actually connected anyway so it wouldn't be a problem but you may want to carefully check your board.  The schematic is linked below.

 

Mapping the Pins

You will need to map the Mezzanine header pins to the Ultra96-V2 header pins to the PL pins and this is described in the video.  You may find the following links useful:

 

Ultra96-V2 Schematic

This is on the Element 14 site, but you must download it.  Don’t view it in on-line viewer as not all schematic markup shows - you won't find the right PL pins for example.

 

Mezzanine schematic

This will give you an overview of the circuit as well as all the header pins.

 

Creating and Connecting the Ports

As the design progresses, two ports are created for the RX and TX of the UART IP and for one of them, a TCL command is used:

 

set_property -dict [list CONFIG.PSU__USE__M_AXI_GP1 {0}] [get_bd_cells zynq_ultra_ps_e_0]

 

This disables one of the High Power Mode Axi Master ports, specifically M_AXI_HPM1_FPD?  This can be done through the Re-customise IP dialog - double click the Zynq IP:

 

image

 

The question I had though was: how do you relate the parameter value CONFIG.PSU__USE__M_AXI_GP1 (0) to Interface M_AXI_HPM1_FPD?  Master AXI is easy of course, but GP1 to HPM1_FPD?  Is there a document that gives the name translations?

 

There is a TCL command document you can find online or in DocNav for the basic command structure but the way I could relate these particular values was with the Zynq UltraScale+ MPSoc Processing System V3.3 Product Guide.  Observe the link 'Documentation' at the top of the Re-customise IP dialog shown above. Click on that and select the option 'Product Guide'.  Appendix C has the parameters that can be used, e.g. PSU__USE__M_AXI_GP1.  Appendix B has the port descriptions and searching for HPM1 gives Table B-45: M_AXI_HPM1_FPD which has contents related to GP1.   That’s the only way of matching I can find.  It seems a little convoluted and potentially error prone so if someone knows better, please comment below.

 

I also had a further question: how do you know it is SIN and SOUT on the UART IP that needs to be used - a not unreasonable expectation is that the ports would be labelled RX and TX?

Again, look at the Product Guide for the UART IP.  Double-click the IP to bring up the Re-customise IP dialog and select the Product Guide from the Documentation link at the top of the dialog.  You can find port descriptions there which clearly indicate SIN and SOUT are what is needed.

 

Constraints

Moving on, the created ports must be constrained to the specific PL pins identified earlier in the video.  The simple approach is as described in the video: copy the relevant entries from the Master Constraints document provided.  That, however, doesn't really help in understanding how to set up constraints but there is an alternative route.  You must have a top level file - create the HDL wrapper first, assuming the Output Objects have been generated.  Also, follow the video to create a Constraints file and make it the target - this option appears when you create it.  DO NOT have it open in the editor as it is going to be updated by Vivado.  Under RTL Analysis > Open Elaborated Design select Schematic.

 

image

 

This will open Elaborated Design and a simple schematic of the design. Use the Layout menu and select I/O Planning.

image

This will add a tab or two at the bottom of Vivado, assuming you haven't moved the IDE panels around, and should populate the two pins that need ‘planning’ on the I/O Ports - you may need to open up some of the hierarchy.

image

 

 

In here then, you can select the package pin, the bank and the IO Standard (power) for the pins as determined from the Ultra96V2 schematic and Mezzanine schematic, essentially, the same values as used in the workshop video/master constraints file.  Save the Elaborated Design and these entries will be added into the constraints file: note that the syntax is slightly different to the video which is likely to do with advances in the tools since that master file was created.  You can then close Elaborated Design.

image

 

Creating Custom IP

I've created a separate post for this as it's interesting enough in its own right, and way too long to incorporate into this one.  Working it out has given me a good insight into how I might create my own IP.

 

If you follow those steps you may need to adjust your Project's IP Repository setting, at least check it:

 

image

When it comes to creating the PWM port for the Mezzanine, you can use the TCL command but if you want to do it through the UI then it should look like this:

image

It's created as a Vector as that is how it is defined in the IP code.

 

The Period for the Duty Cycle was created as a Parameter and doesn't appear as an Input Port on the Block Diagram.  To change this value, double click on the PWM IP to Re-Customise IP and you can change it there:

image

 

Setting the PWM Pin:  This can be done the same way as noted above.  Alternatively, open the Constraints file, copy existing lines and change the relevant values.

 

The Makefile

If you created your own IP following the steps in the linked blog post, the makefile is created correctly and there should be no issue when you come to build the platform in Vitis.

 

Finishing up in Vivado

Not mentioned in the video, but once you have generated the bitstream don't forget to File > Export > Export Hardware including the bitstream.

 

I don't have anything to add to the Vitis element of this, except it's worth going through the code to see how it works and, in particular, interrupts.  As an aside, the Standalone environments in the FSBL and PMU could have the UARTs changed from UART_0 to UART_1 in case you want to attach a serial terminal to the com port for the JTAG pod and look at the debug settings for those two elements.  It's come to be a bit of a habit for me to do that.

 

Hopefully this is of interesting in exploring some of the things that were done in a little more detail.  Any tips/feedback would be most welcome as I'm no expert at this!

  • Sign in to reply

Top Comments

  • Former Member
    Former Member over 3 years ago in reply to Andrew J +1
    Thanks Andrew J , i appreciate your effort to help others. My setup is Ubuntu 18.04 and Vivado/Vitis 2020.2. I could reproduce the steps in the bhfletcher 's workshop as well. The only differences were…
  • Andrew J
    Andrew J over 3 years ago in reply to Former Member

    I documented everything necessary, that I found anyway, here:

     

    https://www.element14.com/community/community/designcenter/zedboardcommunity/ultra96/blog/2021/08/07/summer-of-fpga-installing-vivado-on-ubuntu

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 3 years ago in reply to Andrew J

    Thanks Andrew J, i appreciate your effort to help others.

     

    My setup is Ubuntu 18.04 and Vivado/Vitis 2020.2. I could reproduce the steps in the bhfletcher's workshop as well. The only differences were COMPORT name(/dev/ttyACM0) and there was no error in auto-generated Makefile below. You should also need to be in "dialout" group to have a permission to use serial communication of your PC. Xilinx JTAG platform cable driver needs to be installed manually with a scritpt located at <vivado_installation_path>/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_drivers.  

     

    COMPILER=

    ARCHIVER=

    CP=cp

    COMPILER_FLAGS=

    EXTRA_COMPILER_FLAGS=

    LIB=libxil.a

    RELEASEDIR=../../../lib

    INCLUDEDIR=../../../include

    INCLUDES=-I./. -I${INCLUDEDIR}

    INCLUDEFILES=*.h

    LIBSOURCES=*.c

    OUTS = *.o libs:

         echo "Compiling PWM_w_Int..."

         $(COMPILER) $(COMPILER_FLAGS) $(EXTRA_COMPILER_FLAGS) $(INCLUDES) $(LIBSOURCES)

         $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS}

         make clean

    include:

         ${CP} $(INCLUDEFILES) $(INCLUDEDIR)

    clean:

         rm -rf ${OUTS}

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Andrew J
    Andrew J over 3 years ago in reply to bhfletcher

    Thanks Bryan, bhfletcher

     

    I was aware that there could be a problem with the makefile once I got into Vitis so I was prepared to do some investigating to look at the cause of the problem and see if there was a way around without faffing with the file itself.  However, everything built perfectly.  The steps I went through are outlined in the linked post and I just let it get on with whatever it did behind the scenes.  If this is different to the way you originally created the IP then I guess you could follow that up: this being the first time I've done it, I just did what felt right!  Perhaps it is just an issue with the Windows version.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • bhfletcher
    bhfletcher over 3 years ago

    Excellent explanations, Andrew J. Thanks for sharing these additional details.

     

    Regarding the Tcl command syntax to disable M_AXI_HPM1_FPD, I did the operation manually first, at which point I then copied the reported Tcl that showed up in the Tcl console. The sleuthing you've done to relate this back to GP1 is beyond anything that I looked into.

     

    I do have a question regarding the Makefile in the Driver of the custom IP. Are you saying that you found the Makefile to be generated correctly when you completed all the steps in Vivado? If so, I'm definitely interested in exploring what you did differently. Even after I copied the Makefile into the drivers directory at the beginning of the IP creation, I found it got overwritten later on. In the end, the way I created the XSA used in the Vitis part of Workshop #4 was by opening the XSA in 7-zip, deleting the bad Makefile, copying the good Makefile into the archive, and then re-saving the archive.

     

    Bryan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube