© 2006 Microchip Technology Inc. DS70118G-page 9
dsPIC30F2010
2.0 CPU ARCHITECTURE
OVERVIEW
This document provides a summary of the
dsPIC30F2010 CPU and peripheral function. For a
complete description of this functionality, please refer
to the “dsPIC30F Family Reference Manual”
(DS70046).
2.1 Core Overview
The core has a 24-bit instruction word. The Program
Counter (PC) is 23 bits wide with the Least Significant
bit (LSb) always clear (see Section 3.1 “Program
Address Space”), and the Most Significant bit (MSb)
is ign ored du ring no rmal program executi on, ex cept for
certain specialized instructions. Thus, the PC can
address up to 4M instruction words of user program
space. An instruction prefetch mechanism is used to
help maintain throughput. Program loop constructs,
free from loop count management overhead, are sup-
ported using the DO and REPEAT instructions, both of
which are interruptible at any point.
The working register array consists of 16x16-bit regis-
ters, each of which can act as data, address or offset
registers. One working register (W15) operates as a
software Stack Pointer for interrupts and calls.
The data space is 64 Kbytes (32K words) and is split
into two blocks, referred to as X and Y data memory.
Each block has its own independent Address Genera-
tion Unit (AGU). Most instructions operate solely
through the X memory AGU, which provides the
appearance of a single unified data space. The
Multiply-Accumulate (MAC) class of dual source DSP
instructions operate through both the X and Y AGUs,
splitting the data address space into two parts (see
Section 3.2 “Data Address Space”). The X and Y
data space boundary is device specific and cannot be
alter ed by the user . Each dat a word consis ts of 2 bytes,
and mos t instruction s can address data eith er as words
or bytes.
There are two methods of accessing data stored in
program memory:
• The upper 32 Kbyte s of data sp ace memory can be
mapped into the low er half (user space) of pro gram
space at any 16K program word bound ary, defined
by the 8-bit Program Sp ace V is ibility Page
(PSVP AG) register . This lets any instruction access
program space as if it were da t a sp ace , with a lim i-
tation that the access requires an additional c ycle.
Moreover, only the lower 16 bit s o f each instruction
word can be acces sed usi ng this meth od.
• Linear indirect access of 32K word pages within
progra m spac e is also possibl e using any w orking
register, via table read and write instructions.
Table read and write instructions can be used to
access all 24 bits of an instruction word.
Overhead-free circular buffers (Modulo Addressing)
are supported in both X and Y address spaces. This is
primarily intended to remove the loop overhead for
DSP algorithms.
The X AGU also supports Bit-Reversed Addressing on
destination ef fective addresses, to greatly simplify input
or output data reordering for radix-2 FFT algorithms.
Refer to Section 4.0 “Address Generator Units” for
details on Modulo and Bit-Reversed Addressing.
The core s up ports Inherent (n o op era nd), Re lat iv e, Lit-
eral, Memory Direct, Register Direct, Register Indirect,
Register Offset and Literal Offset Addressing modes.
Instruct ions ar e associat ed with p redefined Addressin g
modes, depending upon their functional requirements.
For m os t i ns tru c ti o ns , the c or e i s c apa bl e of e xe c ut i ng
a data (or program data) memory read, a working reg-
ister (data) read, a data memory write and a program
(instruction) memory read per instruction cycle. As a
result, 3-operand instructions are supported, allowing
C = A + B operations to be executed in a single cycle.
A DSP engine has been included to significantly
enhance the core arithmetic capab ility and throughput.
It features a high-speed 17-bit by 17-bit multiplier, a
40-bit ALU, two 40-bit saturating accumulators and a
40-bit b idi rec tio nal b arrel shifter. Dat a in th e a cc umul a-
tor or any worki ng r egist er can be shif ted up to 15 bits
right or 16 bits left in a single cycle. The DSP instruc-
tions ope rate sea mles sly with all other in struct ions an d
have be en desi gned for o ptimal re al-time p erforma nce.
The MAC class of instructions can concurrently fetch
two data operands from memory, while multiplying two
W registers. To enable this concurrent fetching of data
operands, the data space has been split for these
instructions and linear for all others. This has been
achieved in a transparent and flexible manner, by
dedicating certain working registers to each address
spac e for the MAC class of instructions.
The core does not support a multi-stage instruction
pipeline. However, a single stage instruction prefetch
mechanism is used, which accesses and partially
decodes instructions a cycle ahead of execution, in
order to maximize available execution time. Most
instructions execute in a single cycle, with certain
exceptions.
The core features a vectored exception processing
structure for traps and interrupts, with 62 independent
vectors. The exceptions consist of up to 8 traps (of
which 4 are res erv ed ) an d 54 interrupts . Eac h in terru pt
is prioritized based on a user-assigned priority between
1 and 7 (1 being the lowest priority and 7 being the
highest) in conjunction with a predetermined ‘natural
order’. T raps hav e fixed prio rities, rangi ng from 8 to 15.
Note: This data sheet summarizes features of this group
of dsPIC30F devices and is not intended to be a complete
reference source. For more information on the CPU,
peripherals, register descriptions and general device
functionality, refer to the “dsPIC30F Family Reference
Manual” (DS70046). For more information on the device
instruction set and programming, refer to the “dsPIC30F/
33F Programmer’s Reference Manual” (DS70157).