EasyManua.ls Logo

Infineon TriCore TC1.6P - Pack

Infineon TriCore TC1.6P
484 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
TriCore
®
TC1.6P & TC1.6E
32-bit Unified Processor Core
Instruction Set
V1.0 2013-07
User Manual (Volume 2) 3-310
PACK
Pack
Description
Take the data register pair E[d] and bit 31 of data register D[a] and pack them into an IEEE-754-1985 single
precision floating point format number, in data register D[c]. The odd register E[d][63:32], holds the unbiased
exponent. The even register E[d][31:0], holds the normalised mantissa in a fractional 1.31 format. Bit 31 of data
register D[a] holds the sign bit.
To compute the floating point format number, the input number is first checked for special cases: Infinity, NAN,
Overflow, Underflow and Zero. If the input number is not one of these special cases, it is either a normal or
denormal number. In both cases, rounding of the input number is performed. First an intermediate biased
exponent is calculated, by adding 128 to the unpacked exponent for normal numbers and set to zero for denormal
numbers, and inserted into bits [30:23] of the intermediate result. Bits [30:8] of E[d] are inserted into bits [22:0] of
the intermediate result. A round flag is calculated from bits [8:0] of E[d] using the IEEE-754-1985 Round-to-
Nearest rounding definition, with the PSW.C field acting as an additional sticky bit. If the round flag is set, the
intermediate result is incremented by one. Bits [30:0] of the intermediate result are then inserted into bits [30:0] of
D[c]. In all cases, bit 31 from D[a] is copied into bit 31 of D[c]. The special cases are handled as described below.
PACKD[c], E[d], D[a] (RRR)
int_exp = E[d][63:32];
int_mant = E[d][31:0];
flag_rnd = int_mant[7] AND (int_mant[8] OR int_mant[6:0] OR PSW.C);
if ((int_mant[31] == 0) AND (int_exp == +255)) then {
// Infinity or NaN
fp_exp = +255;
fp_frac = int_mant[30:8];
} else if ((int_mant[31] == 1) AND (int_exp >= +127)) then {
// Overflow ? Infinity.
fp_exp = +255;
fp_frac = 0;
} else if ((int_mant[31] == 1) AND (int_exp <= -128)) then {
// Underflow ? Zero
fp_exp = 0;
fp_frac = 0;
} else if (int_mant == 0) then {
// Zero
fp_exp = 0;
fp_frac = 0;
} else {
if (int_mant[31] == 0) then {
// Denormal
temp_exp = 0;
31
c
28 27
d
24 23
00
H
20 19
-
18 17
0
H
16 15
-
12 11
a
8 7
6B
H
0

Table of Contents

Related product manuals