STOREREG
tenstorrent_tt_isa)Tenstorrent Wormhole B0 & Blackhole A0
main
userTensix, Scalar Unit, BlackholeA0, WormholeB0Summary
Write 32 bits to a small window of the MMIO address space, with the value coming from a Tensix GPR. The instruction completes execution as soon as the write-request has been sent towards the MMIO device, at which point the thread's next instruction can execute. Note that until the write-request subsequently reaches the MMIO device, clients other than the Scalar Unit will not observe the write.
Syntax / Encoding
TT_STOREREG(/* u6 */ DataReg, /* u18 */ AddrLo)
Binary Encodings (1)
| Width | Format | Bit Pattern | Mask / Match |
|---|---|---|---|
| 32 | Tensix-32b | 01100111xxxxxxxxxxxxxxxxxxxxxxxx | 0xff000000 / 0x67000000 |
Operands
| Name | Description |
|---|---|
DataReg | |
AddrLo |
Reference Notes
# `STOREREG` (MMIO register write from GPR)
**Summary:** Write 32 bits to a small window of the MMIO address space, with the value coming from a Tensix GPR. The instruction completes execution as soon as the write-request has been sent towards the MMIO device, at which point the thread's next instruction can execute. Note that until the write-request subsequently reaches the MMIO device, clients other than the Scalar Unit will not observe the write.
See also [`STOREIND`](STOREIND_MMIO.md) for a similar instruction with a different addressing mode.
Writes to addresses outside the NoC overlay's stream registers (`0xFFB40000` through `0xFFB7FFFF`) are `UnsupportedFunctionality`, and their use is strongly discouraged: they have no known usage.
**Backend execution unit:** [Scalar Unit (ThCon)](ScalarUnit.md)
## Syntax
```c
TT_STOREREG(/* u6 */ DataReg, /* u18 */ AddrLo)
```
## Encoding

## Functional model
```c
uint32_t Addr = 0xFFB00000 + (AddrLo << 2);
if (Addr < 0xFFB11000) {
UndefinedBehavior();
}
if (Addr < 0xFFB40000 || Addr >= 0xFFB80000) {
UnsupportedFunctionality(); // No known usage outside the NoC overlay
// The model continues to describe these writes
}
*(uint32_t*)Addr = GPRs[CurrentThread][DataReg];
```
See the [memory map](../BabyRISCV/README.md#memory-map) for details of what exists within the `0xFFB_____` range.
## Performance
The instruction occupies the Scalar Unit (ThCon) for at least three cycles, possibly longer if the memory subsystem is busy.