Intel® Quartus® Prime Pro Edition User Guide: Debug Tools

ID 683819
Date 12/12/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

8.5.5.1. Monitor Commands

You can use the Monitor commands to read many Avalon® memory-mapped interface agent memory locations at a regular interval.

Under normal load, the monitor service reads the data after each interval and then calls the callback. If the value you read is timing sensitive, you can use the monitor_get_read_interval command to read the exact time between the intervals at which the data was read.

Under heavy load, or with a callback that takes a long time to execute, the monitor service skips some callbacks. If the registers you read do not have side effects (for example, they read the total number of events since reset), skipping callbacks has no effect on your code. The monitor_read_data command and monitor_get_read_interval command are adequate for this scenario.

If the registers you read have side effects (for example, they return the number of events since the last read), you must have access to the data that was read, but for which the callback was skipped. The monitor_read_all_data and monitor_get_all_read_intervals commands provide access to this data.

Table 41.  Monitoring Commands
Command Arguments Function
monitor_add_range

<service-path>

<target-path>

<address>

<size>

Adds a contiguous memory address into the monitored memory list.

<service path> is the value returned when you opened the service.

<target-path> argument is the name of a host service to read. The address is within the address space of this service. <target-path> is returned from [lindex [get_service_paths master] n] where n is the number of the host service.

<address> and <size> are relative to the host service.

monitor_get_all_read_intervals

<service-path>

<target-path>

<address>

<size>
Returns a list of intervals in milliseconds between two reads within the data returned by monitor_read_all_data.
monitor_get_interval <service-path> Returns the current interval set which specifies the frequency of the polling action.
monitor_get_missing_event_count <service-path> Returns the number of callback events missed during the evaluation of last Tcl callback expression.
monitor_get_read_interval

<service-path>

<target-path>

<address>

<size>
Returns the milliseconds elapsed between last two data reads returned by monitor_read_data.
monitor_read_all_data

<service-path>

<target-path>

<address>

<size>
Returns a list of 8-bit values read from all recent values read from device since last Tcl callback. You must specify a memory range within the range in monitor_add_range.
monitor_read_data

<service-path>

<target-path>

<address>

<size>
Returns a list of 8-bit values read from the most recent values read from device. You must specify a memory range within the range in monitor_add_range.
monitor_set_callback

<service-path>

<Tcl-expression>

Specifies a Tcl expression that the System Console must evaluate after reading all the memories that this service monitors. Typically, you specify this expression as a single string Tcl procedure call with necessary argument passed in.
monitor_set_enabled <service-path>

<enable(1)/disable(0)>

Enables and disables monitoring. Memory read starts after this command, and Tcl callback evaluates after data is read.
monitor_set_interval

<service-path>

<interval>

Defines the target frequency of the polling action by specifying the interval between two memory reads. The actual polling frequency varies depending on the system activity.