plotMemoryStatistics
Plot performance data obtained from AXI interconnect monitor
Description
plotMemoryStatistics(
generates
visualizations of the performance data from the AXI interconnect monitor IP
running on your hardware board. The profiler
)profiler
object represents a
connection to that IP. When the AXI interconnect monitor is configured in
'Profile'
mode, this function launches a performance plot tool. You can
configure the tool to plot bandwidth, burst count, and average transaction latency. In
'Trace'
mode, this function opens the Logic Analyzer to
view detailed memory transaction event data.
Examples
Configure and Query AXI Interconnect Monitor
The AXI interconnect monitor (AIM) is an IP core that collects
performance metrics for an AXI-based FPGA design. Create an socIPCore
object to setup and configure the AIM IP, and use the socMemoryProfiler
object to retrieve and display the data.
For an example of how to configure and query the AIM IP in your design using
MATLAB® as AXI Master, see Analyze Memory Bandwidth Using Traffic Generators. Specifically, review the
soc_memory_traffic_generator_axi_master.m
script that
configures and monitors the design on the device.
The performance monitor can collect two types of data. Choose Profile mode to collect average transaction latency and counts of bytes and bursts. In this mode, you can launch a performance plot tool, and then configure the tool to plot bandwidth, burst count, and transaction latency. Choose Trace mode to collect detailed memory transaction event data and view the data as waveforms.
Mode = 'Profile'; % or 'Trace'
To
obtain diagnostic performance metrics from your generated FPGA design, you must set
up a JTAG connection to the device from MATLAB. Load a .mat
file that contains structures derived
from the board configuration parameters. This file was generated by the SoC
Builder tool. These structures describe the memory interconnect and
managers configuration such as buffer sizes and addresses. Use the socHardwareBoard
object to set up
the JTAG connection.
load('soc_memory_traffic_generator_zc706_aximaster.mat'); hwObj = socHardwareBoard('Xilinx Zynq ZC706 evaluation kit','Connect',false); AXIManagerObj = socAXIManager(hwObj);
Configure the AIM. The socIPCore
object provides a function that performs this initialization. Then, create an
socMemoryProfiler
object to gather the metrics.
apmCoreObj = socIPCore(AXIManagerObj,perf_mon,'PerformanceMonitor','Mode',Mode); initialize(apmCoreObj); profilerObj = socMemoryProfiler(hwObj,apmCoreObj);
Retrieve performance metrics or signal data from a design running on the FPGA by
using the socMemoryProfiler
object functions.
For 'Profile'
mode, call the collectMemoryStatistics
function in a loop.
NumRuns = 100; for n = 1:NumRuns collectMemoryStatistics(profilerObj); end
For 'Trace'
mode, call the collectMemoryStatistics
function once. This function stops the IP
from writing transactions into the FIFO in the AXI interconnect
monitor IP, although the transactions continue on the interconnect. Set
the size of the transaction FIFO, Trace capture depth, in the
configuration parameters of the model, under Hardware Implementation > Target hardware resources > FPGA design (debug).
collectMemoryStatistics(profilerObj);
Visualize the performance data by using the plotMemoryStatistics
function. In 'Profile'
mode,
this function launches a performance plot tool, and you can configure the tool to
plot bandwidth, burst count, and average transaction latency. In
'Trace'
mode, this function opens the Logic
Analyzer tool to view burst transaction event data.
plotMemoryStatistics(profilerObj);
Input Arguments
profiler
— Memory profiler object
socMemoryProfiler
object
Memory profiler object, specified as an socMemoryProfiler
object that provides access to the AXI memory
interconnect IP running on the hardware board.
Version History
Introduced in R2019a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)