Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

4.4.5.2. Writing to the Registers of a Nonexistent Section Counter

The performance counter report in the example below shows what happens when you attempt to use a nonexistent section counter of the performance counter component.

Result of Using a Nonexistent Section Counter

--Performance Counter Report--
Total Time: 5.78751 seconds (289375582 clock-cycles)
+--------------------+--------+-------------+---------------+-----------+
| 	Section 	 |   %    | Time (sec)  | Time (clocks) |Occurrences|
+--------------------+--------+-------------+---------------+-----------+
|sleep_tests 	   |    49.4|      2.86162|      143081026|          1|
+--------------------+--------+-------------+---------------+-----------+
|perf_begin_overhead | 7.6e-06|      0.00000|             22|          1|
+--------------------+--------+-------------+---------------+-----------+
|timestamp_overhead  | 7.6e-06|      0.00000|             22|          1|
+--------------------+--------+-------------+---------------+-----------+
|non_existent_counter|6.37e+12|368934881474.19104|        -1| 4294967295|
+--------------------+--------+-------------+---------------+-----------+

Assume a fourth section counter specifies a performance counter component that Platform Designer defines to have three section counters only (the default value).

In the example, the test is performed on a hardware design that does not have any other component defined with registers mapped immediately after the registers of the performance counter component. Therefore, there is no impact to other component. Depending on how you configure the component register base addresses in Platform Designer for a particular hardware design, unpredictable system behavior could occur.