URL
https://opencores.org/ocsvn/theia_gpu/theia_gpu/trunk
Subversion Repositories theia_gpu
Compare Revisions
- This comparison shows the changes necessary to convert path
/theia_gpu
- from Rev 217 to Rev 218
- ↔ Reverse comparison
Rev 217 → Rev 218
/branches/beta_2.0/regressions/multi_core/instructions.mem
0,0 → 1,148
|
80019000 00000000 |
80018800 00000001 |
80018400 00000002 |
80018408 00000000 |
80019C0C 00000000 |
80019CD0 0000147A |
00011CE4 14000A00 |
80019CD4 FFF80000 |
000104D4 14000A00 |
800190CC 00000000 |
800188CC 00040000 |
800184CC 00020000 |
00011CE0 14001400 |
00011CDC 14001400 |
80019CF8 0000000A |
80019114 00050000 |
80018914 FFFA0000 |
80018514 00000000 |
80019110 FFFB0000 |
80018910 FFFA0000 |
80018510 00000000 |
800190F0 00050000 |
800188F0 00040000 |
800184F0 00000000 |
02810078 006FC038 |
80019008 0000001D |
0001080C 14060A00 |
8001100C 00000002 |
020100F8 00000000 |
00019C2C 14000A00 |
80019008 00000022 |
0001080C 14060A00 |
8001100C 00000002 |
02010124 00000000 |
00019C2C 00020A00 |
00011CDC 006FE100 |
0241009C 006FCA00 |
00000000 00000000 |
04010000 00000000 |
024140C0 0017CA00 |
80019008 0000002C |
0001080C 14060A00 |
8001100C 00000002 |
02010234 00000000 |
80019008 00000030 |
0001080C 14060A00 |
8001100C 00000002 |
02010240 00000000 |
80019008 00000034 |
0001080C 14060A00 |
8001100C 00000002 |
020101D8 00000000 |
80019008 00000038 |
0001080C 14060A00 |
8001100C 00000002 |
020101E4 00000000 |
80019C04 00000001 |
0001100C 42060A00 |
82010008 00000000 |
00000000 00000000 |
04010000 00000000 |
0001100C 42060A00 |
60039C30 00720034 |
0001BC34 006A000C |
0001DC2C 001BC033 |
6003FC28 0016000B |
0001FC30 1414210A |
0001FC34 0018140A |
0004DC38 001A0A00 |
10027CD8 0016000E |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
00011CEC 14000A00 |
00018834 14002100 |
00019C3C 008BC044 |
00019C38 0079C044 |
00019C34 0067C044 |
60033CBC 4C6C190E |
60033CC0 326C260E |
00019C30 005FC030 |
60037CBC 4C1A190F |
60037CC0 321A260F |
00019C2C 005FC030 |
60037CBC 0016000E |
000110BC 145E212F |
00019028 145E142F |
60037CBC 0018000D |
000110BC 145E212F |
00018828 145E142F |
60035CBC 00160036 |
000110BC 145E212F |
00018428 145E142F |
60037CBC 0018000F |
000110BC 145E212F |
00019C44 145E142F |
1002FC40 00140011 |
8001B048 000E8F71 |
8001A848 FFFFCCCD |
8001A448 FFFF999A |
0241619C 0021C012 |
80019D08 0000DEAD |
020101A0 00000000 |
80019D08 0000ACED |
02C141BC 4221CA00 |
0001E838 281E000F |
034161B8 421DE10D |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
020101C8 00000000 |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
80019C04 00000001 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
00011CDC 14000038 |
00011CF4 14000A00 |
80011D00 00000003 |
02C10208 1473CA3E |
000110E4 00722100 |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
02010230 00000000 |
000110E4 14000A00 |
000108E4 00722100 |
02810224 4273E13F |
80019C04 00000001 |
0001100C 42060A00 |
82010008 00000000 |
02010230 00000000 |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
/branches/beta_2.0/regressions/multi_core/code.list
0,0 → 1,294
//List file created by theia_compile |
//Make sure R0 has the appropiate values (0,1,2) |
0: 8001 2400 0 0 // 8001900000000000 ADD R[0].x__ I(0) 0 |
1: 8001 2200 0 1 // 8001880000000001 ADD R[0]._y_ I(1) 0 |
2: 8001 2100 0 2 // 8001840000000002 ADD R[0].__z I(2) 0 |
//Disable multi-threading by default |
3: 8001 2102 0 0 // 8001840800000000 ADD R[2].__z I(0) 0 |
//Make sure R3 (Frame Offset) is initialized to zero |
4: 8001 2703 0 0 // 80019C0C00000000 ADD R[3].xyz I(0) 0 |
//r52 = 0x0000147a; |
5: 8001 2734 0 147a // 80019CD00000147A ADD R[52].xyz I(147a) 0 |
//r57 = 0; |
6: 1 739 a00 a00 // 00011CE414000A00 ADD R57.xyz R0.xxx R0.xxx |
//r53 = 0xfff80000; |
7: 8001 2735 7ffc 0 // 80019CD4FFF80000 ADD R[53].xyz I(fff80000) 0 |
//r53.z = 0; |
8: 1 135 a00 a00 // 000104D414000A00 ADD R53.__z R0.xxx R0.xxx |
//r51 = (0,0x00040000,0x00020000); |
9: 8001 2433 0 0 // 800190CC00000000 ADD R[51].x__ I(0) 0 |
10: 8001 2233 2 0 // 800188CC00040000 ADD R[51]._y_ I(40000) 0 |
11: 8001 2133 1 0 // 800184CC00020000 ADD R[51].__z I(20000) 0 |
//r56 = 2; |
12: 1 738 a00 1400 // 00011CE014001400 ADD R56.xyz R0.xxx R0.zzz |
//r55 = 2; |
13: 1 737 a00 1400 // 00011CDC14001400 ADD R55.xyz R0.xxx R0.zzz |
//r62 = 10; |
14: 8001 273e 0 a // 80019CF80000000A ADD R[62].xyz I(a) 0 |
//r69 = (0x00050000, 0xfffa0000, 0x00000000 ); |
15: 8001 2445 2 10000 // 8001911400050000 ADD R[69].x__ I(50000) 0 |
16: 8001 2245 7ffd 0 // 80018914FFFA0000 ADD R[69]._y_ I(fffa0000) 0 |
17: 8001 2145 0 0 // 8001851400000000 ADD R[69].__z I(0) 0 |
//r68 = (0xfffb0000, 0xfffa0000,0x00000000 ); |
18: 8001 2444 7ffd 10000 // 80019110FFFB0000 ADD R[68].x__ I(fffb0000) 0 |
19: 8001 2244 7ffd 0 // 80018910FFFA0000 ADD R[68]._y_ I(fffa0000) 0 |
20: 8001 2144 0 0 // 8001851000000000 ADD R[68].__z I(0) 0 |
//r60 = (0x00050000, 0x00040000,0x00000000 ); |
21: 8001 243c 2 10000 // 800190F000050000 ADD R[60].x__ I(50000) 0 |
22: 8001 223c 2 0 // 800188F000040000 ADD R[60]._y_ I(40000) 0 |
23: 8001 213c 0 0 // 800184F000000000 ADD R[60].__z I(0) 0 |
|
//main |
// if ( r55 == r56 ) |
24: 281 1e 37 1c038 // 02810078006FC038 ADD <BRANCH.NOT_ZERO> @30.___ R55.xyz R56.-x-y-z |
// GenerateRay(); |
//store return address** |
25: 8001 2402 0 1d // 800190080000001D ADD R[2].x__ I(1d) 0 |
//store current frame offset |
26: 1 203 a03 a00 // 0001080C14060A00 ADD R3._y_ R3.xxx R0.xxx |
//displace next frame offset by the number of auto variables in current frame |
27: 8001 403 0 2 // 8001100C00000002 ADD R[3].x__ I(2) R[DST] |
//call the function |
28: 201 @GenerateRay 0 0 // 201 @GenerateRay 0 0 ADD <BRANCH.ALWAYS> @GenerateRay.___ R0.xyz R0.xyz |
// Hit = 0; |
29: 1 270b a00 a00 // 00019C2C14000A00 ADD R[11+ offset].xyz R0.xxx R0.xxx |
// Hit = CalculateBaricentricIntersection(); |
//store return address** |
30: 8001 2402 0 22 // 8001900800000022 ADD R[2].x__ I(22) 0 |
//store current frame offset |
31: 1 203 a03 a00 // 0001080C14060A00 ADD R3._y_ R3.xxx R0.xxx |
//displace next frame offset by the number of auto variables in current frame |
32: 8001 403 0 2 // 8001100C00000002 ADD R[3].x__ I(2) R[DST] |
//call the function |
33: 201 @CalculateBaricentricIntersection 0 0 // 201 @CalculateBaricentricIntersection 0 0 ADD <BRANCH.ALWAYS> @CalculateBaricentricIntersection.___ R0.xyz R0.xyz |
//grab the return value from the function |
34: 1 270b 1 a00 // 00019C2C00020A00 ADD R[11+ offset].xyz R1.xyz R0.xxx |
// r55--; |
35: 1 737 37 1e100 // 00011CDC006FE100 ADD R55.xyz R55.xyz R0.-y-y-y |
// if ( r55 != 0 ) |
36: 241 27 37 1ca00 // 0241009C006FCA00 ADD <BRANCH.ZERO> @39.___ R55.xyz R0.-x-x-x |
//NOP |
37: 0 0 0 0 // 0000000000000000 NOP R0.___ R0.xyz R0.xyz |
//Set the Exit bit |
38: 401 0 0 0 // 0401000000000000 ADD R0.___ R0.xyz R0.xyz |
// if (Hit != 0) |
39: 241 1030 b 1ca00 // 024140C00017CA00 ADD <BRANCH.ZERO> @48.___ R[11 + offset].xyz R0.-x-x-x |
// TextureCalculation(); |
//store return address** |
40: 8001 2402 0 2c // 800190080000002C ADD R[2].x__ I(2c) 0 |
//store current frame offset |
41: 1 203 a03 a00 // 0001080C14060A00 ADD R3._y_ R3.xxx R0.xxx |
//displace next frame offset by the number of auto variables in current frame |
42: 8001 403 0 2 // 8001100C00000002 ADD R[3].x__ I(2) R[DST] |
//call the function |
43: 201 @TextureCalculation 0 0 // 201 @TextureCalculation 0 0 ADD <BRANCH.ALWAYS> @TextureCalculation.___ R0.xyz R0.xyz |
// PrePixelShader(); |
//store return address** |
44: 8001 2402 0 30 // 8001900800000030 ADD R[2].x__ I(30) 0 |
//store current frame offset |
45: 1 203 a03 a00 // 0001080C14060A00 ADD R3._y_ R3.xxx R0.xxx |
//displace next frame offset by the number of auto variables in current frame |
46: 8001 403 0 2 // 8001100C00000002 ADD R[3].x__ I(2) R[DST] |
//call the function |
47: 201 @PrePixelShader 0 0 // 201 @PrePixelShader 0 0 ADD <BRANCH.ALWAYS> @PrePixelShader.___ R0.xyz R0.xyz |
// PixelShader(); |
//store return address** |
48: 8001 2402 0 34 // 8001900800000034 ADD R[2].x__ I(34) 0 |
//store current frame offset |
49: 1 203 a03 a00 // 0001080C14060A00 ADD R3._y_ R3.xxx R0.xxx |
//displace next frame offset by the number of auto variables in current frame |
50: 8001 403 0 2 // 8001100C00000002 ADD R[3].x__ I(2) R[DST] |
//call the function |
51: 201 @PixelShader 0 0 // 201 @PixelShader 0 0 ADD <BRANCH.ALWAYS> @PixelShader.___ R0.xyz R0.xyz |
// GenerateNextPixel(); |
//store return address** |
52: 8001 2402 0 38 // 8001900800000038 ADD R[2].x__ I(38) 0 |
//store current frame offset |
53: 1 203 a03 a00 // 0001080C14060A00 ADD R3._y_ R3.xxx R0.xxx |
//displace next frame offset by the number of auto variables in current frame |
54: 8001 403 0 2 // 8001100C00000002 ADD R[3].x__ I(2) R[DST] |
//call the function |
55: 201 @GenerateNextPixel 0 0 // 201 @GenerateNextPixel 0 0 ADD <BRANCH.ALWAYS> @GenerateNextPixel.___ R0.xyz R0.xyz |
//Set the return value |
56: 8001 2701 0 1 // 80019C0400000001 ADD R[1].xyz I(1) 0 |
//Restore previous function frame offset |
57: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
58: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//NOP |
59: 0 0 0 0 // 0000000000000000 NOP R0.___ R0.xyz R0.xyz |
//Set the Exit bit |
60: 401 0 0 0 // 0401000000000000 ADD R0.___ R0.xyz R0.xyz |
//Restore previous function frame offset |
61: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
|
//GenerateRay |
// UnnormalizedDirection = (r53 + r57 * r52 ) - r51; |
62: 6003 270c 39 34 // 60039C3000720034 MUL (unscaled) R[12+ offset].xyz R57.xyz R52.xyz |
63: 1 2f0d 35 c // 0001BC34006A000C ADD R[13+ offset].xyz R53.xyz R[12 + offset].xyz |
64: 1 370b d 1c033 // 0001DC2C001BC033 ADD R[11+ offset].xyz R[13 + offset].xyz R51.-x-y-z |
// tmp = UnnormalizedDirection * UnnormalizedDirection; //tmp = (x^2,y^2,z^2) |
65: 6003 3f0a b b // 6003FC280016000B MUL (unscaled) R[10+ offset].xyz R[11 + offset].xyz R[11 + offset].xyz |
// r54 = UnnormalizedDirection / sqrt( tmp.xxx + tmp.yyy + tmp.zzz ); |
66: 1 3f0c a0a 210a // 0001FC301414210A ADD R[12+ offset].xyz R[10 + offset].xxx R[10 + offset].yyy |
67: 1 3f0d c 140a // 0001FC340018140A ADD R[13+ offset].xyz R[12 + offset].xyz R[10 + offset].zzz |
68: 4 370e d a00 // 0004DC38001A0A00 SQRT R[14+ offset].xyz R[13 + offset].xyz R0.xxx |
69: 1002 1f36 b e // 10027CD80016000E DIV R54.xyz R[11 + offset].xyz (scaled) R[14 + offset].xyz |
//Restore previous function frame offset |
70: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
71: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//Restore previous function frame offset |
72: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
|
//CalculateBaricentricIntersection |
// r59 = 0; |
73: 1 73b a00 a00 // 00011CEC14000A00 ADD R59.xyz R0.xxx R0.xxx |
// T.y = 1; |
74: 1 220d a00 2100 // 0001883414002100 ADD R[13+ offset]._y_ R0.xxx R0.yyy |
// E1 = r69 - r68; |
75: 1 270f 45 1c044 // 00019C3C008BC044 ADD R[15+ offset].xyz R69.xyz R68.-x-y-z |
// E2 = r60 - r68; |
76: 1 270e 3c 1c044 // 00019C380079C044 ADD R[14+ offset].xyz R60.xyz R68.-x-y-z |
// T = r51 - r68; |
77: 1 270d 33 1c044 // 00019C340067C044 ADD R[13+ offset].xyz R51.xyz R68.-x-y-z |
// R47 = r54.yzx * E2.zxy; |
78: 6003 f2f 2636 190e // 60033CBC4C6C190E MUL (unscaled) R47.xyz R54.yzx R[14 + offset].zxy |
// R48 = r54.zxy * E2.yzx; |
79: 6003 f30 1936 260e // 60033CC0326C260E MUL (unscaled) R48.xyz R54.zxy R[14 + offset].yzx |
// P = R47 - R48; |
80: 1 270c 2f 1c030 // 00019C30005FC030 ADD R[12+ offset].xyz R47.xyz R48.-x-y-z |
// R47 = T.yzx * E1.zxy; |
81: 6003 1f2f 260d 190f // 60037CBC4C1A190F MUL (unscaled) R47.xyz R[13 + offset].yzx R[15 + offset].zxy |
// R48 = T.zxy * E1.yzx; |
82: 6003 1f30 190d 260f // 60037CC0321A260F MUL (unscaled) R48.xyz R[13 + offset].zxy R[15 + offset].yzx |
// Q = R47 - R48; |
83: 1 270b 2f 1c030 // 00019C2C005FC030 ADD R[11+ offset].xyz R47.xyz R48.-x-y-z |
// R47 = Q * E2; |
84: 6003 1f2f b e // 60037CBC0016000E MUL (unscaled) R47.xyz R[11 + offset].xyz R[14 + offset].xyz |
// R47.x = R47.xxx + R47.yyy; |
85: 1 42f a2f 212f // 000110BC145E212F ADD R47.x__ R47.xxx R47.yyy |
// H.x = R47.xxx + R47.zzz; |
86: 1 240a a2f 142f // 00019028145E142F ADD R[10+ offset].x__ R47.xxx R47.zzz |
// R47 = P * T; |
87: 6003 1f2f c d // 60037CBC0018000D MUL (unscaled) R47.xyz R[12 + offset].xyz R[13 + offset].xyz |
// R47.x = R47.xxx + R47.yyy; |
88: 1 42f a2f 212f // 000110BC145E212F ADD R47.x__ R47.xxx R47.yyy |
// H.y = R47.xxx + R47.zzz; |
89: 1 220a a2f 142f // 00018828145E142F ADD R[10+ offset]._y_ R47.xxx R47.zzz |
// R47 = Q * r54; |
90: 6003 172f b 36 // 60035CBC00160036 MUL (unscaled) R47.xyz R[11 + offset].xyz R54.xyz |
// R47.x = R47.xxx + R47.yyy; |
91: 1 42f a2f 212f // 000110BC145E212F ADD R47.x__ R47.xxx R47.yyy |
// H.z = R47.xxx + R47.zzz; |
92: 1 210a a2f 142f // 00018428145E142F ADD R[10+ offset].__z R47.xxx R47.zzz |
// R47 = P * E1; |
93: 6003 1f2f c f // 60037CBC0018000F MUL (unscaled) R47.xyz R[12 + offset].xyz R[15 + offset].xyz |
// R47.x = R47.xxx + R47.yyy; |
94: 1 42f a2f 212f // 000110BC145E212F ADD R47.x__ R47.xxx R47.yyy |
// Delta = R47.xxx + R47.zzz; |
95: 1 2711 a2f 142f // 00019C44145E142F ADD R[17+ offset].xyz R47.xxx R47.zzz |
// t = H / Delta; |
96: 1002 3f10 a 11 // 1002FC4000140011 DIV R[16+ offset].xyz R[10 + offset].xyz (scaled) R[17 + offset].xyz |
// vector ExpectedResult = (0x000e8f71, 0xffffcccd, 0xffff999a); |
97: 8001 2c12 7 8f71 // 8001B048000E8F71 ADD R[18 + offset ].x__ I(e8f71) 0 |
98: 8001 2a12 7fff 1cccd // 8001A848FFFFCCCD ADD R[18 + offset ]._y_ I(ffffcccd) 0 |
99: 8001 2912 7fff 1999a // 8001A448FFFF999A ADD R[18 + offset ].__z I(ffff999a) 0 |
// if ( t != ExpectedResult) |
100: 241 1867 10 1c012 // 0241619C0021C012 ADD <BRANCH.ZERO> @103.___ R[16 + offset].xyz R[18 + offset].-x-y-z |
// R66 = 0xdead; |
101: 8001 2742 0 dead // 80019D080000DEAD ADD R[66].xyz I(dead) 0 |
102: 201 68 0 0 // 020101A000000000 ADD <BRANCH.ALWAYS> @104.___ R0.xyz R0.xyz |
// R66 = 0xaced; |
103: 8001 2742 0 aced // 80019D080000ACED ADD R[66].xyz I(aced) 0 |
// if (t.yyy >= 0) |
104: 2c1 106f 2110 1ca00 // 02C141BC4221CA00 ADD <BRANCH.SIGN> @111.___ R[16 + offset].yyy R0.-x-x-x |
// E2.y = E1.zzz + E1; |
105: 1 3a0e 140f f // 0001E838281E000F ADD R[14+ offset]._y_ R[15 + offset].zzz R[15 + offset].xyz |
// if (E2.yyy > T.yyy) |
106: 341 186e 210e 1e10d // 034161B8421DE10D ADD <BRANCH.ZERO_OR_SIGN> @110.___ R[14 + offset].yyy R[13 + offset].-y-y-y |
//Set the return value |
107: 8001 2701 0 0 // 80019C0400000000 ADD R[1].xyz I(0) 0 |
//Restore previous function frame offset |
108: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
109: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
110: 201 72 0 0 // 020101C800000000 ADD <BRANCH.ALWAYS> @114.___ R0.xyz R0.xyz |
//Set the return value |
111: 8001 2701 0 0 // 80019C0400000000 ADD R[1].xyz I(0) 0 |
//Restore previous function frame offset |
112: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
113: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//Set the return value |
114: 8001 2701 0 1 // 80019C0400000001 ADD R[1].xyz I(1) 0 |
//Restore previous function frame offset |
115: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
116: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//Restore previous function frame offset |
117: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
|
//PixelShader |
//Restore previous function frame offset |
118: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
119: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//Restore previous function frame offset |
120: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
|
//GenerateNextPixel |
// r55 = r56; |
121: 1 737 a00 38 // 00011CDC14000038 ADD R55.xyz R0.xxx R56.xyz |
// r61 = 0; |
122: 1 73d a00 a00 // 00011CF414000A00 ADD R61.xyz R0.xxx R0.xxx |
// r64 += 3; |
123: 8001 740 0 3 // 80011D0000000003 ADD R[64].xyz I(3) R[DST] |
// if (r57.xxx >= r62.xxx ) |
124: 2c1 82 a39 1ca3e // 02C102081473CA3E ADD <BRANCH.SIGN> @130.___ R57.xxx R62.-x-x-x |
// r57.x++; |
125: 1 439 39 2100 // 000110E400722100 ADD R57.x__ R57.xyz R0.yyy |
//Set the return value |
126: 8001 2701 0 0 // 80019C0400000000 ADD R[1].xyz I(0) 0 |
//Restore previous function frame offset |
127: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
128: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
129: 201 8c 0 0 // 0201023000000000 ADD <BRANCH.ALWAYS> @140.___ R0.xyz R0.xyz |
// r57.x = 0; |
130: 1 439 a00 a00 // 000110E414000A00 ADD R57.x__ R0.xxx R0.xxx |
// r57.y++; |
131: 1 239 39 2100 // 000108E400722100 ADD R57._y_ R57.xyz R0.yyy |
// if (r57.yyy == r63.yyy) |
132: 281 89 2139 1e13f // 028102244273E13F ADD <BRANCH.NOT_ZERO> @137.___ R57.yyy R63.-y-y-y |
//Set the return value |
133: 8001 2701 0 1 // 80019C0400000001 ADD R[1].xyz I(1) 0 |
//Restore previous function frame offset |
134: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
135: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
136: 201 8c 0 0 // 0201023000000000 ADD <BRANCH.ALWAYS> @140.___ R0.xyz R0.xyz |
//Set the return value |
137: 8001 2701 0 0 // 80019C0400000000 ADD R[1].xyz I(0) 0 |
//Restore previous function frame offset |
138: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
139: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//Restore previous function frame offset |
140: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
|
//TextureCalculation |
//Restore previous function frame offset |
141: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
142: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//Restore previous function frame offset |
143: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
|
//PrePixelShader |
//Restore previous function frame offset |
144: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
//return from function |
145: 8201 2 0 0 // 8201000800000000 ADD <BRANCH.ALWAYS> @*R[2].___ I(0) R[DST] |
//Restore previous function frame offset |
146: 1 403 2103 a00 // 0001100C42060A00 ADD R3.x__ R3.yyy R0.xxx |
/branches/beta_2.0/regressions/multi_core/cp_code.list
0,0 → 1,67
//List file created by theia_compile |
0: 0 //NOP R0 R0 R0 |
1: 0 //NOP R0 R0 R0 |
2: 0 //NOP R0 R0 R0 |
3: d000000 //ASSIGN R0 I(0 ) |
//SrcOffset = 0; |
4: d800000 //ASSIGN R128 I(0 ) |
5: 20b8000 //ADD R11 R128 R0 |
//DstOffsetAndLen = (0x0 | (66 << 20) ); |
6: d800000 //ASSIGN R128 I(0 ) |
7: d810042 //ASSIGN R129 I(66 ) |
8: d820014 //ASSIGN R130 I(20 ) |
9: 11838182 //SHL R131 R129 R130 |
10: 5848083 //OR R132 R128 R131 |
11: 20c8400 //ADD R12 R132 R0 |
12: c150a00 //BLE R21 R10 R0 |
//branch delay |
13: c0000 //NOP R12 R0 R0 |
//Setting destination ID SPR for Copy data block |
14: 2030a00 //ADD R3 R10 R0 |
// SrcOffset += 66; |
//Copy data block |
15: e000b0c //COPYBLOCK DstId: R0 SrcOffset: R11 DstOffsetAndLen: R12 |
16: d800042 //ASSIGN R128 I(66 ) |
17: 20b800b //ADD R11 R128 R11 |
//Storing constant '1' |
18: 2810000 //ADD R129 R0 R0 |
// CoredId++; |
19: 20a0a81 //ADD R10 R10 R129 |
//while loop goto re-eval boolean |
20: 60c0000 //BRANCH R12 R0 R0 |
//branch delay |
21: c0000 //NOP R12 R0 R0 |
22: d800001 //ASSIGN R128 I(1 ) |
23: 71a0280 //BEQ R26 R2 R128 |
//branch delay |
24: 160000 //NOP R22 R0 R0 |
//while loop goto re-eval boolean |
25: 6160000 //BRANCH R22 R0 R0 |
//branch delay |
26: 160000 //NOP R22 R0 R0 |
// SrcOffset = 0; |
27: d810000 //ASSIGN R129 I(0 ) |
28: 20b8100 //ADD R11 R129 R0 |
// DstOffsetAndLen = (0x0 | (147<<20) | (1<<31) ); |
29: d800000 //ASSIGN R128 I(0 ) |
30: d810093 //ASSIGN R129 I(147 ) |
31: d820014 //ASSIGN R130 I(20 ) |
32: 11838182 //SHL R131 R129 R130 |
33: 5848083 //OR R132 R128 R131 |
34: d850001 //ASSIGN R133 I(1 ) |
35: d86001f //ASSIGN R134 I(31 ) |
36: 11878586 //SHL R135 R133 R134 |
37: 5888487 //OR R136 R132 R135 |
38: 20c8800 //ADD R12 R136 R0 |
39: d80001f //ASSIGN R128 I(31 ) |
//Setting destination ID SPR for Copy data block |
40: 2038000 //ADD R3 R128 R0 |
// copy_data_block < 31 , DstOffsetAndLen ,SrcOffset>; |
//Copy data block |
41: e000b0c //COPYBLOCK DstId: R0 SrcOffset: R11 DstOffsetAndLen: R12 |
// start <31>; |
//Start |
42: 1200000 //DELIVERCOMMAND R32 R0 R0 |
// exit ; |
//Exit |
43: f000000 //EXIT R0 R0 R0 |
/branches/beta_2.0/regressions/multi_core/code.mem
0,0 → 1,147
80019000 00000000 |
80018800 00000001 |
80018400 00000002 |
80018408 00000000 |
80019C0C 00000000 |
80019CD0 0000147A |
00011CE4 14000A00 |
80019CD4 FFF80000 |
000104D4 14000A00 |
800190CC 00000000 |
800188CC 00040000 |
800184CC 00020000 |
00011CE0 14001400 |
00011CDC 14001400 |
80019CF8 0000000A |
80019114 00050000 |
80018914 FFFA0000 |
80018514 00000000 |
80019110 FFFB0000 |
80018910 FFFA0000 |
80018510 00000000 |
800190F0 00050000 |
800188F0 00040000 |
800184F0 00000000 |
02810078 006FC038 |
80019008 0000001D |
0001080C 14060A00 |
8001100C 00000002 |
020100F8 00000000 |
00019C2C 14000A00 |
80019008 00000022 |
0001080C 14060A00 |
8001100C 00000002 |
02010124 00000000 |
00019C2C 00020A00 |
00011CDC 006FE100 |
0241009C 006FCA00 |
00000000 00000000 |
04010000 00000000 |
024140C0 0017CA00 |
80019008 0000002C |
0001080C 14060A00 |
8001100C 00000002 |
02010234 00000000 |
80019008 00000030 |
0001080C 14060A00 |
8001100C 00000002 |
02010240 00000000 |
80019008 00000034 |
0001080C 14060A00 |
8001100C 00000002 |
020101D8 00000000 |
80019008 00000038 |
0001080C 14060A00 |
8001100C 00000002 |
020101E4 00000000 |
80019C04 00000001 |
0001100C 42060A00 |
82010008 00000000 |
00000000 00000000 |
04010000 00000000 |
0001100C 42060A00 |
60039C30 00720034 |
0001BC34 006A000C |
0001DC2C 001BC033 |
6003FC28 0016000B |
0001FC30 1414210A |
0001FC34 0018140A |
0004DC38 001A0A00 |
10027CD8 0016000E |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
00011CEC 14000A00 |
00018834 14002100 |
00019C3C 008BC044 |
00019C38 0079C044 |
00019C34 0067C044 |
60033CBC 4C6C190E |
60033CC0 326C260E |
00019C30 005FC030 |
60037CBC 4C1A190F |
60037CC0 321A260F |
00019C2C 005FC030 |
60037CBC 0016000E |
000110BC 145E212F |
00019028 145E142F |
60037CBC 0018000D |
000110BC 145E212F |
00018828 145E142F |
60035CBC 00160036 |
000110BC 145E212F |
00018428 145E142F |
60037CBC 0018000F |
000110BC 145E212F |
00019C44 145E142F |
1002FC40 00140011 |
8001B048 000E8F71 |
8001A848 FFFFCCCD |
8001A448 FFFF999A |
0241619C 0021C012 |
80019D08 0000DEAD |
020101A0 00000000 |
80019D08 0000ACED |
02C141BC 4221CA00 |
0001E838 281E000F |
034161B8 421DE10D |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
020101C8 00000000 |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
80019C04 00000001 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
00011CDC 14000038 |
00011CF4 14000A00 |
80011D00 00000003 |
02C10208 1473CA3E |
000110E4 00722100 |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
02010230 00000000 |
000110E4 14000A00 |
000108E4 00722100 |
02810224 4273E13F |
80019C04 00000001 |
0001100C 42060A00 |
82010008 00000000 |
02010230 00000000 |
80019C04 00000000 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
0001100C 42060A00 |
82010008 00000000 |
0001100C 42060A00 |
/branches/beta_2.0/regressions/multi_core/control_code.mem
0,0 → 1,45
//Code generated bt theia_compile |
0 //NOP R0 R0 R0 |
0 //NOP R0 R0 R0 |
0 //NOP R0 R0 R0 |
d000000 //ASSIGN R0 I(0 ) |
d800000 //ASSIGN R128 I(0 ) |
20b8000 //ADD R11 R128 R0 |
d800000 //ASSIGN R128 I(0 ) |
d810042 //ASSIGN R129 I(66 ) |
d820014 //ASSIGN R130 I(20 ) |
11838182 //SHL R131 R129 R130 |
5848083 //OR R132 R128 R131 |
20c8400 //ADD R12 R132 R0 |
c150a00 //BLE R21 R10 R0 |
c0000 //NOP R12 R0 R0 |
2030a00 //ADD R3 R10 R0 |
e000b0c //COPYBLOCK DstId: R0 SrcOffset: R11 DstOffsetAndLen: R12 |
d800042 //ASSIGN R128 I(66 ) |
20b800b //ADD R11 R128 R11 |
2810000 //ADD R129 R0 R0 |
20a0a81 //ADD R10 R10 R129 |
60c0000 //BRANCH R12 R0 R0 |
c0000 //NOP R12 R0 R0 |
d800001 //ASSIGN R128 I(1 ) |
71a0280 //BEQ R26 R2 R128 |
160000 //NOP R22 R0 R0 |
6160000 //BRANCH R22 R0 R0 |
160000 //NOP R22 R0 R0 |
d810000 //ASSIGN R129 I(0 ) |
20b8100 //ADD R11 R129 R0 |
d800000 //ASSIGN R128 I(0 ) |
d810093 //ASSIGN R129 I(147 ) |
d820014 //ASSIGN R130 I(20 ) |
11838182 //SHL R131 R129 R130 |
5848083 //OR R132 R128 R131 |
d850001 //ASSIGN R133 I(1 ) |
d86001f //ASSIGN R134 I(31 ) |
11878586 //SHL R135 R133 R134 |
5888487 //OR R136 R132 R135 |
20c8800 //ADD R12 R136 R0 |
d80001f //ASSIGN R128 I(31 ) |
2038000 //ADD R3 R128 R0 |
e000b0c //COPYBLOCK DstId: R0 SrcOffset: R11 DstOffsetAndLen: R12 |
1200000 //DELIVERCOMMAND R32 R0 R0 |
f000000 //EXIT R0 R0 R0 |
/branches/beta_2.0/regressions/multi_core/simple_render.cp
0,0 → 1,28
#include "theia.thh" |
#include "code_block_header.thh" |
|
|
scalar DstOffsetAndLen,SrcOffset,CoredId; |
//First send the data into cores |
|
SrcOffset = 0; |
DstOffsetAndLen = (0x0 | (SIMPLE_RENDER_VP_INPUT_DATA_LEN << 20) ); |
|
while (CoredId <= THEIA_CAPABILTIES_MAX_CORES) |
{ |
copy_data_block< CoredId, DstOffsetAndLen, SrcOffset>; |
SrcOffset += SIMPLE_RENDER_VP_INPUT_DATA_LEN; |
CoredId++; |
} |
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
|
SrcOffset = SIMPLE_RENDER_VP_CODE_OFFSET; |
DstOffsetAndLen = (0x0 | SIMPLE_RENDER_VP_CODE_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < ALLCORES , DstOffsetAndLen ,SrcOffset>; |
|
start <ALLCORES>; |
|
exit ; |
/branches/beta_2.0/regressions/multi_core/simple_render.vp
0,0 → 1,235
#include "Utils.th" |
|
|
#define CameraPosition r51 |
#define ProjectionWindowScale r52 |
#define ProjectionWindowMin r53 |
#define RayDirection r54 |
#define PrimitiveCount r55 |
#define MaxPrimitives r56 |
#define Pixel2DPosition r57 |
#define Last_t r58 |
#define PixelColor r59 |
#define PixelPosition r60 |
#define InitialPosition r61 |
#define Three r62 |
#define CurrentOutputPixel r64 |
#define CurrentTextureColor r65 |
#define V0 r68 |
#define V1 r69 |
#define V2 r60 |
#define TextureColor r61 |
#define LastColumn r62 |
#define Pixel2DFinalPosition r63 |
|
#macro C = DotProduct( A, B ) |
R47 = A * B; |
R47.x = R47.xxx + R47.yyy; |
C = R47.xxx + R47.zzz; |
#endmacro |
|
#macro C = CrossProduct( A, B ) |
R47 = A.yzx * B.zxy; |
R48 = A.zxy * B.yzx; |
C = R47 - R48; |
#endmacro |
|
|
//Specifiy that the code is using scaled fixed point arithmetic by default |
using fixed_point_arithmetic; |
|
ProjectionWindowScale = 0x0000147a; |
|
Pixel2DPosition = 0; |
ProjectionWindowMin = 0xfff80000; |
ProjectionWindowMin.z = 0; |
|
CameraPosition = (0,0x00040000,0x00020000); |
MaxPrimitives = 2; |
PrimitiveCount = 2; |
LastColumn = 10; |
|
V1 = (0x00050000, 0xfffa0000, 0x00000000 ); |
|
V0 = (0xfffb0000, 0xfffa0000,0x00000000 ); |
|
V2 = (0x00050000, 0x00040000,0x00000000 ); |
|
|
//---------------------------------------------------------- |
function main() |
{ |
vector Hit,AllDone; |
//Make sure GenerateRay is only called once |
if ( PrimitiveCount == MaxPrimitives ) |
{ |
GenerateRay(); |
Hit = 0; |
} |
Hit = CalculateBaricentricIntersection(); |
PrimitiveCount--; |
if ( PrimitiveCount != 0 ) |
{ |
exit; |
} |
|
if (Hit != 0) |
{ |
TextureCalculation(); |
PrePixelShader(); |
} |
|
PixelShader(); |
GenerateNextPixel(); |
return 1; |
exit; |
} |
|
//---------------------------------------------------------- |
function GenerateRay() |
{ |
vector UnnormalizedDirection, tmp; |
|
UnnormalizedDirection = (ProjectionWindowMin + Pixel2DPosition * ProjectionWindowScale ) - CameraPosition; |
tmp = UnnormalizedDirection * UnnormalizedDirection; //tmp = (x^2,y^2,z^2) |
RayDirection = UnnormalizedDirection / sqrt( tmp.xxx + tmp.yyy + tmp.zzz ); |
|
|
return ; |
|
} |
//--------------------------------------------------------------------- |
function CalculateBaricentricIntersection() |
{ |
vector E1,E2,T,P,Q,H; |
vector Delta,t; |
|
PixelColor = 0; |
T.y = 1; |
E1 = V1 - V0; |
E2 = V2 - V0; |
T = CameraPosition - V0; |
P = CrossProduct( RayDirection, E2 ); |
Q = CrossProduct( T, E1 ); |
H.x = DotProduct(Q,E2); |
H.y = DotProduct(P,T); |
H.z = DotProduct( Q, RayDirection ); |
Delta = DotProduct( P, E1 ); |
t = H / Delta; |
|
vector ExpectedResult = (0x000e8f71, 0xffffcccd, 0xffff999a); |
if ( t != ExpectedResult) |
{ |
R66 = 0xdead; |
} else { |
R66 = 0xaced; |
} |
|
if (t.yyy >= 0) |
{ |
E2.y = E1.zzz + E1; |
if (E2.yyy > T.yyy) |
{ return 0; } |
|
} else { |
return 0; |
} |
|
return 1; |
} |
//--------------------------------------------------------------------- |
function PixelShader() |
{ |
//This does nothing because IO is not yet implemented |
//I = { `OMWRITE ,`OREG_PIXEL_COLOR ,`CREG_CURRENT_OUTPUT_PIXEL ,`CREG_TEXTURE_COLOR }; |
return ; |
} |
//--------------------------------------------------------------------- |
function GenerateNextPixel() |
{ |
PrimitiveCount = MaxPrimitives; |
TextureColor = 0; |
CurrentOutputPixel += 3; |
|
|
if (Pixel2DPosition.xxx >= LastColumn.xxx ) |
{ |
Pixel2DPosition.x++; |
return 0; |
} else { |
Pixel2DPosition.x = 0; |
Pixel2DPosition.y++; |
if (Pixel2DPosition.yyy == Pixel2DFinalPosition.yyy) |
{ |
return 1; |
} else { |
return 0; |
} |
|
} |
} |
//--------------------------------------------------------------------- |
//Do this calculation only if this triangle is the one closest to the camera |
function TextureCalculation() |
{ |
vector uv_coordinate, fuv, uv1, uv2; |
// vector w1,w2,w3,w4; |
|
// //u_coordinate = U0 + last_u * (U1 - U0) + last_v * (U2 - U0); |
// //v_coordinate = V0 + last_u * (V1 - V0) + last_v * (V2 - V0); |
uv_coordinate = UV0 + last_uv.xxx * (UV1 - UV0) + last_uv.yyy * (UV2 - UV0); |
|
// //fu = (u_coordinate) * gTexture.mWidth |
// //fv = (v_coordinate) * gTexture.mWidth |
fuv = (uv_coordinate) * gTextureSize.xxx; |
|
// //u1 = ((int)fu) % gTexture.mWidth |
// //v1 = ((int)fv) % gTexture.mHeight |
// uv1 = integer( fuv ) % gTextureSize; |
|
// //u2 = (u1 + 1 ) % gTexture.mWidth |
// //v2 = (v2 + 1 ) % gTexture.mHeight |
// uv2 = (uv1 + 1) % gTextureSize; |
|
// //Cool now we should store the values in the appropiate registers |
// //TextureOutputCoord1.x = u1 + v1 * gTexture.mWidth |
// //TextureOutputCoord1.y = u2 + v1 * gTexture.mWidth |
// //TextureOutputCoord1.z = 0 |
// //TextureOutputCoord2.x = u1 + v2 * gTexture.mWidth |
// //TextureOutputCoord2.y = u2 + v2 * gTexture.mWidth |
// //TextureOutputCoord2.z = 0 |
|
TextureOutputCoord1.x = uv1.xxx + uv1.yyy * gTextureSize.xxx; |
TextureOutputCoord1.y = uv2.xxx + uv1.yyy * gTextureSize.xxx; |
TextureOutputCoord1.z = 0; |
|
TextureOutputCoord2.x = uv1.xxx + uv2.yyy * gTextureSize.xxx; |
TextureOutputCoord2.y = uv2.xxx + uv2.yyy * gTextureSize.xxx; |
TextureOutputCoord2.z = 0; |
|
// //Cool now get the weights |
// //w1.xyz = (1 - fracu) * (1 - fracv) |
// //w2.xyz = fracu * (1 - fracv) |
// //w3.xyz = (1 - fracu) * fracv |
// //w4.xyz = fracu * fracv |
// vector ones = (1,1,1); |
// vector fracuv; |
|
fracuv = fraction( fuv ); |
|
w1 = ones - fracuv; |
w2 = fracuv * w1.yxz; |
w3 = w2.yyy; |
w2 = w2.xxx; |
w4 = fracuv.xxx * fracuv.yyy; |
|
// //All done, let's get out of here |
return ; |
|
} |
//--------------------------------------------------------------------- |
function PrePixelShader() |
{ |
return ; |
} |
//--------------------------------------------------------------------- |
/branches/beta_2.0/regressions/multi_core/theia.thh
0,0 → 1,3
#define THEIA_CAPABILITIES_MAX_CORES 4 |
#define ALLCORES 31 |
#define VP_DST_CODE_MEM (1<<31) |
/branches/beta_2.0/regressions/multi_core/code_block_header.thh
0,0 → 1,4
|
#define SIMPLE_RENDER_VP_CODE_SIZE (147<<20) |
#define SIMPLE_RENDER_VP_CODE_OFFSET 0 |
#define SIMPLE_RENDER_VP_INPUT_DATA_LEN 66 |
/branches/beta_2.0/regressions/single_core/test_omem_1.config
0,0 → 1,11
|
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].omem[0] == 0000aced |
vp[2].omem[1] == 0000cafe |
vp[2].omem[2] == 0000babe |
vp[2].omem[4] == 0000beef |
vp[2].omem[5] == 0000feed |
vp[2].omem[6] == 0000faaa |
/branches/beta_2.0/regressions/single_core/test_arrays_1.cp
0,0 → 1,16
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_ARRAYS_1_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_ARRAYS_1_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
|
/branches/beta_2.0/regressions/single_core/test_default_code1.vp
0,0 → 1,235
#include "Utils.th" |
|
|
#define CameraPosition r51 |
#define ProjectionWindowScale r52 |
#define ProjectionWindowMin r53 |
#define RayDirection r54 |
#define PrimitiveCount r55 |
#define MaxPrimitives r56 |
#define Pixel2DPosition r57 |
#define Last_t r58 |
#define PixelColor r59 |
#define PixelPosition r60 |
#define InitialPosition r61 |
#define Three r62 |
#define CurrentOutputPixel r64 |
#define CurrentTextureColor r65 |
#define V0 r68 |
#define V1 r69 |
#define V2 r60 |
#define TextureColor r61 |
#define LastColumn r62 |
#define Pixel2DFinalPosition r63 |
|
#macro C = DotProduct( A, B ) |
R47 = A * B; |
R47.x = R47.xxx + R47.yyy; |
C = R47.xxx + R47.zzz; |
#endmacro |
|
#macro C = CrossProduct( A, B ) |
R47 = A.yzx * B.zxy; |
R48 = A.zxy * B.yzx; |
C = R47 - R48; |
#endmacro |
|
|
//Specifiy that the code is using scaled fixed point arithmetic by default |
using fixed_point_arithmetic; |
|
ProjectionWindowScale = 0x0000147a; |
|
Pixel2DPosition = 0; |
ProjectionWindowMin = 0xfff80000; |
ProjectionWindowMin.z = 0; |
|
CameraPosition = (0,0x00040000,0x00020000); |
MaxPrimitives = 2; |
PrimitiveCount = 2; |
LastColumn = 10; |
|
V1 = (0x00050000, 0xfffa0000, 0x00000000 ); |
|
V0 = (0xfffb0000, 0xfffa0000,0x00000000 ); |
|
V2 = (0x00050000, 0x00040000,0x00000000 ); |
|
|
//---------------------------------------------------------- |
function main() |
{ |
vector Hit,AllDone; |
//Make sure GenerateRay is only called once |
if ( PrimitiveCount == MaxPrimitives ) |
{ |
GenerateRay(); |
Hit = 0; |
} |
Hit = CalculateBaricentricIntersection(); |
PrimitiveCount--; |
if ( PrimitiveCount != 0 ) |
{ |
exit; |
} |
|
if (Hit != 0) |
{ |
TextureCalculation(); |
PrePixelShader(); |
} |
|
PixelShader(); |
GenerateNextPixel(); |
return 1; |
exit; |
} |
|
//---------------------------------------------------------- |
function GenerateRay() |
{ |
vector UnnormalizedDirection, tmp; |
|
UnnormalizedDirection = (ProjectionWindowMin + Pixel2DPosition * ProjectionWindowScale ) - CameraPosition; |
tmp = UnnormalizedDirection * UnnormalizedDirection; //tmp = (x^2,y^2,z^2) |
RayDirection = UnnormalizedDirection / sqrt( tmp.xxx + tmp.yyy + tmp.zzz ); |
|
|
return ; |
|
} |
//--------------------------------------------------------------------- |
function CalculateBaricentricIntersection() |
{ |
vector E1,E2,T,P,Q,H; |
vector Delta,t; |
|
PixelColor = 0; |
T.y = 1; |
E1 = V1 - V0; |
E2 = V2 - V0; |
T = CameraPosition - V0; |
P = CrossProduct( RayDirection, E2 ); |
Q = CrossProduct( T, E1 ); |
H.x = DotProduct(Q,E2); |
H.y = DotProduct(P,T); |
H.z = DotProduct( Q, RayDirection ); |
Delta = DotProduct( P, E1 ); |
t = H / Delta; |
|
vector ExpectedResult = (0x000e8f71, 0xffffcccd, 0xffff999a); |
if ( t != ExpectedResult) |
{ |
R66 = 0xdead; |
} else { |
R66 = 0xaced; |
} |
|
if (t.yyy >= 0) |
{ |
E2.y = E1.zzz + E1; |
if (E2.yyy > T.yyy) |
{ return 0; } |
|
} else { |
return 0; |
} |
|
return 1; |
} |
//--------------------------------------------------------------------- |
function PixelShader() |
{ |
//This does nothing because IO is not yet implemented |
//I = { `OMWRITE ,`OREG_PIXEL_COLOR ,`CREG_CURRENT_OUTPUT_PIXEL ,`CREG_TEXTURE_COLOR }; |
return ; |
} |
//--------------------------------------------------------------------- |
function GenerateNextPixel() |
{ |
PrimitiveCount = MaxPrimitives; |
TextureColor = 0; |
CurrentOutputPixel += 3; |
|
|
if (Pixel2DPosition.xxx >= LastColumn.xxx ) |
{ |
Pixel2DPosition.x++; |
return 0; |
} else { |
Pixel2DPosition.x = 0; |
Pixel2DPosition.y++; |
if (Pixel2DPosition.yyy == Pixel2DFinalPosition.yyy) |
{ |
return 1; |
} else { |
return 0; |
} |
|
} |
} |
//--------------------------------------------------------------------- |
//Do this calculation only if this triangle is the one closest to the camera |
function TextureCalculation() |
{ |
// vector uv_coordinate, fuv, uv1, uv2; |
// vector w1,w2,w3,w4; |
|
// //u_coordinate = U0 + last_u * (U1 - U0) + last_v * (U2 - U0); |
// //v_coordinate = V0 + last_u * (V1 - V0) + last_v * (V2 - V0); |
// uv_coordinate = UV0 + last_uv.xxx * (UV1 - UV0) + last_uv.yyy * (UV2 - UV0); |
|
// //fu = (u_coordinate) * gTexture.mWidth |
// //fv = (v_coordinate) * gTexture.mWidth |
// fuv.x = (uv_coordinate) * gTextureSize.xxx; |
|
// //u1 = ((int)fu) % gTexture.mWidth |
// //v1 = ((int)fv) % gTexture.mHeight |
// uv1 = integer( fuv ) % gTextureSize; |
|
// //u2 = (u1 + 1 ) % gTexture.mWidth |
// //v2 = (v2 + 1 ) % gTexture.mHeight |
// uv2 = (uv1 + 1) % gTextureSize; |
|
// //Cool now we should store the values in the appropiate registers |
// //TextureOutputCoord1.x = u1 + v1 * gTexture.mWidth |
// //TextureOutputCoord1.y = u2 + v1 * gTexture.mWidth |
// //TextureOutputCoord1.z = 0 |
// //TextureOutputCoord2.x = u1 + v2 * gTexture.mWidth |
// //TextureOutputCoord2.y = u2 + v2 * gTexture.mWidth |
// //TextureOutputCoord2.z = 0 |
|
// TextureOutputCoord1.x = uv1.xxx + uv1.yyy * gTextureSize.xxx; |
// TextureOutputCoord1.y = uv2.xxx + uv1.yyy * gTextureSize.xxx; |
// TextureOutputCoord1.z = 0; |
|
// TextureOutputCoord2.x = uv1.xxx + uv2.yyy * gTextureSize.xxx; |
// TextureOutputCoord2.y = uv2.xxx + uv2.yyy * gTextureSize.xxx; |
// TextureOutputCoord2.z = 0; |
|
// //Cool now get the weights |
// //w1.xyz = (1 - fracu) * (1 - fracv) |
// //w2.xyz = fracu * (1 - fracv) |
// //w3.xyz = (1 - fracu) * fracv |
// //w4.xyz = fracu * fracv |
// vector ones = (1,1,1); |
// vector fracuv; |
|
// fracuv = fraction( fuv ); |
|
// w1 = ones - fracuv; |
// w2 = fracuv * w1.yxz; |
// w3 = w2.yyy; |
// w2 = w2.xxx; |
// w4 = fracuv.xxx * fracuv.yyy; |
|
// //All done, let's get out of here |
return ; |
|
} |
//--------------------------------------------------------------------- |
function PrePixelShader() |
{ |
return ; |
} |
//--------------------------------------------------------------------- |
/branches/beta_2.0/regressions/single_core/test_expressions.cp
0,0 → 1,16
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_EXPRESSIONS_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_EXPRESSIONS_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
|
/branches/beta_2.0/regressions/single_core/test_bubble_sort.cptmp
0,0 → 1,15
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_BUBBLE_SORT_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_BUBBLE_SORT_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
/branches/beta_2.0/regressions/single_core/test_arrays_1.config
0,0 → 1,5
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
/branches/beta_2.0/regressions/single_core/test_expressions.config
0,0 → 1,5
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
/branches/beta_2.0/regressions/single_core/test_multihtread1.vp
0,0 → 1,62
#define RESULT R66 |
|
|
//Turn on multithreading |
|
|
|
//Main thread |
|
//------------------------------------------------------- |
function main() |
{ |
//Start the second thread |
//compiler does this CONTROL_REGISTER = 1; |
//Also set the thread data offset and code offset |
StartThread(); |
|
vector a,b = (1,2,3),i,expected_result = (10,11,12); |
|
i = 0; |
while (i.xxx < 10) |
{ |
a = b + i; |
i++; |
} |
|
if (a != expected_result) |
{ |
RESULT = 0xdead; |
} else { |
RESULT = 0xaced; |
} |
|
exit ; |
} |
//------------------------------------------------------- |
|
//------------------------------------------------------- |
//Threads can not take input arguments |
thread MyThread() |
{ |
vector a = (1,2,3),b,i,expected_result = (10,11,12); |
i = 0; |
while ( i.xxx < 10) |
{ |
b = a + i; |
i++; |
} |
if (b != expected_result) |
{ |
r67 = 0xdead; |
} else { |
r67 = 0xaced; |
} |
} |
//------------------------------------------------------- |
function StartThread() |
{ |
start MyThread(); |
return ; |
} |
//------------------------------------------------------- |
/branches/beta_2.0/regressions/single_core/test1_out_of_order_1.cp
0,0 → 1,16
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST1_OUT_OF_ORDER_1_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST1_OUT_OF_ORDER_1_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
|
/branches/beta_2.0/regressions/single_core/test_multithread2.vp
0,0 → 1,45
|
//------------------------------------------------------- |
function main() |
{ |
vector A = (100,200,300), B = (2,2,2), C, D; |
|
StartThread(); |
C = A / B; |
D = C + C; |
|
|
if (D == A) |
{ |
R66 = 0xaced; |
} else { |
R66 = 0xdead; |
} |
exit; |
} |
|
//------------------------------------------------------- |
//Threads can not take input arguments |
thread MyThread() |
{ |
vector a = (1,2,3),b,i,expected_result = (10,11,12); |
i = 0; |
while ( i.xxx < 10) |
{ |
b = a + i; |
i++; |
} |
if (b == expected_result) |
{ |
r67 = 0xaced; |
} else { |
r67 = 0xdead; |
} |
} |
//------------------------------------------------------- |
function StartThread() |
{ |
start MyThread(); |
return ; |
} |
//------------------------------------------------------- |
/branches/beta_2.0/regressions/single_core/test_branches_1.vp
0,0 → 1,146
#define Result r66 |
|
vector a,b; |
|
a = 0xcafe; |
b = 0xcaca; |
if (a == b) |
{ |
Result = 0xdead; |
exit ; |
} |
|
b = 0xcafe; |
if (a == b) |
{ |
R24 = 0xcaca; |
if (R24 == a) |
{ |
Result = 0xdead; |
exit ; |
} else { |
if (a != R24) |
{ |
b = 0xaca; |
if ( a != b ) |
{ |
a = 1; |
b = 2; |
if ( a > b ) |
{ |
Result = 0xdead; |
exit ; |
} |
|
if ( a < b ) |
{ |
if (a <= b ) |
{ |
//a = b; |
a = 666; |
b = 666; |
if ( a >= b ) |
{ |
a = 0xcafe; |
b = 0xcafe; |
//Ok so far so good, go to part 2 |
} else { |
Result = 0xdead; |
exit ; |
} |
} else { |
Result = 0xdead; |
exit ; |
} |
} |
} else { |
Result = 0xdead; |
exit ; |
} |
} |
} |
|
} else { |
Result = 0xdead; |
exit ; |
} |
|
Result = 0xaced; |
|
|
//Now test nested if statements |
vector c,d,e,f,g,h,i,j,k; |
|
if (a == 0xcafe ) |
{ |
a = 10; |
b = 2; |
c = a / b; |
d = 5; |
if (c == d) |
{ |
|
c = d * b; |
if (a == c ) |
{ |
c = 0xaced; |
if (c == 0xaced) |
{ |
d = 0xaced; |
if (d == 0xaced) |
{ |
e = 0xaced; |
if (e == 0xaced) |
{ |
f = 0xaced; |
if (f == 0xaced) |
{ |
g = 0xaced; |
if (g == 0xaced) |
{ |
h = 0xaced; |
if (h == 0xaced) |
{ |
i = 0xaced; |
if (i == 0xaced) |
{ |
j = 0xaced; |
if (j == 0xaced) |
{ |
k = 0xaced; |
if (k == 0xaced) |
{ |
if (c == 0xaced) |
{ |
Result = 0xaced; |
exit ; |
} |
} |
|
} |
} |
} |
} |
} |
} |
} |
} |
} else { |
Result = 0x100dead; |
Result = 0x100dead; |
exit ; |
} |
} else { |
R30 = 0xdead; |
} |
|
|
} else { |
Result = 0xdead; |
c = 0xdead; |
d = 0xdead; |
e = 0xdead; |
f = 0xdead; |
g = 0xdead; |
} |
exit ; |
/branches/beta_2.0/regressions/single_core/test_bubble_sort.cpx
0,0 → 1,15
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_BUBBLE_SORT_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_BUBBLE_SORT_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
/branches/beta_2.0/regressions/single_core/test1_out_of_order_1.config
0,0 → 1,6
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
vp[2].omem[2] != x |
/branches/beta_2.0/regressions/single_core/test_bitwise_operations.vp
0,0 → 1,53
|
|
//------------------------------------------------------------- |
function main() |
{ |
vector result, foo, bar, expected_result; |
foo = 0b10101010; |
bar = 0b1111; |
expected_result = 0b1010; |
|
//Test the AND |
result = foo & bar; |
if (result != expected_result) |
{ |
R66 = 0xdead; |
exit ; |
} |
|
foo = 0b1111; |
bar = 0b0000; |
result = foo & bar; |
if (result != 0 ) |
{ |
R66 = 0xdead; |
exit ; |
} |
|
//Test the OR |
result = foo | bar; |
expected_result = 0b1111; |
if (result != expected_result) |
{ |
R66 = 0xdead; |
exit ; |
} |
|
vector goo; |
foo = 0xa; |
bar = 0x3; |
goo = 0xc; |
|
result = (foo & (foo | bar) | bar) & goo; |
expected_result = 8; |
if (result != expected_result) |
{ |
R66 = 0xdead; |
exit ; |
} |
|
r66 = 0xaced; |
exit ; |
} |
//------------------------------------------------------------- |
/branches/beta_2.0/regressions/single_core/test_default_code1.cp
0,0 → 1,15
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_DEFAULT_CODE1_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_DEFAULT_CODE1_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
/branches/beta_2.0/regressions/single_core/test_omem_1.vp
0,0 → 1,28
|
|
|
vector v1,v2,v3; |
|
|
v1 = (0xcafe,0xcafe,0xcafe); |
v2 = (0x1E11,0x1E11,0x1E11); |
v3 = 0xbabe; |
out[0] = v1 - v2; //0xaced |
out[1] = v1; //0xcafe |
out[2] = v3; //0xbabe |
|
v3.x = 4; |
v3.y = 5; |
v3.z = 6; |
v1.x = 0xbeef; |
v1.y = 0xfeed; |
v1.z = 0xfaaa; |
|
out[ v3 ] = v1; |
|
v2 = v1; |
v2 = v1; |
v2 = v1; |
v2 = v1; |
v2 = v1; |
exit; |
/branches/beta_2.0/regressions/single_core/test_default_code1.config
0,0 → 1,6
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
vp[2].omem[2] != x |
/branches/beta_2.0/regressions/single_core/test_multihtread1.cp
0,0 → 1,16
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_MULTIHTREAD1_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_MULTIHTREAD1_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
|
/branches/beta_2.0/regressions/single_core/test_arrays_1.vp
0,0 → 1,81
#define Result r66 |
|
function main() |
{ |
|
vector a = (3,3,3),b = (2,2,2), c = (2,3,4); |
vector result1, result2; |
|
vector array[ 5 ]; |
vector caca = (0xcaca,0,0); |
array[ c ] = (a + b) * b; |
a = 10; |
result1 = 0; |
|
caca = array[ c ] + result1; |
if ( caca != a) |
{ |
Result = 0x100dead; |
exit ; |
} |
|
vector i = (0,0,0); |
while ( i.xxx < 5 ) |
{ |
array[ i ] = i; |
i++; |
} |
|
i = 0; |
while ( i.xxx < 5 ) |
{ |
vector tmp, boo = (0,0,0); |
tmp = array[ i ] + boo; |
if ( tmp != i ) |
{ |
Result = 0x200dead; |
exit ; |
} |
i++; |
} |
|
a = 1; |
b = 2; |
c = 3; |
//This function makes it fail! |
//result1 = MyFunction( a,b,c); |
Result = 0xaced; |
exit ; |
} |
|
// -------------------------------------------- |
function MyFunction(v1, v2, v3) |
{ |
vector a = (0xa,0xa,0xa); |
vector foo,i,tmp; |
vector array[ 16 ]; |
foo = 2; |
tmp = 0; |
a = 0x666; |
//a += 2; |
R40 = 0xcafe; |
v1 += 2; |
array[ foo ] = a+a; |
|
i = 0; |
while ( i.xxx < 16 ) |
{ |
array[ i ] = a+a-a; |
foo = array[ i ] + tmp; |
if (foo != a) |
{ |
Result = 0x300dead; |
Result = 0x300dead; |
exit; |
} |
i++; |
} |
|
return a + v1 + v2*v3; |
} |
// -------------------------------------------- |
/branches/beta_2.0/regressions/single_core/test_multithread2.cp
0,0 → 1,16
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_MULTITHREAD2_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_MULTITHREAD2_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
|
/branches/beta_2.0/regressions/single_core/test_branches_1.cp
0,0 → 1,16
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_BRANCHES_1_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_BRANCHES_1_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
|
/branches/beta_2.0/regressions/single_core/test_expressions.vp
0,0 → 1,53
|
//------------------------------------------------------- |
function main() |
{ |
|
vector a = (5,5,5),b,c,d,e; |
|
b = a; |
c = (2,2,2); |
if ( a + b > c*a + 1 ) |
{ |
R66 = 0xdead; |
exit ; |
} |
|
if ( b != c + (3,3,3)) |
{ |
R66 = 0xdead; |
exit ; |
} |
|
|
|
|
vector result; |
|
result = (7,7,7) + a * 2 + (3,3,3); |
|
if (result != 20) |
{ |
R66 = 0xdead; |
exit ; |
} |
|
//result = MyFunct1( a - 3, c, 2*c*a, a, c+(3,3,3) ); |
|
// if (result != 2) |
// { |
// R66 = 0xdead; |
// exit ; |
// } |
|
R66 = 0xaced; |
exit ; |
|
} |
//------------------------------------------------------- |
|
function MyFunct1( a, b, c ,d , e) |
{ |
return ( a*b - c*(d+e)); |
} |
//------------------------------------------------------- |
/branches/beta_2.0/regressions/single_core/test_bubble_sort.vptmp
0,0 → 1,73
// void bubbleSort(int numbers[], int array_size) |
// { |
// int i, j, temp; |
|
// for (i = (array_size - 1); i > 0; i--) |
// { |
// for (j = 1; j <= i; j++) |
// { |
// if (numbers[j-1] > numbers[j]) |
// { |
// temp = numbers[j-1]; |
// numbers[j-1] = numbers[j]; |
// numbers[j] = temp; |
// } |
// } |
// } |
// } |
#define Result r66 |
|
#define ARRAY_SIZE 10 |
function main() |
{ |
|
|
|
vector array[ ARRAY_SIZE ]; |
vector i,j; |
i = 0; j = 6; |
array[ i ] = j; |
i = 1; j = 3; |
array[ i ] = j; |
i = 2; j = 1; |
array[ i ] = j; |
i = 3; j = 5; |
array[ i ] = j; |
i = 4; j = 4; |
array[ i ] = j; |
i = 5; j = 2; |
array[ i ] = j; |
i = 6; j = 8; |
array[ i ] = j; |
i = 7; j = 0; |
array[ i ] = j; |
i = 8; j = 9; |
array[ i ] = j; |
i = 9; j = 7; |
array[ i ] = j; |
|
vector t1,t2,t3,t4,t5; |
i = 9; |
while ( i.xxx >= 0) |
{ |
j = 1; |
while (j.xxx < ARRAY_SIZE) |
{ |
t1 = j - 1; |
t2 = array[ t1 ]; |
t3 = array[ j ]; |
if (t2 > t3) |
{ |
t4 = array[t1]; |
t5 = array[j]; |
array[t1] = t5; |
array[j] = t4; |
} |
j++; |
} |
i--; |
} |
Result = 0xaced; |
exit ; |
|
} |
/branches/beta_2.0/regressions/single_core/test_multihtread1.config
0,0 → 1,5
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
/branches/beta_2.0/regressions/single_core/test_multithread2.config
0,0 → 1,5
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
/branches/beta_2.0/regressions/single_core/test_branches_1.config
0,0 → 1,5
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
/branches/beta_2.0/regressions/single_core/test_bitwise_operations.cp
0,0 → 1,16
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_BITWISE_OPERATIONS_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_BITWISE_OPERATIONS_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |
|
/branches/beta_2.0/regressions/single_core/test1_out_of_order_1.vp
0,0 → 1,59
#define Result R66 |
//The intention of this test is to excerisve various |
//WAW and RAW conditions |
|
vector v1,v2,v3,v4,v5,v6,v7,v8; |
|
v1 = 0; |
v2 = 10; |
v3 = 20; |
v4 = 30; |
v5 = 1; |
|
v6 = v3 / v2; //v6 = 20/10 = 10 |
v2 = 0; |
v3 = 0xbeef; |
|
//Here v6 depends on the DIVIDER, ADD_STA0 has to wait |
//ADD_0 -> 0000 | DIV | 0000aced0000aced0000aced | 000000000000000000000000 |
v6 = 0xACED; |
|
//Here v6 depends on the last operation, which depends on the divider |
//ADD_1 -> ADD_0 | 0000 | 000000000000000000000000 | 000000000000000000000000 |
v2 = v6 + v2; |
|
|
//Here the multiplication depends on both Adders |
//MUL -> ADD_1 | ADD_0 | 000000000000000000000000 | 000000000000000000000000 |
v3 = v2 * v6; |
v2 = 0x74CF5369; |
if (v3 != v2) |
{ |
Result = v3 + R0; |
exit ; |
} |
|
|
Result = 0xaced; |
exit ; |
|
|
//It fails from here on... :( |
|
//Here the square root depends on ADD 0 which depends MUL |
// MUL | 0000 | 0000beef0000beef0000beef | 000000000000000000000000 |
R60 = 4; |
R60 = sqrt( scale( R60 ) ); |
|
v3 = unscale( R60 ); |
//This guy depends of SQRT |
v4 = v3 + R0.xxx; |
|
if (v4 != 2) |
{ |
Result = v4 + R0; |
exit ; |
} |
|
Result = 0xaced; |
exit ; |
/branches/beta_2.0/regressions/single_core/test_bitwise_operations.config
0,0 → 1,5
//This is file defines the passing criteria for the test |
//Here 'x' stands for 1 or more bits with an 'x' value |
//All right hand side values all assumed to be hexadecimal numbers |
|
vp[2].r[66] == 0000aced 0000aced 0000aced |
/branches/beta_2.0/regressions/single_core/test_bubble_sort.vpx
0,0 → 1,34
// void bubbleSort(int numbers[], int array_size) |
// { |
// int i, j, temp; |
|
// for (i = (array_size - 1); i > 0; i--) |
// { |
// for (j = 1; j <= i; j++) |
// { |
// if (numbers[j-1] > numbers[j]) |
// { |
// temp = numbers[j-1]; |
// numbers[j-1] = numbers[j]; |
// numbers[j] = temp; |
// } |
// } |
// } |
// } |
|
#define ARRAY_SIZE 10 |
function main() |
{ |
vector array[ ARRAY_SIZE ]; |
array[ 0 ] = 6; |
array[ 1 ] = 3; |
array[ 2 ] = 1; |
array[ 3 ] = 5; |
array[ 4 ] = 4; |
array[ 5 ] = 2; |
array[ 6 ] = 8; |
array[ 7 ] = 0; |
array[ 8 ] = 9; |
array[ 9 ] = 7; |
|
} |
/branches/beta_2.0/regressions/single_core/test_omem_1.cp
0,0 → 1,15
#include "code_block_header.thh" |
#define VP_DST_CODE_MEM (1<<31) |
#define VP02 2 |
|
scalar SrcOffset = TEST_OMEM_1_OFFSET,DstOffset; |
DstOffset = (0x0 | TEST_OMEM_1_SIZE | VP_DST_CODE_MEM ); |
copy_data_block < VP02 , DstOffset ,SrcOffset>; |
|
|
//wait until enqueued block transfers are complete |
while ( block_transfer_in_progress ) {} |
|
start <VP02>; |
|
exit ; |