element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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
Path to Programmable 3
  • Challenges & Projects
  • Design Challenges
  • Path to Programmable 3
  • More
  • Cancel
Path to Programmable 3
Blog Path to Programmable III Training Blog #05: Build MiniZed TTC HW Lab 9 from Scratch
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Path to Programmable 3 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: flyingbean
  • Date Created: 27 Jul 2023 1:20 AM Date Created
  • Views 486 views
  • Likes 7 likes
  • Comments 0 comments
  • design challenge
  • AMD XILINX
  • zynq
  • Path to Programmable 3
  • minized
Related
Recommended

Path to Programmable III Training Blog #05: Build MiniZed TTC HW Lab 9 from Scratch

flyingbean
flyingbean
27 Jul 2023

Table of Contents

  • Objectives
  • Motivation of the blog
  • Build Lab 9 Vivado HW Project
  • Conclusions
  • References

Objectives

MiniZed TTC HW design  Lab 9 is the final class for my MiniZed training path. I am going to review AMD Vivado HW flow on how to create Lab 9 from scratch.

Motivation of the blog

AMD Vivado ML tool is a very complex tool for a hobbyist to use. There are more than 63 user guides, 20 tutorials, 17 customer training and other materials from AMD website as this.

image

I am pretty sure many of readers who would like to build Lab 9 Vivado HW project from scratch, however, the process of the building might not go as smoothly as expected. So I would like to share my training process to build Lab 9 from scratch and point out some tips as well.

Build Lab 9 Vivado HW Project

Let us start the build from Lab 7 HW design, since most of trainers building Lab 7 from scratch under Vivado IP package flow. If you did not read Avnet training material yet, please read MiniZed+TTC+ZynqHW+Labs_2021_1: Lab 01 and Lab07  (Ref[1]). So I will not repeat the procedures to get Lab 7 done from scratch here.  Readers can build a simple Zynq HW project from Vivado project flow under Lab 01 and add a user IP into Zynq SoC system from Lab07. Next we will add Vivado AXI IIC ip, AXI gpio ip, bluetooth UART and user VHDL module into MiniZed block design(BD) canvas.

1. Add AXI IPs

  Lab 9 needs 3 IIC IPs and 2 GPIO IPs at PL for general purpose HW peripherals.

  . GPIO0 is for MiniZed onboard LED(D8 green),

  . GPIO1 is for onboard switch(SW1 and ARDUINO_A5)).

  . IIC0: Arduino I2C

  . IIC1: PMOD 1

  . IIC2: PMOD2

 1.1 Adding AXI IIC IPs

1.2 Add GPIO IPs

{gallery}Add AXI GPIO IPs

 image

Select GPIO IP

 image

Add AXI GPIO IPs into BD Canvas

 image

Auto Connection of AXI GPIO IPs

Tips:

Updating external pin names from BD->Design->External Interface Properties as below. It is easy and reliable way to update pin naming under Vivado project flow.

image

1.3 Add Bluetooth UART IPs

{gallery}Add Bluetooth UART IP

 image

Search AXI UART16550 IP

 image

Configure Bluetooth UART IP

2.Add User VHDL File into Block Design

 We need to add wireless_mgr_0.vhd file into BD canvas as this styel. How can we do it at Vivado GUI tool chain?

image

Here is the VHDL source code provided by Avnet.

----------------------------------------------------------------------------------
-- Company: 
-- Engineer: 
-- 
-- Create Date: 09/14/2016 06:02:58 PM
-- Design Name: 
-- Module Name: wireless_mgr - Behavioral
-- Project Name: 
-- Target Devices: 
-- Tool Versions: 
-- Description: 
-- 
-- Dependencies: 
-- 
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
-- 
----------------------------------------------------------------------------------


library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
library IEEE;

use IEEE.std_logic_1164.all;
use IEEE.STD_LOGIC_UNSIGNED.all;
use IEEE.numeric_std.all;  

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity wireless_mgr is
    Port ( 
           -- SDIO #0 interface from Zynq: 
           SDIO_CLK             : in STD_LOGIC;
           SDIO_CLK_FB          : out STD_LOGIC;
           SDIO_CMD_from_Zynq   : in STD_LOGIC;
           SDIO_CMD_to_Zynq     : out STD_LOGIC;
           SDIO_CMD_dir         : in STD_LOGIC;
           SDIO_DATA_from_Zynq  : in STD_LOGIC_VECTOR (3 downto 0);
           SDIO_DATA_to_Zynq    : out STD_LOGIC_VECTOR (3 downto 0);
           SDIO_DATA_dir        : in STD_LOGIC_VECTOR (3 downto 0);
           SDIO_CDN             : out STD_LOGIC;
           SDIO_WP              : out STD_LOGIC;
           -- UART #0 interface from Zynq: 
           ZYNQ_UART_TX         : in STD_LOGIC;
           ZYNQ_UART_RX         : out STD_LOGIC; 
           ZYNQ_UART_RTS        : in STD_LOGIC;
           ZYNQ_UART_CTS        : out STD_LOGIC;
           -- GPIO interface from Zynq: 
           GPIO_from_Zynq       : in STD_LOGIC_VECTOR (3 downto 0);
           GPIO_to_Zynq         : out STD_LOGIC_VECTOR (3 downto 0);
           GPIO_dir             : in STD_LOGIC_VECTOR (3 downto 0);
           -- Murata Type 1DX Wi-Fi interface:
           WL_SDIO_CLK          : out STD_LOGIC;
           WL_SDIO_CMD          : inout STD_LOGIC;
           WL_SDIO_DAT          : inout STD_LOGIC_VECTOR (3 downto 0);
           WL_REG_ON            : out STD_LOGIC;
           WL_HOST_WAKE         : in STD_LOGIC;
           -- Murata Type 1DX Bluetooth interface:
           BT_TXD_OUT           : in STD_LOGIC;
           BT_RXD_IN            : out STD_LOGIC;
           BT_RTS_OUT_N         : in STD_LOGIC;
           BT_CTS_IN_N          : out STD_LOGIC;
           BT_REG_ON            : out STD_LOGIC;
           BT_HOST_WAKE         : in STD_LOGIC            
         );
