Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/sm121/sm121.tbl # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / sm121 / sm121.tbl` 235 lines ยท 10263 bytes Raw Blame History 1 ; sm121.tbl -- the GB10 (sm_121, Blackwell) instruction table for asm2 (rung 6), readable text. 2 ; Same format as rung2/table.s2: = name 0xBASE field... 3 ; asm2 writes one 32-bit word per line. A GPU instruction is 128 bits = four 32-bit words, stored 4 ; in the order word 0, 1, 2, 3 (each little-endian), exactly as src/omega_blackwell_codegen.c 5 ; omega_bw_encode_program lays them out. So every instruction is four lines in a listing, one per word; 6 ; where several instructions share a word (for example "word 1 = one register") they share one line: 7 ; .0 opcode, predicate (bits 12..15), destination register (bits 16..23), first source (24..31) 8 ; .1 second source register or a 32-bit number 9 ; .2 modifier bits (fixed per instruction) and the third source register 10 ; .3 the scheduling ("control") word; name.3 holds the C codegen's default, `ctl N` writes any other. 11 ; Fields: iP.W = unsigned number at bit P, W bits wide; sP.W = signed. Registers are written as numbers 12 ; (R5 = 5, RZ = 255); predicates as numbers (7 = always, 0 = @P0, 8 = @!P0). 13 ; Units: every number is written as the bits hold it (constant-bank offsets in 4- or 8-byte units, 14 ; branch distances in instructions, split the way the word splits them). See seed/sm121/README.md. 15 ; Source of every base word and field: our own encoder, src/omega_blackwell_codegen.c (blob `b09fa1e5`), 16 ; encode_single_insn, line named per entry; three after-encoding patches in codegen_tc.c (blob `1b7f55df`) 17 ; and codegen_qmma.c (blob `7616015e`). The C encoder is the referee; this table was written from reading it. 18 ; 19 = ctl 0x00000000 i0.32 ; word 3 written out: any scheduling word 20 ; ---- NOP (codegen.c:276; also the padding of every program, codegen.c:1016) ---- 21 = nop.0 0x00007918 22 = nop.1 0x00000000 23 = nop.2 0x00000000 24 = nop.3 0x000fc000 25 ; ---- MOV Rd, RZ (codegen.c:283) ---- 26 = mov.rz.0 0x00007202 i16.8 27 = mov.rz.1 0x000000ff 28 = mov.rz.2 0x00000f00 29 = mov.rz.3 0x000fe200 30 ; ---- MOV Rd, imm32 (codegen.c:291) ---- 31 = mov.i.0 0x00007802 i16.8 32 = mov.i.1 0x00000000 i0.32 33 = mov.i.2 0x00000f00 34 = mov.i.3 0x000fe200 35 ; ---- S2R Rd, SR (codegen.c:299): special-register number at word-2 bit 8 ---- 36 = s2r.0 0x00007919 i16.8 37 = s2r.1 0x00000000 38 = s2r.2 0x00000000 i8.8 39 = s2r.3 0x000e2200 40 ; ---- LDC Rd, c[0x0][off] (codegen.c:307): offset/4 at word-1 bits 8..23 ---- 41 = ldc.0 0xff007b82 i16.8 42 = ldc.1 0x00000000 i8.16 43 = ldc.2 0x00000800 44 = ldc.3 0x000fe200 45 ; ---- LDC.64 (codegen.c:315) ---- 46 = ldc.64.0 0xff007b82 i16.8 47 = ldc.64.1 0x00000000 i8.16 48 = ldc.64.2 0x00000a00 49 = ldc.64.3 0x000e2200 50 ; ---- LDCU URd, c[0x0][off] (codegen.c:323): offset/8 at word-1 bits 8..23 (the C code shifts by 5) ---- 51 = ldcu.0 0xff0077ac i16.8 52 = ldcu.1 0x00000000 i8.16 53 = ldcu.2 0x08000800 54 = ldcu.3 0x000e2200 55 ; ---- LDCU.64 (codegen.c:331) ---- 56 = ldcu.64.0 0xff0077ac i16.8 57 = ldcu.64.1 0x00000000 i8.16 58 = ldcu.64.2 0x08000a00 59 = ldcu.64.3 0x000e6e00 60 ; ---- IMAD Rd, Ra, Rb, Rc (codegen.c:341, register form) ---- 61 = imad.0 0x00007224 i16.8 i24.8 62 = imad.1 0x00000000 i0.8 63 = imad.2 0x078e0200 i0.8 64 = imad.3 0x001fca00 65 ; ---- IMAD Rd, Ra, URb, Rc (codegen.c:347, uniform-register multiplier) ---- 66 = imad.u.0 0x00007c24 i16.8 i24.8 67 = imad.u.1 0x00000000 i0.8 68 = imad.u.2 0x0f8e0200 i0.8 69 = imad.u.3 0x001fca00 70 ; ---- IMAD Rd, Ra, imm32, Rc (codegen.c:353) ---- 71 = imad.i.0 0x00007824 i16.8 i24.8 72 = imad.i.1 0x00000000 i0.32 73 = imad.i.2 0x078e0200 i0.8 74 = imad.i.3 0x001fca00 75 ; ---- IMAD.WIDE.U32 Rd:Rd+1, Ra, imm32, Rc:Rc+1 (codegen.c:361) ---- 76 = imad.wide.0 0x00007825 i16.8 i24.8 77 = imad.wide.1 0x00000000 i0.32 78 = imad.wide.2 0x078e0000 i0.8 79 = imad.wide.3 0x001fcc00 80 ; ---- ISETP.GE (codegen.c:369): word 3 fixed (the C code ignores a given control word here) ---- 81 = isetp.ge.u.0 0x00007c0c i16.8 i24.8 82 = isetp.ge.u.1 0x00000000 i0.8 83 = isetp.ge.u.2 0x0bf06070 84 = isetp.ge.u.3 0x002fda00 85 = isetp.ge.i.0 0x0000780c i16.8 i24.8 86 = isetp.ge.i.1 0x00000000 i0.32 87 = isetp.ge.i.2 0x03f06270 88 = isetp.ge.i.3 0x001fda00 89 ; ---- LDG.E Rd, desc[URd][Ra.64] (codegen.c:383) and its siblings ---- 90 = ldg.0 0x00007981 i16.8 i24.8 91 = ldg.1 0x00000000 i0.8 92 = ldg.2 0x0c1e1900 93 = ldg.3 0x000f2200 94 = ldg.u16.2 0x0c1e1500 ; codegen.c:461 (words .0 .1 .3 as ldg) 95 = ldg.strong.sys.2 0x0c1f5900 ; codegen.c:469 96 = ldg.mmio.2 0x0c0e1900 ; codegen.c:478 97 ; ---- LDG.E.64 / .128 Rd, desc[URd][Ra.64+off] (codegen.c:447): signed byte offset at word-1 bit 8 ---- 98 = ldg.w.1 0x00000000 i0.8 s8.24 99 = ldg.64.2 0x0c1e1b00 100 = ldg.128.2 0x0c1e1d00 101 ; ---- STG.E desc[URd][Ra.64+off], Rb (codegen.c:391) ---- 102 = stg.0 0x00007986 i24.8 103 = stg.1 0x00000000 i0.8 s8.24 104 = stg.2 0x0c101900 i0.8 105 = stg.3 0x000fe200 106 ; ---- STG_EF (codegen.c:404) ---- 107 = stg.ef.1 0x00000000 i0.8 108 = stg.ef.2 0x0c111900 i0.8 109 ; ---- STG.E.STRONG.SYS, optional predicate (codegen.c:486) ---- 110 = stg.strong.sys.0 0x00000986 i12.4 i24.8 111 = stg.strong.sys.2 0x0c115900 i0.8 112 ; ---- memory order (codegen.c:497, 504, 511) ---- 113 = membar.all.sys.0 0x00007992 114 = membar.all.sys.2 0x0000b000 115 = membar.3 0x000fec00 116 = membar.sc.sys.2 0x00003000 117 = cctl.ivall.0 0xff00798f 118 = cctl.ivall.2 0x02000000 119 = cctl.ivall.3 0x000fe800 120 ; ---- ATOMG.ADD / .EXCH .STRONG.SYS (codegen.c:518, 525) ---- 121 = atomg.0 0x000079a8 i16.8 i24.8 122 = atomg.1 0x80000000 i0.8 123 = atomg.add.2 0x081f5100 i0.8 124 = atomg.exch.2 0x0c1f5100 i0.8 125 = atomg.3 0x00321e00 126 ; ---- ISETP.GE.U32 P0, PT, Ra, Rb, PT (codegen.c:532) ---- 127 = isetp.ge.u32.0 0x0000720c i24.8 128 = isetp.ge.u32.2 0x03f06070 129 = isetp.ge.u32.3 0x001fda00 130 ; ---- LOP3.LUT (codegen.c:439 AND with imm, 540 XOR, 782 general) ---- 131 = lop3.and.i.0 0x00007812 i16.8 i24.8 132 = lop3.and.i.2 0x078ec0ff 133 = lop3.0 0x00007212 i16.8 i24.8 134 = lop3.xor.2 0x078e3cff 135 = lop3.lut.2 0x078e0000 i8.8 i0.8 ; truth table at bit 8, Rc at bit 0 136 ; ---- IADD3 Rd, PT, PT, Ra, Rb, RZ (codegen.c:412): word 2 and 3 fixed, third source always RZ ---- 137 = iadd3.0 0x00007210 i16.8 i24.8 138 = iadd3.2 0x07ffe0ff 139 = iadd3.3 0x010fca00 140 ; ---- HMMA.16816.F32[.BF16] (codegen.c:420) ---- 141 = hmma.0 0x0000723c i16.8 i24.8 142 = hmma.f16.2 0x00001800 i0.8 143 = hmma.bf16.2 0x00041800 i0.8 144 ; ---- shifts (codegen.c:431 SHF.R.U32.HI with imm, 793 SHF.L.U32 register) ---- 145 = shf.r.hi.0 0xff007819 i16.8 146 = shf.r.hi.2 0x00011600 i0.8 147 = shf.l.u32.0 0x00007219 i16.8 i24.8 148 = shf.l.u32.2 0x00000600 i0.8 149 ; ---- IMAD.HI.U32 (codegen.c:805) ---- 150 = imad.hi.0 0x00007227 i16.8 i24.8 151 = imad.hi.2 0x078e0000 i0.8 152 ; ---- float (codegen.c:548..636, 734) ---- 153 = fadd.0 0x00007221 i16.8 i24.8 154 = fsub.1 0x80000000 i0.8 ; FADD with the second source negated 155 = f.2 0x00000000 156 = f.3 0x004fc400 157 = fmul.0 0x00007220 i16.8 i24.8 158 = fmul.2 0x00400000 159 = ffma.0 0x00007223 i16.8 i24.8 160 = fsetp.0 0x0000720b i16.3 i24.8 161 = fsetp.ge.2 0x03f06000 ; the default condition; fsetp.2 writes another 162 = fsetp.2 0x00000000 i0.32 163 = fsel.0 0x00007208 i16.8 i24.8 164 = fsel.2 0x00000000 i0.3 165 = fsel.3 0x000fca00 166 = fmnmx.0 0x00007209 i16.8 i24.8 167 = fmnmx.min.2 0x03800000 168 = fmnmx.max.2 0x07800000 169 = i2fp.0 0x00007245 i16.8 170 = i2fp.2 0x00201400 171 = i2fp.3 0x004fe200 172 = f2i.0 0x00007305 i16.8 173 = f2i.2 0x0020f100 174 = f2i.3 0x004e2200 175 = mufu.0 0x00007308 i16.8 176 = mufu.rcp.2 0x00001000 177 = mufu.rsq.2 0x00001400 178 = mufu.ex2.2 0x00000800 179 = mufu.3 0x000e2400 180 ; ---- SHFL.DOWN / .BFLY PT, Rd, Ra, lane, 0x1f (codegen.c:644; BFLY = the codegen_tc.c:240 patch, bit 26) ---- 181 = shfl.0 0x00007f89 i16.8 i24.8 182 = shfl.down.1 0x08001f00 i21.5 183 = shfl.bfly.1 0x0c001f00 i21.5 184 = shfl.2 0x000e0000 185 = shfl.3 0x000e2400 186 ; ---- shared memory (codegen.c:652 LDS.U8, 660 STS.U8, 752 LDS.128, 765 LDS, 773 STS) ---- 187 = lds.0 0x00007984 i16.8 i24.8 188 = lds.u8.2 0x00000000 i0.16 189 = sts.u8.0 0x00007388 i24.8 190 = sts.u8.2 0x00000000 i0.16 191 = lds.128.1 0x00000000 i8.23 ; byte offset below 2^23 192 = lds.128.2 0x00000c00 193 = lds.128.3 0x000fe800 194 = lds.32.1 0x000000ff 195 = lds.32.2 0x08000800 196 = lds.32.3 0x000e2800 197 = sts.32.0 0x00007988 i24.8 198 = sts.32.2 0x080008ff 199 ; ---- EXIT (codegen.c:668): word 3 fixed ---- 200 = exit.0 0x0000794d 201 = exit.p0.0 0x0000094d 202 = exit.2 0x03800000 203 = exit.3 0x000fea00 204 ; ---- BRA (codegen.c:675). d = (target - this) - 1 instructions; low 6 bits of d at word-0 bit 18, 205 ; the rest (d >> 6, signed) at word-1 bit 2; word 2 carries the sign: .fwd for d >= 0, .back for d < 0 ---- 206 = bra.0 0x00000947 i12.4 i18.6 207 = bra.1 0x00000000 s2.30 208 = bra.fwd.2 0x03800000 209 = bra.back.2 0x0383ffff 210 = bra.self.3 0x000fc000 ; the unpredicated branch-to-itself after EXIT 211 = bra.3 0x000fea00 212 ; ---- BSSY / BSYNC .RECONVERGENT Bn (codegen.c:698, 720): barrier at bit 16; BSSY distance - 1 at word-1 bit 4 ---- 213 = bssy.0 0x00000945 i12.4 i16.4 214 = bssy.1 0x00000000 i4.28 215 = bsync.0 0x00000941 i12.4 i16.4 216 = b.2 0x03800200 217 ; ---- BAR.SYNC.DEFER_BLOCKING 0x0 (codegen.c:743) ---- 218 = bar.sync.0 0x00007b1d 219 = bar.sync.2 0x00010000 220 ; ---- after-encoding patches: QMMA (codegen_qmma.c:25), F2FP.SATFINITE.E4M3 (qmma.c:19), F2FP.BF16 (tc.c:244) ---- 221 = qmma.0 0x0000727a i16.8 i24.8 222 = qmma.2 0x00002c00 i0.8 223 = f2fp.0 0x0000723e i16.8 i24.8 224 = f2fp.e4m3.2 0x048070ff 225 = f2fp.bf16.2 0x000010ff 226 ; ---- shared word-1 / word-2 / word-3 forms used by several instructions above ---- 227 = r.1 0x00000000 i0.8 ; word 1 = one source register 228 = r.2 0x00000000 i0.8 ; word 2 = one source register (FFMA Rc) 229 = z.1 0x00000000 ; word 1 = 0 230 = n.1 0x00000000 i0.32 ; word 1 = a 32-bit number (SHF.R amount, LOP3.AND mask) 231 = z.2 0x00000000 232 = w.3 0x000fe200 ; the most common default scheduling word 233 = alu.3 0x001fca00 234 = ld.3 0x000f2200 235 = jmp.3 0x000fea00