dau_core.registers

Attributes

DAU_MAGIC_WORD

NOC_LANE_BASE

NOC_LANE_STRIDE

_RESET_SCOPE_MASK

_JOB_CONTROL_MASK

DEFAULT_STREAM_JOB_REGISTER_CONTRACT

CURRENT_REGISTER_MAP_VERSION

CAPABILITY_WORDS_REGISTER_MAP_VERSION

JOB_CAPACITY_REGISTER_MAP_VERSION

Exceptions

RegisterWriteError

Inappropriate argument value (of correct type).

Classes

RegisterMapVersion

StreamProtocolVersion

RegisterOffset

Enum where members are also (and must be) ints

HandleTableRegisterOffset

Enum where members are also (and must be) ints

HandleTableControlFlag

The WRITE bits of HandleTableRegisterOffset.CONTROL: which of the

HandleFaultCode

LAST_ERROR codes a shell reports for a job it REFUSED to start on a

NocLaneRegisterOffset

Enum where members are also (and must be) ints

ResetScope

Support for integer-based Flags

JobControlFlag

Support for integer-based Flags

JobStatusFlag

Support for integer-based Flags

StreamJobRegisterContract

RegisterBlockSnapshot

Functions

noc_lane_register(lane, offset) → int

BAR window offset of one lane's register.

platform_id_to_u32(platform_id) → int

_low_u32(value) → int

_high_u32(value) → int

_hex32(value) → str

_hex64(value) → str

_flag_bit(flag) → int

_validate_u16(name, value) → None

_validate_u32(name, value) → None

_validate_u64(name, value) → None

Module Contents

dau_core.registers.DAU_MAGIC_WORD = 1145132337
class dau_core.registers.RegisterMapVersion[source]
major: int
minor: int
__post_init__() → None[source]
to_u32() → int[source]
classmethod from_u32(value: int) → RegisterMapVersion[source]
class dau_core.registers.StreamProtocolVersion[source]
major: int
minor: int
__post_init__() → None[source]
to_u32() → int[source]
classmethod from_u32(value: int) → StreamProtocolVersion[source]
class dau_core.registers.RegisterOffset[source]

Bases: enum.IntEnum

Enum where members are also (and must be) ints

Initialize self. See help(type(self)) for accurate signature.

MAGIC = 0
REGISTER_MAP_VERSION = 4
STREAM_PROTOCOL_VERSION = 8
PLATFORM_ID = 12
BUILD_ID_LOW = 20
BUILD_ID_HIGH = 24
STATUS = 28
RESET = 32
OPERATOR_BITMAP = 40
LAST_ERROR = 44
H2C_BYTES_LOW = 48
H2C_BYTES_HIGH = 52
C2H_BYTES_LOW = 56
C2H_BYTES_HIGH = 60
ROWS_LOW = 64
ROWS_HIGH = 68
BATCHES = 72
STALLS = 76
JOB_CONTROL = 80
JOB_STATUS = 84
INPUT_ADDRESS_LOW = 88
INPUT_ADDRESS_HIGH = 92
INPUT_LENGTH_LOW = 96
INPUT_LENGTH_HIGH = 100
OUTPUT_ADDRESS_LOW = 104
OUTPUT_ADDRESS_HIGH = 108
OUTPUT_LENGTH_LOW = 112
OUTPUT_LENGTH_HIGH = 116
OPERATION = 120
RESULT_LENGTH_LOW = 124
RESULT_LENGTH_HIGH = 128
LOAD_PHASE = 132
PIPELINE_FILTER_OP = 144
PIPELINE_FILTER_CONSTANT0 = 148
PIPELINE_FILTER_CONSTANT1 = 152
PIPELINE_MAP_OP = 156
PIPELINE_MAP_CONSTANT = 160
PIPELINE_SELECTED_COUNT_LOW = 176
PIPELINE_SELECTED_COUNT_HIGH = 180
PIPELINE_GROUP_COUNT_LOW = 184
PIPELINE_GROUP_COUNT_HIGH = 188
LANE_COUNT = 192
HOST_OPCODE_BITMAP = 196
SORT_CAPACITY = 200
INPUT_ROW_CAPACITY = 204
OUTPUT_RECORD_CAPACITY = 208
class dau_core.registers.HandleTableRegisterOffset[source]

Bases: enum.IntEnum

Enum where members are also (and must be) ints

Initialize self. See help(type(self)) for accurate signature.

INDEX = 212
BASE_LOW = 216
BASE_HIGH = 220
LENGTH = 224
GENERATION = 228
CONTROL = 232
JOB_HANDLE_ID = 236
JOB_HANDLE_GENERATION = 240
class dau_core.registers.HandleTableControlFlag[source]

Bases: enum.IntFlag

The WRITE bits of HandleTableRegisterOffset.CONTROL: which of the staged entry’s two commits the write performs. Both are one-cycle pulses, so they always read back zero – CONTROL reads report the resolution state instead.

