PNX1300/01/02/11 Data Book
Philips Semiconductors
3-2
PRELIMINARY SPECIFICATION
3.1.2
Basic DSPCPU Execution Model
The DSPCPU issues one
‘
long instruction
’
every clock
cycle. Each instruction consists of several operations
(five operations for the PNX1300 microprocessor). Each
operation is comparable to a RISC machine instruction,
except that the execution of an operation is conditional
upon the content of a general purpose register. Exam-
ples of operations are:
IF r10 iadd r11 r12
→
r13
(if r10 true, add r11 and r12 and write sum in r13)
IF r10 ld32d(4) r15
→
r16
(if r10 true, load 32 bits from mem[r15+4] into r16)
IF r20 jmpf r21 r22
(if r20 true and r21 false, jump to address in r22)
Each operation has a specific, known execution latency
in clock cycles. For example, iadd takes 1 cycle; thus the
result of an iadd operation started in clock cycle
i
is avail-
able for use as an argument to operations issued in cycle
i+1
or later. The other operations issued in cycle
i
cannot
use the result of iadd. The ld32d operation has a latency
of 3 cycles. The result of an ld32d operation started in cy-
cle
j
is available for use by other operations issued in cy-
cle
j+3
or later. Branches, such as the jmpf example
above have three delay slots. This means that if a branch
operation in cycle
k
is taken, all operations in the instruc-
tions in cycle
k+1, k+2
and
k+3
are still executed.
In the above examples, r10 and r20 control conditional
execution of the operations. Also known as
‘
guarding
’
,
here r10 and r20 contain the operation
‘
guard
’
. See
Sec-
tion 3.2.1,
“
Guarding (Conditional Execution).
”
Certain restrictions exist in the choice of what operations
can be packed into an instruction. For example, the
DSPCPU in PNX1300 allows no more than two load/
store class operations to be packed into a single instruc-
tion. Also, no more than five results (of previously started
operations) can be written during any one cycle. The
packing of operations is not normally done by the pro-
grammer. Instead, the
instruction scheduler
(See Philips
TriMedia SDE Reference Manual) takes care of convert-
ing the parallel intermediate format code into packed in-
structions ready for the assembler. The rules are formally
described in the
machine description file
used by the in-
struction scheduler and other tools.
3.1.3
PCSW Overview
Figure 3-2
shows the PCSW register. The PNX1300 val-
ue of PCSW on reset is 0x800. For compatibility, any un-
defined PCSW fields should never be modified.
Note that the DSPCPU architecture has no condition
codes or integer arithmetic status flags. Integer opera-
tions that generate out-of-range results deliver an opera-
tion specific bit pattern. For examples, see
dspiadd
in
Appendix A,
“
PNX1300/01/02/11 DSPCPU Operations.
”
Predicate operations exist that take the place of integer
status flags in a classical architecture. Multiword arith-
metic is supported by the
‘
carry
’
operation which gener-
ates a
‘
0
’
or
‘
1
’
depending on the carry that would be gen-
erated if its arguments were summed.
FP-Related Fields.
The IEEE mode field determines the
IEEE rounding mode of all floating point operations, with
the exception of a few floating point conversion opera-
tions that use fixed rounding mode. For examples, see
if-
ixrz
,
ifloatrz
,
ifixrz
,
ifloatrz
in
Appendix A,
“
PNX1300/01/
02/11 DSPCPU Operations.
”
The
FP exception flags
are
‘
sticky bits
’
that are set as a
side effect of floating-point computations. Each floating
point operation can set one or more of the flags if it incurs
the corresponding exception. The flags can only be reset
by direct software manipulation of the PCSW (using the
writepcsw operation). The bits have the meanings shown
in
Table 3-2
.
The
FP exception trap enable bits
determine which FP
exception flags invoke CPU exception handling. An ex-
ception is requested if the intersection of the exception
flags and trap enable flags is non-zero. The acceptance
and handling of exceptions is described in
Section 3.5,
“
Special Event Handling.
”
BSX (Bytesex).
The DSPCPU has a switchable bytesex.
The BSX flag in the PCSW can be written by software.
Load/store operations observe little- or big-endian byte
ordering based on the current setting of BSX.
IEN (Interrupt Enable).
The IEN flag disables or enables
interrupt processing for most interrupt sources. Only NMI
(non-maskable interrupt) bypasses IEN. The acceptance
and handling of interrupts is described in
Section 3.5.3,
“
INT and NMI (Maskable and Non-Maskable Interrupts).
”
MSE
CS
IEN
BSX
IEEE MODE
OFZ
IFZ
INV
OVF
UNF
INX
DBZ
0
1
3
4
5
6
7
8
9
10
11
12
14
15
Misaligned store exception
Write back error
Reserved exception
Count stalls (1
Yes)
Interrupt enable (1
allow interrupts)
FP exception trap-enable bits
IEEE rounding mode
0
to nearest, 1
to zero, 2
to positive, 3
to negative
Byte sex (1
little endian)
PCSW[31:16]
PCSW[15:0]
UNDEF
Misaligned store
exception trap enable
Write back error trap enable
Trap on first exit
FP exceptions
TRP
MSE
TFE
TRP
OFZ
TRP
IFZ
TRP
INV
TRP
OVF
TRP
UNF
TRP
INX
TRP
DBZ
16
17
18
19
20
21
22
23
25
26
27
28
30
31
UNDEF
U N D E F I N E D
13
WBE
RSE
TRP
WBE
TRP
RSE
Reserved exception
trap enable
29
PCSW = 0x800
after RESET
Figure 3-2. PNX1300 PCSW (Program Control and Status Word) register format.