Sun Microelectronics
197
13. UltraSPARC Extended Instructions
13.3.2 Fixed Data Formats
The fixed 16-bit data format consists of four 16-bit signed fixed-point values con-
tained in a 64-bit word. The fixed 32-bit format consists of two 32-bit signed fixed
point-values contained in a 64-bit word. Fixed data values provide an intermedi-
ate format with enough precision and dynamic range for filtering and simple im-
age computations on pixel values. Conversion from pixel data to fixed data
occurs through pixel multiplication. Conversion from fixed data to pixel data is
done with the pack instructions, which clip and truncate to an 8-bit unsigned val-
ue. Conversion from 32-bit fixed to 16-bit fixed is also supported with the
FPACKFIX instruction. Rounding can be performed by adding 1 to the round bit
position. Complex calculations needing more dynamic range or precision should
be performed using floating-point data.
Figure 13-1 shows the graphics data formats.
Figure 13-1
Graphics Data Formats
Note:
Sun frame buffer pixel component ordering is:
α
, B, G, R.
13.4 Graphics Status Register (GSR)
The GSR is accessed with implementation-dependent RDASR and WRASR in-
structions using ASR 13
16
.
opcode
op3
reg field
operation
RDASR
10 1000
rs1 = 19
Read GSR
WRASR
11 0000
rd = 19
Write GSR
Fixed32
31
23
15
7
Pixel
Fixed16
int
frac
int
frac
int
frac
int
frac
int
frac
int
frac
0
24
16
8
63
47
31
15
0
48
32
16
63
31
0
32
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com