Here rather than in the host, for the same reason the offsets are: a bit position a programmer carries in their head is how a free ends up installing. A host stages one commit or the other; the table resolves the collision in free’s favour, which is a safety net, not a sequence.

Initialize self. See help(type(self)) for accurate signature.

INSTALL = 1
FREE = 2
class dau_core.registers.HandleFaultCode[source]

Bases: enum.IntEnum

LAST_ERROR codes a shell reports for a job it REFUSED to start on a handle. A refused job never starts the reader, so it reads nothing at all – these mean the datapath is untouched, not that it produced garbage.

They sit at the top of the code space, below the shell’s own 0xFE length-gate fault, because that space is the shell’s: a tile’s error codes are small and per-core (dau_core.operators), and a fault that refuses the job outright is not one of them.

Initialize self. See help(type(self)) for accurate signature.

BAD_ID = 253
STALE = 252
OUT_OF_BOUNDS = 251
dau_core.registers.NOC_LANE_BASE = 256
dau_core.registers.NOC_LANE_STRIDE = 32
class dau_core.registers.NocLaneRegisterOffset[source]

Bases: enum.IntEnum

Enum where members are also (and must be) ints

Initialize self. See help(type(self)) for accurate signature.

OUTPUT_ADDRESS_LOW = 0
RESULT_LENGTH_LOW = 4
RECORD_COUNT_LOW = 8
RECORD_COUNT_HIGH = 12
LANE_ERROR = 16
OUTPUT_ADDRESS_HIGH = 20
dau_core.registers.noc_lane_register(lane: int, offset: NocLaneRegisterOffset | int) → int[source]

BAR window offset of one lane’s register.

class dau_core.registers.ResetScope[source]

Bases: enum.IntFlag

Support for integer-based Flags

Initialize self. See help(type(self)) for accurate signature.

OPERATOR = 1
STREAM = 2
DMA = 4
SHELL = 8
class dau_core.registers.JobControlFlag[source]

Bases: enum.IntFlag

Support for integer-based Flags

Initialize self. See help(type(self)) for accurate signature.

START = 1
ABORT = 2
class dau_core.registers.JobStatusFlag[source]

Bases: enum.IntFlag

Support for integer-based Flags

Initialize self. See help(type(self)) for accurate signature.

IDLE = 1
BUSY = 2
DONE = 4
ERROR = 8
exception dau_core.registers.RegisterWriteError[source]

Bases: ValueError

Inappropriate argument value (of correct type).

Initialize self. See help(type(self)) for accurate signature.

dau_core.registers._RESET_SCOPE_MASK
dau_core.registers._JOB_CONTROL_MASK
class dau_core.registers.StreamJobRegisterContract[source]
register_window_offset: int = 4096
input_buffer_address: int = 0
input_buffer_bytes: int = 1048576
output_buffer_address: int = 1048576
output_buffer_bytes: int = 1048576
result_bytes: int = 136
start_offset: RegisterOffset
status_offset: RegisterOffset
error_offset: RegisterOffset
result_length_low_offset: RegisterOffset
__post_init__() → None[source]
manifest_items() → tuple[tuple[str, str], ...][source]
class dau_core.registers.RegisterBlockSnapshot[source]
register_map_version: RegisterMapVersion
stream_protocol_version: StreamProtocolVersion
platform_id: str = ''
build_id: int = 0
status: int = 0
operator_bitmap: int = 0
last_error: int = 0
h2c_bytes: int = 0
c2h_bytes: int = 0
rows: int = 0
batches: int = 0
stalls: int = 0
job_status: int = 0
input_address: int = 0
input_length: int = 0
output_address: int = 1048576
output_length: int = 136
operation: int = 0
result_length: int = 0
lane_count: int = 0
host_opcode_bitmap: int = 0
sort_capacity: int = 0
input_row_capacity: int = 0
output_record_capacity: int = 0
__post_init__() → None[source]
read_u32(offset: RegisterOffset | int) → int[source]
write_u32(offset: RegisterOffset | int, value: int) → ResetScope | JobControlFlag[source]
dau_core.registers.platform_id_to_u32(platform_id: str) → int[source]
dau_core.registers._low_u32(value: int) → int[source]
dau_core.registers._high_u32(value: int) → int[source]
dau_core.registers._hex32(value: int) → str[source]
dau_core.registers._hex64(value: int) → str[source]
dau_core.registers._flag_bit(flag: enum.IntFlag) → int[source]
dau_core.registers._validate_u16(name: str, value: int) → None[source]
dau_core.registers._validate_u32(name: str, value: int) → None[source]
dau_core.registers._validate_u64(name: str, value: int) → None[source]
dau_core.registers.DEFAULT_STREAM_JOB_REGISTER_CONTRACT
dau_core.registers.CURRENT_REGISTER_MAP_VERSION
dau_core.registers.CAPABILITY_WORDS_REGISTER_MAP_VERSION
dau_core.registers.JOB_CAPACITY_REGISTER_MAP_VERSION