TT-System-Firmware APIs 19.17.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
telemetry_gr.c File Reference
#include "telemetry.h"
#include "telemetry_platform.h"
#include <stdint.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/devicetree.h>
#include <zephyr/sys/sys_io.h>
Include dependency graph for telemetry_gr.c:

Data Structures

struct  telemetry_entry
 Represents an entry in the telemetry table. More...
struct  telemetry_table
 Represents the telemetry table containing telemetry data and metadata. More...

Macros

#define TELEMETRY_INFO_REG_ADDR   (mem_addr_t) DT_REG_ADDR(DT_NODELABEL(telemetry_info))
#define GR_TAG_ENTRIES   3
#define GR_SLOT_TAG_BOARD_ID_HIGH   0
#define GR_SLOT_TAG_BOARD_ID_LOW   1
#define GR_SLOT_TAG_CM_FW_VERSION   2
#define TAG_ENTRY(tag)

Functions

 BUILD_ASSERT (DT_NODE_HAS_STATUS(DT_NODELABEL(telemetry_info), okay), "Grendel telemetry requires telemetry_info status okay")
int telemetry_platform_slot (uint16_t tag)
uint32_t * telemetry_platform_data (void)
void telemetry_platform_write_static (uint32_t app_version)
void telemetry_platform_update (void)
void telemetry_platform_publish (void)

Variables

static struct telemetry_table telemetry_table

Macro Definition Documentation

◆ GR_SLOT_TAG_BOARD_ID_HIGH

#define GR_SLOT_TAG_BOARD_ID_HIGH   0

◆ GR_SLOT_TAG_BOARD_ID_LOW

#define GR_SLOT_TAG_BOARD_ID_LOW   1

◆ GR_SLOT_TAG_CM_FW_VERSION

#define GR_SLOT_TAG_CM_FW_VERSION   2

◆ GR_TAG_ENTRIES

#define GR_TAG_ENTRIES   3

◆ TAG_ENTRY

#define TAG_ENTRY ( tag)
Value:
[GR_SLOT_##tag] = {tag, GR_SLOT_##tag}

◆ TELEMETRY_INFO_REG_ADDR

#define TELEMETRY_INFO_REG_ADDR   (mem_addr_t) DT_REG_ADDR(DT_NODELABEL(telemetry_info))

Function Documentation

◆ BUILD_ASSERT()

BUILD_ASSERT ( DT_NODE_HAS_STATUS(DT_NODELABEL(telemetry_info), okay) ,
"Grendel telemetry requires telemetry_info status okay"  )

◆ telemetry_platform_publish()

void telemetry_platform_publish ( void )

Make the table and data addresses discoverable by the host.

◆ telemetry_platform_update()

void telemetry_platform_update ( void )

Refresh the dynamic values.

◆ telemetry_platform_write_static()

void telemetry_platform_write_static ( uint32_t app_version)

Fill the values that do not change at runtime and the table header.

Variable Documentation

◆ telemetry_table

struct telemetry_table telemetry_table
static
Initial value:
= {
.tag_table = {
[ 0 ] = {TAG_BOARD_ID_HIGH, 0 },
[ 1 ] = {TAG_BOARD_ID_LOW, 1 },
[ 2 ] = {TAG_CM_FW_VERSION, 2 }
},
}
#define TAG_CM_FW_VERSION
CM firmware version.
Definition telemetry.h:206
#define TAG_BOARD_ID_HIGH
High part of the board ID.
Definition telemetry.h:102
#define TAG_BOARD_ID_LOW
Low part of the board ID.
Definition telemetry.h:105