TT-System-Firmware APIs 19.8.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
counter_rqst Struct Reference

Host request for generic counter operations. More...

#include <msgqueue.h>

Data Fields

uint8_t command_code
 The command code corresponding to TT_SMC_MSG_COUNTER.
uint8_t pad [3]
 Three bytes of padding.
uint8_t command
 The command to execute, of type counter_cmd.
uint8_t counter_bank
 The counter bank to operate on, of type counter_bank.
uint8_t bank_index
 For GET: counter index within counter_bank; ignored for CLEAR/FREEZE.
uint8_t reserved [1]
 Reserved; host must set to zero.
uint16_t mask
 CLEAR (bits to reset) and FREEZE (frozen bitmask)

Detailed Description

Host request for generic counter operations.

Messages of this type are dispatched from counter.c (bank-specific handlers).

For COUNTER_CMD_GET, bank_index selects one counter index within counter_bank (e.g. throttler arbiters 0..N-1). Response:

  • data[1] bits [31:16]: 1 if that counter is frozen, else 0
  • data[1] bits [15:0]: 1 if that counter has overflowed since last clear, else 0
  • data[2]: selected counter value

For COUNTER_CMD_CLEAR, each set bit in mask clears that counter to zero and clears its overflow flag.

For COUNTER_CMD_FREEZE, mask is the frozen bitmask for the bank (set = frozen, clear = running). Use mask 0 to unfreeze all.

Field Documentation

◆ bank_index

uint8_t counter_rqst::bank_index

For GET: counter index within counter_bank; ignored for CLEAR/FREEZE.

◆ command

uint8_t counter_rqst::command

The command to execute, of type counter_cmd.

◆ command_code

uint8_t counter_rqst::command_code

The command code corresponding to TT_SMC_MSG_COUNTER.

◆ counter_bank

uint8_t counter_rqst::counter_bank

The counter bank to operate on, of type counter_bank.

◆ mask

uint16_t counter_rqst::mask

CLEAR (bits to reset) and FREEZE (frozen bitmask)

◆ pad

uint8_t counter_rqst::pad[3]

Three bytes of padding.

◆ reserved

uint8_t counter_rqst::reserved[1]

Reserved; host must set to zero.


The documentation for this struct was generated from the following file: