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 & Tria 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
  • Challenges & Projects
  • Design Challenges
  • Path to Programmable
  • More
  • Cancel
Path to Programmable
Blog [PP-11] Lab 8 - hardware debugging of Zynq designs
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kk99
  • Date Created: 12 Nov 2018 5:29 PM Date Created
  • Views 1265 views
  • Likes 3 likes
  • Comments 3 comments
  • path to programmable
  • fpga
  • avnet minized
  • minized
Related
Recommended

[PP-11] Lab 8 - hardware debugging of Zynq designs

kk99
kk99
12 Nov 2018

In this lab we will learn how to use a hardware debugging interface to to perform run-time interactions with IP cores.

 

1. Adding a IP JTAG-AXI core to the design

Please select Add IP and choose JTAG to AXI Master Core from IP catalog. After that please run connection automation.

image

After that we could add a LED constraints to PWM_w_Int IP. Please right click on LED[0:0] pin located on the PWM_w_Int_v1.0 IP then select crate port.

image

Now please select option Add Sources from Flow Navigator menu. Choose Add or create constraints and load constraints from Speedway support documents.

image

Now we could reset output product and generate bitstream.

 

2. Import test application for LED control

In SDK select File->New->Application Project, enter the name of application then choose empty application and press Finish. After that select import and from Speedway support documents choose LED_Dimmer_Int.c.

image

image

3. Interaction with Vivado Hardware Analyzer

Now please Program the FPGA. After that please choose option Run -> Launch on Hardware(System Debugger) the LED_Dimmer_Int application. From command line application you will be able to change the Red PL Led brightness.

image

Please open hardware manager from Flow Navigator and select option Open target -> Auto Connect. After that please select the ILA core.

image

Now we could press: Run Trigger Immediate for this ILA Core button. You should see following waveform:

image

You could configure the radix of PWM_Counter and DutyCycle by choosing Unsigned Decimal option. Now when you type 4 on terminal and choose again Run Trigger Immediate you should get following waveform:
image

The DutyCycle ise set to 440000 because of the value 4 that was entered into the terminal. Software in the PS multiplies the entered number by 110000. The period parameter sets the counter depth of the PWM counter. The period default is 20, the counter counts to roughly 1 million. So any number over 1 million should create an exception interrupt. We will try to catch this exception by trigger in ILA.

Please go to the Trigger Setup window and select the Interrupt_out signal. Please select the value to R and the trigger position in window to 500. Now you could click Run Trigger.

image

image

Now you could type into the terminal few digits then letter. The trigger status should change from Full to idle.

image

4. Run-time interactions with the AXI core

In case when the software code is not ready we could test our IP with usage of AXI JTAG Master via TCL commands. To do that please find TCL console in hardware manager. The first step is to reset the AXI interface by following command:

reset_hw_axi [get_hw_axis hw_axi_1]

Now you could create the AXI transaction with following command:

create_hw_axi_txn write_txn [get_hw_axis hw_axi_1] -type WRITE -address 43C00000 -len 1 -data 000A1220

where:

- write_txn it is the name of the transaction,

- [get_hw_axis_hw_axi_1] - it is a handle to hw_axi_1 object,

- address 43C00000 it is a start address,

- len 1 - sets the AXI burst length to one words,

- data 000A12220 - it is a data to send (brightness set to 6)

Now we could run this transaction with following command:

run_hw_axi [get_hw_axi_txns write_txn]

When you press Trigger Immediate in the waveform you should the brightness set to 660000.

image

To change the value of data to write we could use following command (this command simply edit the data field of the command):

set_property DATA 000FFFFF [get_hw_axi_txns write_txn]

When you press run trigger there should be present exception.

 

To read data from BRAM we could run following command:

create_hw_axi_txn read_txn [get_hw_axis hw_axi_1] -type READ -address 40000000 -len 4

You should get following output:

create_hw_axi_txn read_txn [get_hw_axis hw_axi_1] -type READ -address 40000000 -len 4
read_txn
run_hw_axi [get_hw_axi_txns read_txn]
INFO: [Labtoolstcl 44-481] READ DATA is: 00000000000000000000000000000000

To write data to BRAM please use following command:

create_hw_axi_txn write_bram [get_hw_axis hw_axi_1] -type WRITE -address
40000000 -len 4 -data {44444444_33333333_22222222_11111111}

Now you should get following output:

create_hw_axi_txn write_bram [get_hw_axis hw_axi_1] -type WRITE -address 40000000 -len 4 -data {44444444_33333333_22222222_11111111}
write_bram
run_hw_axi [get_hw_axi_txns write_bram]
INFO: [Labtoolstcl 44-481] WRITE DATA is: 44444444_33333333_22222222_11111111
run_hw_axi [get_hw_axi_txns read_txn]
INFO: [Labtoolstcl 44-481] READ DATA is: 44444444333333332222222211111111

To sum up, with JTAG to AXI Master Core we could easily debug and interact with any AXI-based slave peripheral in design. This JTAG-AXI core could be easily removed in case of delivery HW platform for software developers. We could do that by just removing this IP core from block design and customize of AXI Interconnect IP by changing the number of slave interface to proper value. After that we could generate the output products.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 7 years ago +1
    Nice update. DAB
  • rscasny
    rscasny over 7 years ago +1
    Kamil, I have a great tutorial-style of writing. Great job. Randall -element14
  • rscasny
    rscasny over 7 years ago

    Kamil,

     

    I have a great tutorial-style of writing.

     

    Great job.

     

    Randall

    -element14

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kk99
    kk99 over 7 years ago in reply to DAB

    Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 7 years ago

    Nice update.

     

    DAB

    • Cancel
    • Vote Up +1 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