NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_tracer.c File Reference

Execution trace buffer (TRACER) HW driver source file. More...

#include <neorv32.h>

Functions

int neorv32_tracer_available (void)
 
void neorv32_tracer_enable (int hsel, uint32_t stop_addr)
 
void neorv32_tracer_disable (void)
 
int neorv32_tracer_get_buffer_depth (void)
 
int neorv32_tracer_run (void)
 
void neorv32_tracer_irq_ack (void)
 
int neorv32_tracer_data_avail (void)
 
uint32_t neorv32_tracer_data_get_src (void)
 
uint32_t neorv32_tracer_data_get_dst (void)
 

Detailed Description

Execution trace buffer (TRACER) HW driver source file.

Function Documentation

◆ neorv32_tracer_available()

int neorv32_tracer_available ( void )

Check if TRACER module was synthesized.

Returns
0 if TRACER was not synthesized, non-zero if TRACER is available.

◆ neorv32_tracer_data_avail()

int neorv32_tracer_data_avail ( void )

Check if trace data is available.

Returns
Non-zero if trace data available, zero if no trace data available.

◆ neorv32_tracer_data_get_dst()

uint32_t neorv32_tracer_data_get_dst ( void )

Get trace data: delta-destination.

Important
Use AFTER neorv32_tracer_data_get_src().
Returns
32-bit delta-destination address + first-packet flag (in LSB).

◆ neorv32_tracer_data_get_src()

uint32_t neorv32_tracer_data_get_src ( void )

Get trace data: delta-source.

Important
Check if data is available before with neorv32_tracer_data_avail().
Returns
32-bit delta-source address + trap-entry flag (in LSB).

◆ neorv32_tracer_disable()

void neorv32_tracer_disable ( void )

Reset and disable tracer.

◆ neorv32_tracer_enable()

void neorv32_tracer_enable ( int hsel,
uint32_t stop_addr )

Reset, enable and configure trace module.

Parameters
[in]hselHart ID of the CPU that is traced (0/1).
[in]stop_addrStop tracing at this address. Use -1 to disable auto-stopping.

◆ neorv32_tracer_get_buffer_depth()

int neorv32_tracer_get_buffer_depth ( void )

Get trace buffer depth.

Returns
Trace buffer depth (number of entries)

◆ neorv32_tracer_irq_ack()

void neorv32_tracer_irq_ack ( void )

Acknowledge/clear pending tracer interrupt.

◆ neorv32_tracer_run()

int neorv32_tracer_run ( void )

Check if tracer is running.

Returns
Non-zero if tracing in progress, zero if tracing is stopped/halted.