TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
noc.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include "noc.h"
#include "compiler.h"

Macros

#define NOC_REGS_START_ADDR   0xFFB20000
#define NOC_INSTANCE_OFFSET_BIT   16
#define NOC_OVERLAY_START_ADDR   0xFFB40000
#define T   kTensixNode
#define TENSIX_ROW   T, T, T, T, T, T, T, T, T, T, T, T, T, T /* 14 tensixes in a row */
#define A   kNoc2AxiNode
#define G   kGddrNode
#define X   kExtraNode

Enumerations

enum  NocNodeType {
  kTensixNode ,
  kNoc2AxiNode ,
  kGddrNode ,
  kExtraNode
}

Functions

static enum NocNodeType GetNodeType (uint8_t px, uint8_t py)
uint64_t NiuRegsBase (uint8_t px, uint8_t py, uint8_t noc_id)
uint64_t OverlayRegsBase (uint8_t px, uint8_t py)
uint8_t PhysXToNoc (uint8_t px, uint8_t noc_id)
uint8_t PhysYToNoc (uint8_t py, uint8_t noc_id)
uint8_t TensixPhysXToNoc (uint8_t px, uint8_t noc_id)
uint8_t TensixPhysYToNoc (uint8_t py, uint8_t noc_id)
uint8_t NocToTensixPhysX (uint8_t x, uint8_t noc_id)
uint8_t NocToPhysX (uint8_t nx, uint8_t noc_id)
uint8_t NocToPhysY (uint8_t ny, uint8_t noc_id)
void GetGddrNocCoords (uint8_t gddr_inst, uint8_t noc2axi_port, uint8_t noc_id, uint8_t *x, uint8_t *y)
void GetEthNocCoords (uint8_t eth_inst, uint8_t noc_id, uint8_t *x, uint8_t *y)
void GetSerdesNocCoords (uint8_t serdes_inst, uint8_t noc_id, uint8_t *x, uint8_t *y)

Variables

static const uint8_t kNodeTypes [12][17]
static const uint8_t kPhysXToNoc0 [17]
static const uint8_t kPhysYToNoc0 [12] = {0, 1, 11, 2, 10, 3, 9, 4, 8, 5, 7, 6}
static const uint8_t kNoc0XToPhys [17]
static const uint8_t kNoc0YToPhys [12] = {0, 1, 3, 5, 7, 9, 11, 10, 8, 6, 4, 2}

Macro Definition Documentation

◆ A

#define A   kNoc2AxiNode

◆ G

#define G   kGddrNode

◆ NOC_INSTANCE_OFFSET_BIT

#define NOC_INSTANCE_OFFSET_BIT   16

◆ NOC_OVERLAY_START_ADDR

#define NOC_OVERLAY_START_ADDR   0xFFB40000

◆ NOC_REGS_START_ADDR

#define NOC_REGS_START_ADDR   0xFFB20000

◆ T

#define T   kTensixNode

◆ TENSIX_ROW

#define TENSIX_ROW   T, T, T, T, T, T, T, T, T, T, T, T, T, T /* 14 tensixes in a row */

◆ X

#define X   kExtraNode

Enumeration Type Documentation

◆ NocNodeType

Enumerator
kTensixNode 
kNoc2AxiNode 
kGddrNode 
kExtraNode 

Function Documentation

◆ GetEthNocCoords()

void GetEthNocCoords ( uint8_t eth_inst,
uint8_t noc_id,
uint8_t * x,
uint8_t * y )

◆ GetGddrNocCoords()

void GetGddrNocCoords ( uint8_t gddr_inst,
uint8_t noc2axi_port,
uint8_t noc_id,
uint8_t * x,
uint8_t * y )

◆ GetNodeType()

enum NocNodeType GetNodeType ( uint8_t px,
uint8_t py )
static

◆ GetSerdesNocCoords()

void GetSerdesNocCoords ( uint8_t serdes_inst,
uint8_t noc_id,
uint8_t * x,
uint8_t * y )

◆ NiuRegsBase()

uint64_t NiuRegsBase ( uint8_t px,
uint8_t py,
uint8_t noc_id )

◆ NocToPhysX()

uint8_t NocToPhysX ( uint8_t nx,
uint8_t noc_id )

◆ NocToPhysY()

uint8_t NocToPhysY ( uint8_t ny,
uint8_t noc_id )

◆ NocToTensixPhysX()

uint8_t NocToTensixPhysX ( uint8_t x,
uint8_t noc_id )

◆ OverlayRegsBase()

uint64_t OverlayRegsBase ( uint8_t px,
uint8_t py )

◆ PhysXToNoc()

uint8_t PhysXToNoc ( uint8_t px,
uint8_t noc_id )

◆ PhysYToNoc()

uint8_t PhysYToNoc ( uint8_t py,
uint8_t noc_id )

◆ TensixPhysXToNoc()

uint8_t TensixPhysXToNoc ( uint8_t px,
uint8_t noc_id )

◆ TensixPhysYToNoc()

uint8_t TensixPhysYToNoc ( uint8_t py,
uint8_t noc_id )

Variable Documentation

◆ kNoc0XToPhys

const uint8_t kNoc0XToPhys[17]
static
Initial value:
= {0, 1, 3, 5, 7, 9, 11, 13, 15,
16, 14, 12, 10, 8, 6, 4, 2}

◆ kNoc0YToPhys

const uint8_t kNoc0YToPhys[12] = {0, 1, 3, 5, 7, 9, 11, 10, 8, 6, 4, 2}
static

◆ kNodeTypes

const uint8_t kNodeTypes[12][17]
static

◆ kPhysXToNoc0

const uint8_t kPhysXToNoc0[17]
static
Initial value:
= {0, 1, 16, 2, 15, 3, 14, 4, 13,
5, 12, 6, 11, 7, 10, 8, 9}

◆ kPhysYToNoc0

const uint8_t kPhysYToNoc0[12] = {0, 1, 11, 2, 10, 3, 9, 4, 8, 5, 7, 6}
static