ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

SETDMAREG_Immediate

T1 tenstorrent alu insn
SETDMAREG (Set 16 bits of one GPR)
SourceTenstorrent Official Tensix ISA Documentation (Wormhole & Blackhole) (tenstorrent_tt_isa)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeWormholeB0
Tenstorrent Wormhole B0 & Blackhole A0
License & VersionApache-2.0
main
Upstreamhttps://github.com/tenstorrent/tt-isa-documentation
Privilegeuser
ExtensionsTensix, Scalar Unit, WormholeB0
Note: This instruction executes in a single cycle, though if the Scalar Unit is busy with other instructions, it might have to wait at the Wait Gate until the Scalar Unit can accept it. On Blackhole, if an instruction executing at a unit other than the Scalar Unit (for example WRCFG) wants to consume the GPR written by…

Summary

Write 16 bits to one half of a Tensix GPR, leaving the other half as-is. Note that all 32 bits of a GPR can be set by using two SETDMAREG instructions.

Syntax / Encoding

TT_SETDMAREG(0, /* u16 */ NewValue, 0, /* u7 */ ResultHalfReg)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32Tensix-32b01000101xxxxxxxxxxxxxxxx0xxxxxxx0xff000080 / 0x45000000

Operands

NameDescription
NewValue
ResultHalfReg

Reference Notes

# `SETDMAREG` (Set 16 bits of one GPR)

**Summary:** Write 16 bits to one half of a Tensix GPR, leaving the other half as-is. Note that all 32 bits of a GPR can be set by using two `SETDMAREG` instructions.

**Backend execution unit:** [Scalar Unit (ThCon)](ScalarUnit.md)

## Syntax

```c
TT_SETDMAREG(0, /* u16 */ NewValue, 0, /* u7 */ ResultHalfReg)
```

## Encoding

![](../../../Diagrams/Out/Bits32_SETDMAREG_Immediate.svg)

## Functional model

```c
uint16_t *HalfReg = (char*)&GPRs[CurrentThread][0] + ResultHalfReg * 2;
*HalfReg = NewValue;
```

## Performance

This instruction executes in a single cycle, though if the Scalar Unit is busy with other instructions, it might have to wait at the Wait Gate until the Scalar Unit can accept it.

## Instruction scheduling

On Blackhole, if an instruction executing at a unit other than the Scalar Unit (for example [`WRCFG`](WRCFG.md)) wants to consume the GPR written by `SETDMAREG`, then software must place a [`STALLWAIT`](STALLWAIT.md) with condition C0 between the two; see [Scalar Unit (ThCon)](ScalarUnit.md). This is not required on Wormhole.