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
  • About Us
  • 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
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZedBoard Hardware Design Blink a LED only with Zynq FPGA(without using SDK)
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 10 replies
  • Subscribers 329 subscribers
  • Views 3260 views
  • Users 0 members are here
Related

Blink a LED only with Zynq FPGA(without using SDK)

Former Member
Former Member over 9 years ago

Hello,
I've followed the tutorials of section 1 and 4 in the Zynq Book Tutorials, they explained how to do a basic design on the ZedBoard and how to create an IP. The result of both tutorials was a LED that was blinking. However, both examples used the SDK and so the CPU of the ZedBoard.

I want to be able to design circuits only on the Zynq FPGA(without using the ARM processor). Can you please give me a tutorial/step by step explanation of how can I blink a LED on the ZedBoard when pressing a button by using only the CPU? I am using Vivado Web Edition, version 15.4.

Thank you!

PS:The VHDL code to do this would look like:
ENTITY part1 IS
PORT ( SW : IN STD_LOGIC_VECTOR(9 DOWNTO 0);
LEDG : OUT STD_LOGIC_VECTOR(9 DOWNTO 0)); - - green LEDs
END part1;
ARCHITECTURE Behavior OF part1 IS
BEGIN
LEDG <= SW;
END Behavior
However, at which stage in Vivado should I do the pin assignation for example?

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    0 Former Member over 9 years ago

    Create part1.vhd as:

    LIBRARY IEEE;
    USE IEEE.STD_LOGIC_1164.ALL;

    ENTITY part1 IS
      PORT ( SIGNAL SW   : IN  STD_LOGIC_VECTOR(7 DOWNTO 0);
             SIGNAL LEDG : OUT STD_LOGIC_VECTOR(7 DOWNTO 0)); -- red LEDs
    END part1;

    ARCHITECTURE Behavior OF part1 IS
    BEGIN
      LEDG <= SW;
    END Behavior;

    Create compile.tcl as:

    create_project -in_memory -part xc7z020clg484-1
    read_vhdl part1.vhd
    synth_design -top part1 -part xc7z020clg484-1

    opt_design

    set_property PACKAGE_PIN T22 [get_ports {LEDG[0]}]
    set_property PACKAGE_PIN T21 [get_ports {LEDG[1]}]
    set_property PACKAGE_PIN U22 [get_ports {LEDG[2]}]
    set_property PACKAGE_PIN U21 [get_ports {LEDG[3]}]
    set_property PACKAGE_PIN V22 [get_ports {LEDG[4]}]
    set_property PACKAGE_PIN W22 [get_ports {LEDG[5]}]
    set_property PACKAGE_PIN U19 [get_ports {LEDG[6]}]
    set_property PACKAGE_PIN U14 [get_ports {LEDG[7]}]

    set_property IOSTANDARD "LVCMOS33" [get_ports {LEDG[*]}]

    set_property PACKAGE_PIN F22 [get_ports {SW[0]}]
    set_property PACKAGE_PIN G22 [get_ports {SW[1]}]
    set_property PACKAGE_PIN H22 [get_ports {SW[2]}]
    set_property PACKAGE_PIN F21 [get_ports {SW[3]}]
    set_property PACKAGE_PIN H19 [get_ports {SW[4]}]
    set_property PACKAGE_PIN H18 [get_ports {SW[5]}]
    set_property PACKAGE_PIN H17 [get_ports {SW[6]}]
    set_property PACKAGE_PIN M15 [get_ports {SW[7]}]
    set_property IOSTANDARD "LVCMOS18" [get_ports {SW[*]}]

    place_design
    phys_opt_design
    route_design

    set_property BITSTREAM.STARTUP.STARTUPCLK    JtagClk [current_design]
    set_property BITSTREAM.CONFIG.DCIUPDATEMODE  Quiet   [current_design]
    write_bitstream -verbose -mask_file -force part1.bit

    exit


    Then run:

    vivado -mode tcl -source compile.tcl

    You should now have a file called part1.bit which you can upload to your zedboard.

    Note that this script is known as non-project mode which is a bit unusual. I've left out parts like an xdc file (for timing) to make the example as simple as possible. You should be able to find tutorials on the net on how to use the GUI to do the same.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    Thank you for your answer.
    Is it possible instead of doing it on the Tcl command line to achieve the same result by using Vivado?
    If yes, can you explain me/give me a tutorial of how can I do that?

    Thanks!

    PS: Yes, I want to blink a led without using the CPU of the ZedBoard.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 9 years ago in reply to Former Member

    Thank you for your answer.
    Is it possible instead of doing it on the Tcl command line to achieve the same result by using Vivado?
    If yes, can you explain me/give me a tutorial of how can I do that?

    Thanks!

    PS: Yes, I want to blink a led without using the CPU of the ZedBoard.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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