bmc_configure
Configure a hardware counter to monitor performance events like CPU cycles, instructions, or cache hits. Maps an event to a counter slot for reading after halting.
Instructions
Configure a BenchMark Counter to count a specific hardware event.
Maps a performance event to a counter slot. The counter accumulates while the target runs. Read with bmc_read() after halting.
Args: counter: Counter slot — "M1CNT", "M2CNT", "M3CNT", "M4CNT", etc. event: Hardware event to count. Common TriCore events: "CYCLECOUNT" — CPU clock cycles "INSTRUCTIONCOUNT" — instructions executed "DATA_X_HIT" — data cache/buffer hits "DATA_X_CLEAN" — data cache/buffer misses "DATA_READ" — data read accesses "DATA_WRITE" — data write accesses "PROGRAM_X_HIT" — instruction cache hits "PROGRAM_X_MISS" — instruction cache misses "JUMP" — jump/branch instructions "BRANCH_PREDICTED" — correctly predicted branches "BRANCH_NOT_PREDICTED" — mispredicted branches
Returns: Confirmation of counter configuration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event | Yes | ||
| counter | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |