UPRMT

The uniform datapath

fixed bit field field the encoding fixes should be

Encoding

12712612512412312212112011911811711611511411311211111010910810710610510410310210110099989796
reusewaitrd_barwr_baryieldstall
9594939291908988878685848382818079787776757473727170696867666564
[74:72]
6362616059585756555453525150494847464544434241403938373635343332
313029282726252423222120191817161514131211109876543210
URaURdpred.notpredform010010110

bits 15:0: ---- 0010 1001 0110
bits 15:0: ---- 0100 1001 0110
bits 15:0: ---- 1000 1001 0110

Forms

Form (bits 11:9)bc
1 (001)URb at 32URc at 64
2 (010)URb at 64immediate at 32
4 (100)immediate at 32URc at 64

Runs execute_PRMT.

Fields

FieldBitsFrom
reuse125:122the decoder
wait121:116the decoder
rd_bar115:113the decoder
wr_bar112:110the decoder
yield109the decoder
stall108:105the decoder
[74:72]74:72execute_PRMT
URa29:24the decoder
URd21:16the decoder
pred.not15the decoder
pred14:12the decoder
form11:9the decoder

Operation Sail

PRMT and UPRMT, the index mode (72-74 = 0): output byte k is byte (sel >> 4k) & 7 of c:a, its sign spread with bit 3

if Field(72, 3) != 0b000 then throw(Unsupported("PRMT mode %u", Field(72, 3)));
let a = SrcBits(A);
let sel = SrcBits(B);
let hi = SrcBits(C);
var v : bits(32) = 0x00000000;
foreach (k from 0 to 3) {
    let nib = BitsU(sel, to_bits(32, 4 * k), 0x00000004);
    let from_c = (nib & 0x00000004) != 0x00000000;
    let word = if from_c then hi else a;
    let shift = (nib & 0x00000003) << 3;
    let byte = BitsU(word, shift, 0x00000008);
    let spread = (nib & 0x00000008) != 0x00000000;
    let sign = if (byte & 0x00000080) != 0x00000000 then 0x000000ff else 0x00000000;
    let b = if spread then sign else byte;
    v = v | (b << (8 * k))
};
D_write(v)

Made from ScarletNX's Sail at 166ad3910f80. The Sail and the encodings' file are ScarletNX's (GPL-3.0-or-later); its encodings are from Mesa's NAK (sm70_encode.rs, MIT) and CuAssembler's sm_86 records.