end wireless_mgr;

architecture Behavioral of wireless_mgr is

-- I/O buffer component for inout driver on pin pad:
component IOBUF is
port (
    I : in STD_LOGIC;
    O : out STD_LOGIC;
    T : in STD_LOGIC;
    IO : inout STD_LOGIC
);
end component IOBUF;  

begin

sdio_cmd_iobuf: component IOBUF
     port map (
      I => SDIO_CMD_from_Zynq,
      O => SDIO_CMD_to_Zynq,
      T => SDIO_CMD_dir,
      IO => WL_SDIO_CMD
    ); 

sdio_dat0_iobuf: component IOBUF
     port map (
      I => SDIO_DATA_from_Zynq(0),
      O => SDIO_DATA_to_Zynq(0),
      T => SDIO_DATA_dir(0),
      IO => WL_SDIO_DAT(0)
    ); 

sdio_dat1_iobuf: component IOBUF
     port map (
      I => SDIO_DATA_from_Zynq(1),
      O => SDIO_DATA_to_Zynq(1),
      T => SDIO_DATA_dir(1),
      IO => WL_SDIO_DAT(1)
    ); 

sdio_dat2_iobuf: component IOBUF
     port map (
      I => SDIO_DATA_from_Zynq(2),
      O => SDIO_DATA_to_Zynq(2),
      T => SDIO_DATA_dir(2),
      IO => WL_SDIO_DAT(2)
    ); 

sdio_dat3_iobuf: component IOBUF
     port map (
      I => SDIO_DATA_from_Zynq(3),
      O => SDIO_DATA_to_Zynq(3),
      T => SDIO_DATA_dir(3),
      IO => WL_SDIO_DAT(3)
    ); 

    -- GPIO assignments:
    BT_REG_ON <= GPIO_from_Zynq(0) when GPIO_dir(0) = '0' else 'Z';
    GPIO_to_Zynq(1) <= BT_HOST_WAKE;
    WL_REG_ON <= GPIO_from_Zynq(2) when GPIO_dir(2) = '0' else 'Z';
    GPIO_to_Zynq(3) <= WL_HOST_WAKE;

    -- Bluetooth UART assignments:
    -- BT_RTS_OUT# (Request to Send) on module connected to Zynq UART_CTS (Clear to Send). Direction: Zynq <- module
    ZYNQ_UART_CTS     <= BT_RTS_OUT_N;
    -- PL Pmod JD pin 2: BT_RXD_IN (Receive signal) on module connected to Zynq UART_TX (Transmit signal). Direction: Zynq -> module
    BT_RXD_IN    <= ZYNQ_UART_TX;
    -- BT_TXD_OUT (Transmit signal) on module connected to Zynq UART_Rx (Receive signal). Direction: Zynq <- module
    ZYNQ_UART_RX      <= BT_TXD_OUT;
    -- BT_CTS_IN# (Clear to Send) on module connected to Zynq UART_RTS (Request to Send). Direction: Zynq -> module
    BT_CTS_IN_N    <= ZYNQ_UART_RTS;

    -- Wi-Fi assignments:
    SDIO_CLK_FB <= SDIO_CLK; --Feedback clock
    WL_SDIO_CLK  <= SDIO_CLK;
    SDIO_CDN <= '0'; -- Card Detect
    SDIO_WP <= '0'; -- Write Protect

end Behavioral;

Step 1: Add wireless_mgr.vhd into Vivado project from Project Manager -> Add Sources -> AddFiles

image

Step 2: Select the VHDL source code. Please don't copy the source into Vivado project.

image

Project Manager add wireless_mgr.vhd into Vivado project, which is able to be loaded by Vivado Add Module pop-up window at Step 3.

image

Step 3: Back to Diagram (BD canvas), click the right mouse button under Diagram area. A pop-up window will let us Add Module

image

image

Step 4: After finish click OK at step 3, Vivado will automatically add wireless_mgr_v1_0 block into Diagram.

3. Add Vivado glue logic and reconfig Zynq block as needed. Last, assign Address at Address Editor. Here is the final Lab 9 build from scratch.

 image

Is this same as the original Lab 9 HW design from Avnet?

The answer is no. Why? I forgot to remove jtag to AXI Master module. After synthesis done, Vivado gave me a report about Utilization as below.

image

MiniZed only has 14400 Slice LUTs totally, my initial reproduced Lab 9 HW design used 17,633 LUTs. Avnet team already figured it out, so Lab 9 training project does not include jtag to AXI Master module due to the limitation of FGPA resource. Here is the final reproduced Lab 9 HW Utilization report and FPGA placement graph.

image

image

Conclusions

I learned how to add a user VHDL source into Vivado Diagram and analysis FPGA utilization. There are a lot of features at Vivado ML tool chain, such as FPGA function simulation, more advance TCL scripting for non-project flow, timing analysis, HLS flow and more. I will learn them step-by-step. 

References

 

[1] Avnet MiniZed TTC Training Vitis 2021.1

  • Sign in to reply
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