Altera Embedded Peripherals IP Instrukcja Użytkownika Strona 306

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 336
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 305
Table 31-5: Example 2:
--Performance Counter Report--
Total Time: 2.07711 seconds (103855534 clock-cycles)
+-----------------+--------+-----------+---------------+-----------+
| Section | % | Time (sec)| Time (clocks) |Occurrences|
+-----------------+--------+-----------+---------------+-----------+
|1st checksum_test| 50 | 1.03800 | 51899750 | 1 |
+-----------------+--------+-----------+---------------+-----------+
| pc_overhead |1.73e-05| 0.00000 | 18 | 1 |
+-----------------+--------+-----------+---------------+-----------+
| ts_overhead |4.24e-05| 0.00000 | 44 | 1 |
+-----------------+--------+-----------+---------------+-----------+
For full documentation of perf_print_formatted_report(), see the Performance and Counter API
section.
Interrupt Behavior
The performance counter core does not generate interrupts.
You can start and stop performance counters, and read raw performance results, in an interrupt service
routine (ISR). Do not call the perf_print_formatted_report() function from an ISR.
If an interrupt occurs during the measurement of a section of code, the time taken by the CPU to process
the interrupt and return to the section is added to the measurement time. The same applies to context
switches in a multithreaded environment. Your software must take appropriate measures to avoid or
handle these situations.
Performance Counter API
This section describes the application programming interface (API) for the performance counter core.
For Nios
II processor users, Altera provides routines to access the performance counter core hardware.
These functions are specific to the performance counter core and directly manipulate low level hardware.
The performance counter core cannot be accessed via the HAL API or the ANSI C standard library.
PERF_RESET()
Prototype:
PERF_RESET(p)
Thread-safe: Yes.
Available
from ISR:
Yes.
Include: <altera_avalon_performance_counter.h>
Parameters: p—performance counter core base address.
31-6
Interrupt Behavior
UG-01085
2014.24.07
Altera Corporation
Performance Counter Core
Send Feedback
Przeglądanie stron 305
1 2 ... 301 302 303 304 305 306 307 308 309 310 311 ... 335 336

Komentarze do niniejszej Instrukcji

Brak uwag