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/gpu/driver/tests/sec2_trace.om # 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 / gpu / driver / tests / sec2_trace.om` 175 lines ยท 2115 bytes Raw Blame History 1 fn main to int 2 b = new uchar 1 0 3 if ne read 0 b 0 1 1 4 ret 99 5 end 6 m = ulong get b 0 7 atsetup 0 8 put arcfg 0 2 9 put arcfg 6 61440 10 put arcfg 7 2560 11 put arcfg 8 0 12 put arslen 1 4096 13 put arslen 2 212992 14 put arslen 3 212296 15 pos = ulong 0 16 for s ulong 7 17 put arsrc s pos 18 tfill s pos 19 pos = add pos get arslen s 20 end 21 for i ulong 3 22 put arpkg i 2 23 end 24 if and ge m 11 le m 13 25 put arpkg sub m 11 1 26 end 27 r = arbuild 28 if and ge m 11 le m 13 29 if ne r -1 30 ret 31 31 end 32 ret 0 33 end 34 if ne r 0 35 ret 32 36 end 37 if or ne get arcot 3 192 ne get arcot 8 2 38 ret 33 39 end 40 for i ulong 24 41 if ne get arcot add 20 i 0 42 ret 34 43 end 44 end 45 for i ulong 1024 46 put gpkt i get arcot i 47 end 48 put gin 0 get arclen 0 49 put gin 1 araddr 15 50 put gin 2 1 51 for i ulong 4 52 put gin add i 3 3 53 end 54 for i ulong 7 55 put s2cfg i 1 56 put s2sc i 0 57 end 58 put s2sc 7 0 59 put s2cfg 0 2 60 put s2cfg 1 2 61 put s2cfg 2 3 62 put s2cfg 3 3 63 put sprof 0 2 64 put scfg 8 get gin 1 65 siminit 66 chip = uint `464519168` 67 expected = long 0 68 if eq m 1 69 put s2cfg 1 1 70 expected = -1 71 end 72 if eq m 2 73 chip = uint `447741952` 74 expected = -1 75 end 76 if eq m 3 77 put s2sc 0 8 78 expected = -10 79 end 80 if eq m 4 81 put s2sc 2 1 82 expected = -11 83 end 84 if eq m 5 85 put s2sc 3 1 86 expected = -12 87 end 88 if eq m 6 89 put s2sc 4 1 90 expected = -13 91 end 92 if eq m 7 93 put s2sc 5 1 94 expected = -12 95 end 96 if eq m 8 97 put s2sc 6 1 98 expected = -12 99 end 100 if eq m 9 101 put gpkt 0 1 102 put gpkt 3 0 103 expected = -1 104 end 105 if eq m 10 106 put gpkt 8 1 107 expected = -1 108 end 109 if eq m 14 110 put s2sc 0 3 111 put s2sc 1 3 112 end 113 if eq m 15 114 put s2sc 7 64 115 end 116 if eq m 16 117 put s2sc 3 128 118 end 119 if eq m 17 120 put s2sc 7 `4294967288` 121 end 122 if eq m 18 123 put s2sc 7 `4294967288` 124 put s2sc 3 128 125 put s2sc 5 1 126 expected = -12 127 end 128 if eq m 19 129 put s2sc 7 64 130 put s2sc 6 1 131 expected = -12 132 end 133 if eq m 20 134 sp SHWCFG2 `3135193344` 135 sp SGMB0 `3135193344` 136 if lockdone 137 ret 44 138 end 139 sp SGMB0 0 140 if lockdone 141 ret 45 142 end 143 sp SHWCFG2 8197 144 sp SGMB0 `3135193344` 145 if lockdone 146 ret 46 147 end 148 sp SHWCFG2 5 149 sp SGMB0 0 150 if not lockdone 151 ret 47 152 end 153 ret 0 154 end 155 r = s2boot chip 156 if ne r expected 157 ret 40 158 end 159 if eq r 0 160 if or ne get s2ss 6 1 ne get ss SVIOL 0 161 ret 41 162 end 163 end 164 if or or eq m 1 eq m 2 or eq m 9 eq m 10 165 if ne get s2ss 7 0 166 ret 42 167 end 168 end 169 if or and ge m 5 le m 7 eq m 18 170 if ne get s2ss 6 1 171 ret 43 172 end 173 end 174 ret 0 175 end