The revision list can be viewed directly by
clicking the title page.
The revision list summarizes the locations of
revisions and additions. Details should always
be checked by referring to the relevant text.
32
SH7616
Hardware Manual
Renesas 32-Bit RISC Microcomputer
SuperH™ RISC engine Family/SH7600 Series
SH7616HD6417616
Rev. 2.00
Revision Date: Mar 09, 2006
Page 2
Keep safety first in your circuit designs!
1. Renesas Technology Corp. puts the maximum effort into making semiconductor products better and
more reliable, but there is always the possibility that trouble may occur with them. Trouble with
semiconductors may lead to personal injury, fire or property damage.
Remember to give due consideration to safety when making your circuit designs, with appropriate
measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of nonflammable material or
(iii) prevention against any malfunction or mishap.
Notes regarding these materials
1. These materials are intended as a reference to assist our customers in the selection of the Renesas
Technology Corp. product best suited to the customer's application; they do not convey any license
under any intellectual property rights, or any other rights, belonging to Renesas Technology Corp. or
a third party.
2. Renesas Technology Corp. assumes no responsibility for any damage, or infringement of any thirdparty's rights, originating in the use of any product data, diagrams, charts, programs, algorithms, or
circuit application examples contained in these materials.
3. All information contained in these materials, including product data, diagrams, charts, programs and
algorithms represents information on products at the time of publication of these materials, and are
subject to change by Renesas Technology Corp. without notice due to product improvements or
other reasons. It is therefore recommended that customers contact Renesas Technology Corp. or
an authorized Renesas Technology Corp. product distributor for the latest product information
before purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical errors.
Renesas Technology Corp. assumes no responsibility for any damage, liability, or other loss rising
from these inaccuracies or errors.
Please also pay attention to information published by Renesas Technology Corp. by various means,
including the Renesas Technology Corp. Semiconductor home page (http://www.renesas.com).
4. When using any or all of the information contained in these materials, including product data,
diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total
system before making a final decision on the applicability of the information and products. Renesas
Technology Corp. assumes no responsibility for any damage, liability or other loss resulting from the
information contained herein.
5. Renesas Technology Corp. semiconductors are not designed or manufactured for use in a device or
system that is used under circumstances in which human life is potentially at stake. Please contact
Renesas Technology Corp. or an authorized Renesas Technology Corp. product distributor when
considering the use of a product contained herein for any specific purposes, such as apparatus or
systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use.
6. The prior written approval of Renesas Technology Corp. is necessary to reprint or reproduce in
whole or in part these materials.
7. If these products or technologies are subject to the Japanese export control restrictions, they must
be exported under a license from the Japanese government and cannot be imported into a country
other than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan and/or the
country of destination is prohibited.
8. Please contact Renesas Technology Corp. for further details on these materials or the products
contained therein.
Rev. 2.00 Mar 09, 2006 page ii of xxvi
Page 3
Preface
The SH7616 is a microprocessor that integrates peripheral functions necessary for system
configuration with a 32-bit internal architecture SH2-DSP CPU as its core.
The SH7616's on-chip peripheral functions include a cache memory, an interrupt controller,
timers, an ethernet controller (EtherC), DSP, a serial communication interface with FIFO (SCIF),
a USB function module, a user break controller (UBC), a bus state controller (BSC), a direct
memory access cntroller (DMAC), and I/O ports, making it ideal for use as a microcomputer in
electronic devices that require high speed together with low power consumption.
Intended Readership: This manual is intended for users undertaking the design of an application
system using the SH7616. Readers using this manual require a basic
knowledge of electrical circuits, logic circuits, and microcomputers.
Purpose: The purpose of this manual is to give users an understanding of the hardware
functions and electrical characteristics of the SH7616. Details of execution
instructions can be found in the SH-1, SH-2, SH-DSP Programming Manual,
which should be read in conjunction with the present manual.
Using this Manual:
• For an overall understanding of the SH7616's functions
Follow the Table of Contents. This manual is broadly divided into sections on the CPU, system
control functions, peripheral functions, and electrical characteristics.
• For a detailed understanding of CPU functions
Refer to the separate publication SH-1, SH-2, SH-DSP Programming Manual.
Note on bit notation: Bits are shown in high-to-low order from left to right.
Related Material: The latest information is available at our Web Site. Please make sure that you
have the most up-to-date information available.
http://www.renesas.com/
Figure 2.4 shows the DSP registers.
are shown in table 2.2. Registers A0, X0, X1, Y0, Y1, and DSR are
handled as system registers by CPU core instructions.
AddressSpaceMemorySize
H'1000E000–H'1000EFFF On-chip X RAM area4 kbytes
H'1001E000–H'1001EFFF On-chip Y RAM area4 kbytes
Description replaced
Synchronous DRAM Mode Settings: To make mode settings for
the synchronous DRAM, write to address X+H'FF
X+H'FF
Whether to use X+H'FF
FF8000 from the CPU. (X represents the setting value.)
FF0000 or X+H'FFFF8000 determines on
the synchronous DRAM used.
Associative purge:
Bit
Address
Number of bits
3110 94 3 0
29 28
Tag address010
19634
The DSR register bit functions
FF0000 or
Entry
address
—
Rev. 2.00 Mar 09, 2006 page v of xxvi
Page 6
ItemPage Revision (See Manual for Details)
10.2.8
Transmit/Receive
Status Copy Enable
Register (TRSCER)
437Description amended
Bit:313029. . .
———————
Initial value:000. . .
R/W:RRRRRRR
Bit:15141312111098
————————
Initial value:00000000
R/W:RRRRRRRR
19181716
. . .
0000
. . .
10.3.1 Descriptor
List and Data Buffers
Transmit Descriptor 0
(TD0)
Bit:76543210
Initial value:00000000
Bits 31 to 8—Reserved These bits are always read as 0. The write value should always be 0.
Bit 7—Multicast Address Frame Receive (RMAF): Bit Copy Enable (RMAFCE)
Bit 7: RMAFCE Description
0Enables the RMAF bit status to be indicated in the RFS7 bit in the receive
1Disables occurrence of corresponding source to be indicated in the RFS7 bit in
Bits 6 to 0—Reserved: These bits are always read as 0. The write value should always be 0.
RMAFCE
R/W:R/WRRRRRRR
descriptor.
the receive descriptor.
450Description amended
Bit 27—Transmit Frame Error (TFE): Indicates that one or other bit of the transmit frame status
indicated by bits 26 to 0 is set.
Bit 27: TFEDescription
0No error during transmission
1An error of some kind occurred during transmission (see bits 26 to 0)
Bits 26 to 0—Transmit Frame Status 26 to 0 (TFS26 to TFS0): These bits indicate the error status
during frame transmission.
• TFS26 to —Reserved
• TFS8—Teransmit Abort Detect
• TFS7 to TFS5—Reserved
TFS9
Note: This bit is set to 1 wh any of Transmit Frame Status bits 4 to 0 is set. When this bit is
set, the Transmit Frame Error bit (bit 27: TFE) is set to 1.
———————
en
Rev. 2.00 Mar 09, 2006 page vi of xxvi
Page 7
ItemPage Revision (See Manual for Details)
10.3.1 Descriptor
List and Data Buffers
Receive Descriptor
Figure 10.3
Relationship between
Receive Descriptor
and Receive Buffer
451Figure amended
Receive descriptor
31 30 29 28
RD0
RD1
RD2
31
31
RDLE
RACT
RFP1
2627
RFE
RFP0
RBL
Padding (4 bytes)
RFS 26 to RFS0
16 15
RBA
RDL
0
0
Rev. 2.00 Mar 09, 2006 page vii of xxvi
Page 8
ItemPage Revision (See Manual for Details)
f
10.3.1 Descriptor
List and Data Buffers
Receive Descriptor 0
(TD0)
453
Description amended
Bit 27—Receive Frame Error (RFE): Indicates that one or other bit o
the receive frame status indicated by bits 26 to 0 is set. Whether or
multicast address frame receive information which is part of
not the
the frame status, is copied into this bit is specified by the
transmit/receive status copy enable register.
Bit 27: RFEDescription
0No error during reception(Initial value)
1
An error of some kind occurred during reception (see bits
26 to 0)
• Bits 26 to 0—Receive Frame Status 26 to 0 (RFS26 to RFS0):
These bits indicate the error status during frame reception.
• RFS26 to RFS10—Reserved
• RFS9—Receive FIFO Overflow (corresponds to
EESR)
RFS8—Reserve Abort Detect
•
Note:This bit is set to 1 when any of Receive Frame Status
bit 9, bit 7, bits 4 to 0 is set. When this bit is set, the
Receive Frame Error bit (bit 27: RFE) is set to 1.
• RFS7— Receive Multicast Address Frame (corresponds to
RMAF bit in EESR)
1
• RFS6—Reserved
*
• RSF5— Receive Frame Discard Request Assertion
(corresponds to RFAR bit in EESR)
• RFS4—Receive Residual-Bit Frame (corresponds to RRF bit in
EESR)
• RFS3—Receive Too-Long Frame (corresponds to RTLF bit in
EESR)
• RFS2—Receive Too-Short Frame (corresponds to RTSF bit in
EESR)
• RFS1—PHY-LSI Receive Error (corresponds to PRE bit in
EESR)
• RFS0—CRC Error on Received Frame (corresponds to CERF bit
in EESR)
Note: 1. Only HD6417616 is effective. HD6417615 is Reserved
bit.
RFOF bit in
1
*
Rev. 2.00 Mar 09, 2006 page viii of xxvi
Page 9
ItemPage Revision (See Manual for Details)
11.3.6 DMA Transfer
Request
Acknowledge Signal
496Figure replaced
Clock
Output Timing
Figure 11.13 Example
of DACKn Output
DACKn
(Active high)
Timing
0.5 cycles
14.3.4 Operation in
Synchronous Mode
15.4 SIOF Interrupt
Sources and DMAC
Table 15.3 SIOF
Interrupt Sources
Address bus
613Description amended
In synchronous mode, the SCIF receives data in synchronization
with the
rise of the serial clock.
663Description amended
Each SIOF channel has four interrupt sources: the receive-overrunerror interrupt (
register-full interrupt (RDFI0) request, and transmit-data-empty
interrupt
/transmit-control-data-register-empty interrupt (TDEI0)
request. Table 15.3 shows the interrupt sources and their relative
priorities. The RDFI0 and TDEI0 interrupts are enabled by the RIE,
RCIE, TIE, and TCIE bits, respectively, in SICTR. The RERI0 and
TERI0 interrupts cannot be disabled.
Appendix B Pin States ....................................................................................................... 900
B.1Pin States in Reset, Power-Down State, and Bus-Released State ..................................... 900
Appendix C Product Lineup............................................................................................. 904
Appendix D Package Dimensions .................................................................................. 905
Rev. 2.00 Mar 09, 2006 page xxvi of xxvi
Page 27
Section 1 Overview
Section 1 Overview
1.1Features of SuperH Microcomputer with On-Chip Ethernet
Controller
The SH7616 is a CMOS single-chip microcontroller that integrates a high-speed CPU core using
an original Renesas architecture with supporting functions required for an Ethernet system.
The CPU has a RISC (Reduced Instruction Set Computer) type instruction set. The CPU basically
operates at a rate of one instruction per cycle, offering a great improvement in instruction
execution speed. In addition, the 32-bit internal architecture provides improved data processing
power, and DSP functions have also been enhanced with the implementation of extended Harvard
architecture DSP data bus functions. With this CPU, it has become possible to assemble low-cost,
high-performance/high-functionality systems even for applications such as realtime control, which
could not previously be handled by microcontrollers because of their high-speed processing
requirements. The SH7616 also includes a maximum 4-kbyte cache, for greater CPU processing
power when accessing external memory.
The SH7616 is equipped with a media access controller (MAC) conforming to the IEEE802.3u
standard, and an Ethernet controller that includes a media independent interface (MII) standard
unit, enabling 10/100 Mbps LAN connection. Supporting functions necessary for system
configuration are also provided, including RAM, timers, a serial communication interface with
FIFO (SCIF), interrupt controller (INTC), and I/O ports.
To improve the efficiency of frame transmission/reception, the processing power of the DMAC for
the Ethernet controller is improved and the FIFO for the DMAC has 2 kbytes. A CAM match
signal input function is provided for systems that require multiple MAC addresses. In serial I/O
with three channels, one operates with the FIFO for better data processing power when connected
to the codec.
Rev. 2.00 Mar 09, 2006 page 1 of 906
REJ09B0292-0200
Page 28
Section 1 Overview
Table 1.1Features
ItemSpecifications
CPU
• Original Renesas architecture
• 32-bit internal architecture
• General register machine
Sixteen 32-bit general registers
Six 32-bit control registers (including 3 added for DSP use)
Ten 32-bit system registers
• RISC (Reduced Instruction Set Computer) type instruction set
Fixed 16-bit instruction length for improved code efficiency
Load-store architecture (basic operations are executed between
registers)
Delayed branch instructions reduce pipeline disruption during
branches
C-oriented instruction set
• Instruction execution time: One instruction per cycle (16.0 ns/instruction at
• DSP registers
Two 40-bit data registers
Six 32-bit data registers
Modulo register (MOD, 32 bits) added to control registers
Repeat counter (RC) added to status register (SR)
Repeat start register (RS, 32 bits) and repeat end register (RE, 32 bits)
added to control registers
• DSP data bus
Extended Harvard architecture
Simultaneous access to two data buses and one instruction bus
• Parallel processing
Maximum of four parallel processes
ALU operations, multiplication, and two loads or stores
• Address processors
Section 1 Overview
Two address processors
Address operations to access two memories
• DSP data addressing modes
Increment and index
Each with or without modulo addressing
• Repeat control: Zero-overhead repeat (loop) control
• Instruction set
16-bit length (in case of load or store only)
32-bit length (including ALU operations and multiplication)
Added SuperH microcontroller instructions for accessing DSP registers
• Fifth and last pipeline stage is DSP stage
Rev. 2.00 Mar 09, 2006 page 3 of 906
REJ09B0292-0200
Page 30
Section 1 Overview
ItemSpecifications
Cache
Interrupt controller
(INTC)
• Mixed instruction/data type cache
• Maximum of 4 kbytes
• 4-way set-associative type
• 16-byte line length
• 64 cache tag entries
• 16-byte write-back buffer
• Selection of write-through or write-back mode for data writes
• LRU replacement algorithm
• Can also be used as 2-kbyte cache and 2-kbyte RAM (2-way cache mode)
• Mixed instruction/data cache, instruction cache, or data cache mode can
be set
• 1-cycle reads, 2-cycle writes (in write-back mode)
• 16 priority levels can be set
• On-chip supporting module interrupt vector numbers can be set
• 41 internal interrupt sources
• The E-DMAC interrupt (EINT) is input to the INTC as the OR of 22 EtherC
and E-DMAC interrupt sources (max.). Thus, from the viewpoint of the
INTC, there is one EtherC/E-DMAC interrupt source.
• Five external interrupt pins (NMI, IRL0 to IRL3)
• 15 external interrupt sources (encoded input) can also be selected for pins
IRL0 to IRL3 (IRL interrupts)
• IRL interrupt vector number setting can also be selected (selection of auto
vector or external vector)
• Provision for IRQ interrupt setting (low-level, rising-edge, falling-edge,
both-edge detection)
Rev. 2.00 Mar 09, 2006 page 4 of 906
REJ09B0292-0200
Page 31
ItemSpecifications
User break
controller (UBC),
4 channels
(A, B, C, D)
• Interrupt generation based on independent or sequential conditions for
channels A, B, C, D
Three sequential setting patterns: A → B → C → D, B → C → D,
C → D
• Settable break conditions: Address, data (channels C and D only), bus
• User break interrupt generated on occurrence of break condition
• Processing can be stopped before or after instruction execution in
instruction fetch cycle
• Break with specification of number of executions (channels C and D only)
Settable number of executions: max. 2
• PC trace function
Branch source/branch destination can be traced in branch instruction fetch
(max. 8 addresses (4 pairs))
12
– 1 (4095)
Section 1 Overview
Rev. 2.00 Mar 09, 2006 page 5 of 906
REJ09B0292-0200
Page 32
Section 1 Overview
ItemSpecifications
Bus state controller
(BSC)
• Address space divided into five areas (CS0 to CS4, max. linear 32 Mbytes
each)
Memory types such as DRAM, synchronous DRAM, burst ROM, can
be specified for each area
Two synchronous DRAM spaces (CS2, CS3); CS3 also supports
DRAM
Bus width (8, 16, 32 bits) can be selected for each area
Wait state insertion control for each area
Control signal output for each area
Endian can be set for CS2 and CS4
• Cache
Cache area/cache-through area selection by access address
Selection of write-through or write-back mode
• Refresh functions
CAS-before-RAS refreshing (auto refreshing) or self-refreshing
Refresh interval settable by means of refresh counter and clock select
setting
Concentrated refreshing according to refresh count setting
(1, 2, 4, 6, 8)
Refresh request output possible (REFOUT)
• Direct DRAM interface
Multiplexed row address/column address output
Fast page mode burst transfer and continuous access when reading
EDO mode
TP cycle generation to secure RAS precharge time
• Direct synchronous DRAM interface
Multiplexed row address/column address output
Bank-active mode (valid for CS3 only)
Selection of burst read/single write mode or burst read/burst write
mode
• Bus arbitration (BRLS, BGR)
• Refresh counter can be used as interval timer
Interrupt request generated on compare match (CMI interrupt request
signal)
Rev. 2.00 Mar 09, 2006 page 6 of 906
REJ09B0292-0200
Page 33
ItemSpecifications
Direct memory
access controller
(DMAC),
2 channels
On-chip RAM
Ethernet controller
direct memory
access controller
(E-DMAC),
2 channels
• 4-Gbyte address space, maximum 16M (16,777,216) transfers
• Selection of 8-bit, 16-bit, 32-bit, or 16-byte transfer data length
• Parallel execution of CPU instruction processing and DMA operation
possible in case of cache hit
• Selection of dual address or single address mode
Single address (data transfer rate of one transfer unit in one bus cycle)
Dual address (data transfer rate of one transfer unit in two bus cycles)
When synchronous DRAM is connected, 16-byte continuous read →
continuous write transfer is possible (dual)
• When SDRAM is connected, clocked single-address transfer is possible at
rates up to 31.25 MHz
• Cycle stealing or burst transfer
• Relative channel priorities can be set (fixed mode/round robin mode)
• DMA transfer is possible for the following devices:
External memory, on-chip memory, on-chip supporting modules
(excluding DMAC, BSC, UBC, cache, E-DMAC, EtherC)
• External requests, DMA transfer requests from on-chip supporting
modules, auto requests
• Interrupt request (DEIn) can be issued to CPU at end of data transfer
• DACK used for DREQ sampling (however, there is always one overrun as
there is one acceptance before first DACK)
• 4-kbyte X-RAM
• 4-kbyte Y-RAM
• Transfer possible between EtherC and external memory/on-chip memory
• 16-byte burst transfer possible
• Single address transfer
• Chain block transfer
• 32-bit transfer data width
• 4-Gbyte address space
• Data transfer possible from across byte boundaries in transmission
• Each transmit and receive FIFO includes 2 kbytes
Section 1 Overview
Rev. 2.00 Mar 09, 2006 page 7 of 906
REJ09B0292-0200
Page 34
Section 1 Overview
ItemSpecifications
Ethernet controller
(EtherC)
Serial communication interface
with FIFO (SCIF),
2 channels
Note: * Magic Packet is a registered trademark of Advanced Micro Devices, Inc.
• MAC (Media Access Control) functions
Data frame assembly/disassembly (IEEE802.3-compliant frames)
CSMA/CD link management (collision avoidance, processing in case
of collision)
CRC processing
Supports full-duplex transmission/reception
Transmitting and receiving short and long packets
• Compatible with MII (Media Independent Interface) standard
Converts 8-bit stream data from MAC level to MII nibble stream (4 bits)
Station management (STA) functions
18 TTL-level signals
Variable transfer rate: 10/100 Mbps
• Magic Packet™
• CAM match signal input function
• Asynchronous mode
Data length: 7 or 8 bits
Stop bit length: 1 or 2
Parity: Even, odd, or none
Receive error detection: Parity errors, framing errors, overrun errors
Break detection
• Synchronous mode
One serial communication format (8-bit data length)
Receive error detection: Overrun errors
• IrDA mode (conforming to IrDA 1.0)
• Simultaneous transmission/reception (full-duplex) capability
Half-duplex communication used for IrDA communication
• Built-in dedicated baud rate generator allows selection of bit rate
• Built-in 16-stage transmit and receive FIFOs enable high-speed,
continuous communication
• Internal or external (SCK) transmit/receive clock source
*
(with WOL (Wake On LAN) output)
Rev. 2.00 Mar 09, 2006 page 8 of 906
REJ09B0292-0200
Page 35
ItemSpecifications
Serial communication interface
with FIFO (SCIF),
2 channels
Serial I/O with FIFO
(SIOF)
Serial I/O (SIO),
2 channels
• Four interrupt sources
Transmit FIFO data empty
Break
Receive FIFO data full
Receive error
• Built-in modem control functions (RTS, CTS)
• Detection of transmit and receive FIFO register data quantity and number
of receive FIFO register transmit data errors
• Timeout error (DR) can be detected during reception
• Full-duplex operation (independent transmit and receive registers, and
independent transmit and receive clocks)
• Transmit and receive FIFO for primary data/transmit and receive buffer for
control data (enabling continuous transmission/reception)
• Interval transfer mode and continuous transfer mode
• Choice of 8- or 16-bit data length
• Data transfer communication by means of polling or interrupts
• Choice of MSB- or LSB-first transfer for data I/O
• Full-duplex operation (independent transmit and receive registers, and
independent transmit and receive clocks)
• Transmit/receive ports with double-buffer structure (enabling continuous
transmission/reception)
• Interval transfer mode and continuous transfer mode
• Choice of 8- or 16-bit data length
• Data transfer communication by means of polling or interrupts
• MSB-first transfer between SIO and data I/O
Section 1 Overview
Rev. 2.00 Mar 09, 2006 page 9 of 906
REJ09B0292-0200
Page 36
Section 1 Overview
ItemSpecifications
User debug
interface (H-UDI)
• Conforms to IEEE1149.1 standard
Five test signals (TCK, TDI, TDO, TMS, TRST)
TAP controller
Instruction register
Data register
Bypass register
• Test mode that conforms to the IEEE1149.1 standard
Standard instructions: BYPASS, SAMPLE/PRELOAD, and EXTEST
Optional instructions: CLAMP, HIGHZ, and IDCODE
• H-UDI interrupt
H-UDI interrupt request to INTC
• Reset hold
Timer pulse unit
(TPU), 3 channels
• Maximum 8-pulse input/output
• Total of eight timer general registers (TGR) (four for channel 0, two each
for channels 1 and 2)
Waveform output by compare match: Selection of 0, 1, or toggle output
Input capture function: Selection of rising-edge, falling-edge, or both-
edge detection
Counter clear operation: Counter clearing possible by compare match
or input capture
Synchronous operation: Multiple timer counters (TCNT) can be written
to simultaneously; simultaneous clearing by compare match and input
capture possible; simultaneous register input/output possible by
counter synchronous operation
PWM mode: Any PWM output duty can be set; maximum 7-phase
PWM output possible by combination with synchronous operation
• Buffer operation settable for channel 0
Input capture register double-buffering possible
Automatic rewriting of output compare register possible
• Phase counting mode settable independently for channels 1 and 2
Two-phase encoder pulse up/down-count possible
• 13 interrupt sources
For channel 0, four compare match/input capture dual-function
interrupts and one overflow interrupt can be requested independently
For channels 1 and 2, two compare match/input capture dual-function
interrupts, one overflow interrupt, and one underflow interrupt can be
requested independently
Rev. 2.00 Mar 09, 2006 page 10 of 906
REJ09B0292-0200
Page 37
ItemSpecifications
16-bit free-running
timer (FRT),
1 channel
Watchdog timer
(WDT), 1 channel
Clock pulse
generator (CPG)
• Choice of four counter input clocks
Three internal clocks (Pφ/8, Pφ/32, Pφ/128)
External clock (enabling external event counting)
• Two independent comparators (allowing generation of two waveform
outputs)
• Input capture (choice of rising edge or falling edge)
• Counter clear specification
Counter value can be cleared by compare match A
• Four interrupt sources
Two compare match sources (OCIA, OCIB)
One input capture source (ICI)
One overflow source (OVI)
• Can be switched between watchdog timer mode and interval timer mode
• Internal reset, external signal (WDTOVF), or interrupt generated on count
overflow
• Used when standby mode is cleared or the clock frequency is changed,
and in clock pause mode
• Selection of eight counter input clocks
• Built-in clock pulse generator
• Selection of crystal or external clock as clock source
• Built-in clock-multiplication PLL circuits
• Built-in PLL circuit for phase synchronization between external clock and
internal clock
• CPU/DSP core clock (Iφ), peripheral module clock (Pφ), and external
interface clock (Eφ) frequencies can be scaled independently
Section 1 Overview
Rev. 2.00 Mar 09, 2006 page 11 of 906
REJ09B0292-0200
Page 38
Section 1 Overview
ItemSpecifications
System controller
(SYSC)
I/O ports
• Selection of seven operating mode settings, three power-down modes
• Operating modes
Control the method of clock generation (PLL ON/OFF) and clock
division ratio
• Power-down mode
Sleep mode: CPU functions halted
Standby mode: All functions halted
Module standby function: Operation of FRT, SCIF, DMAC, UBC, DSP,
TPU, and SIO on-chip supporting modules is halted selectively
• 29 input/output ports
Rev. 2.00 Mar 09, 2006 page 12 of 906
REJ09B0292-0200
Note: * When doing debugging using the E10A emulator, this pin is used for mode switching. It should be connected to Vss
when using the E10A emulator and connected to Vcc when using a normal user system.
Figure 1.2 SH7616 Pin Arrangement (PLQP0208KA-A)
Rev. 2.00 Mar 09, 2006 page 14 of 906
REJ09B0292-0200
D10
D11
D12
D13
VSS
VCC
(mm)
1.7
(mm)
0.5
(mm)
Page 41
1.3.2Pin Functions
Table 1.2Pin Functions
TypeSymbolI/ONameFunction
PowerV
V
PV
PV
CC
SS
CC
SS
ClockXTALOutputCrystal input/
EXTALInputFor connection to a crystal resonator, or
CKIOI/OSystem clock
CKPREQ/
CKM
CKPACKOutputClock pause
CKPOOutputOn-chip
PLLCAP1InputPLL capacitance
PLLCAP2InputConnects capacitance for operation of
PLLV
CC
PLLV
SS
InputPowerFor connection to the power supply.
Connect all V
supply. The chip will not operate if there
are any open pins
InputGroundFor connection to ground. Connect all
pins to the system ground. The chip
V
SS
will not operate if there are any open pins
InputI/O circuit power Power supply for the I/O circuits
InputI/O circuit
Ground for the I/O circuits
ground
For connection to a crystal resonator
output pin
used as external clock input pin
Used as the external clock input or
input/output
internal clock output pin
pin
InputClock pause
request input
Used as the clock pause request pin for
changing the frequency of the clock input
from the CKIO pin, or halting the clock
Indicates that the chip is in the clock
acknowledge
pause state (standby state) internally
signal
Outputs the on-chip peripheral clock (Pφ)
peripheral clock
(Pφ) output
Connects capacitance for operation of
connection pins
PLL circuit 1
PLL circuit 2
InputPLL powerPLL oscillator power supply
InputPLL groundPLL oscillator ground
Section 1 Overview
pins to the system power
CC
Rev. 2.00 Mar 09, 2006 page 15 of 906
REJ09B0292-0200
Page 42
Section 1 Overview
R
TypeSymbolI/ONameFunction
System
control
Operating
mode
InterruptsNMIInputNonmaskable
Bus controlBSOutputBus cycle
RESInputResetWhen RES = 0 and NMI = 1, the chip
enters the power-on reset state. When
ES = 0 and NMI = 0, the chip enters the
manual reset state
WDTOVFOutputWatchdog
timer overflow
BGROutputBus grantIndicates that the bus has been released
BRLSInputBus releaseDriven low when an external device
MD0–MD4InputMode settingThe operating mode is specified by the
interrupt
IRL3–IRL0InputExternal
interrupt
request input
0 to 3
IVECFOutputInterrupt
vector fetch
cycle
start
CS4–CS0OutputChip select
0 to 4
WAITInputWaitWait state request signal
RDOutputReadStrobe signal indicating a read cycle
RASOutputRow address
strobe
Counter overflow signal output in
watchdog timer mode
to an external device. The device that
output the BRLS signal recognizes that
the bus has been acquired when it
receives the BGR signal
requests release of the bus
levels at these pins
Inputs the nonmaskable interrupt request
signal
These pins input maskable interrupt
request signals
Indicates an external vector read cycle
Signal indicating the start of a bus cycle
Asserted every data cycle in burst
transfer
Chip select signals indicating the area
being accessed
DRAM/synchronous DRAM RAS signal
Rev. 2.00 Mar 09, 2006 page 16 of 906
REJ09B0292-0200
Page 43
TypeSymbolI/ONameFunction
Bus controlCASOutputColumn
address strobe
OEOutputOutput enableEDO DRAM output enable signal
DQMUU/
WE3
DQMUL/
WE2
DQMLU/
WE1
DQMLL/
WE0
CAS3OutputColumn address
CAS2OutputColumn address
CAS1OutputColumn address
CAS0OutputColumn address
CKEOutputClock enableSynchronous DRAM clock enable signal
TX-ENOutputTransmit enable Signal indicating that transmit data on
ETXD0–3 is ready
ETXD0–3OutputTransmit data
4-bit receive data
0–3
TX-EROutputTransmit errorSignal sending error status to another
port
RX-DVInputReceive data
enable
ERXD0–3InputReceive data
Indicates that enable receive data on
ERXD0–3 exist
4-bit receive data
0–3
RX-ERInputReceive errorReports error state that occurred during
transfer of frame data
CRSInputCarrier senseCarrier detection notification signal
COLInputCollisionCollision detection signal
MDCOutputManagement
data clock
MDIOI/OManagement
data input/output
Reference clock signal for information
transfer by MDIO
Bidirectional signal for exchanging
management information between STA
and PHY
Note: * When carrying out debugging using the E10A emulator, this pin is used for mode switching.
It should be connected to V
when using the E10A emulator and connected to VCC when
SS
using a normal user system. When a boundary scan test is performed with the H-UDI, user
mode must be used. A boundary scan test cannot be performed in ASE mode.
Rev. 2.00 Mar 09, 2006 page 18 of 906
REJ09B0292-0200
Page 45
Section 1 Overview
TypeSymbolI/ONameFunction
EthernetLNKSTAInputLink statusLink status input from PHY
controller
(EtherC)
Direct
memory
access
controller
(DMAC)
Serial communication
interface with
FIFO (SCIF)
Timer pulse
unit (TPU)
EXOUTOutputGeneral-purpose
external output
WOLOutputWake on LANSignal indicating detection of a Magic
Rev. 2.00 Mar 09, 2006 page 22 of 906
REJ09B0292-0200
Page 49
Section 1 Overview
No.Function 1Function 2Function 3Function 4Type
111A24Address bus
108A23
107A22
106A21
105A20
104A19
103A18
102A17
100A16
98A15
97A14
96A13
95A12
94A11
93A10
92A9
90A8
88A7
87A6
86A5
85A4
84A3
83A2
82A1
80A025 pins
Rev. 2.00 Mar 09, 2006 page 23 of 906
REJ09B0292-0200
Page 50
Section 1 Overview
No.Function 1Function 2Function 3Function 4Type
77D31Data bus
75D30
74D29
73D28
72D27
71D26
70D25
68D24
65D23
64D22
63D21
62D20
59D19
57D18
56D17
55D16
54D15
53D14
51D13
49D12
48D11
47D10
46D9
44D8
43D7
41D6
40D5
39D4
38D3
37D2
36D1
34D032 pins
Rev. 2.00 Mar 09, 2006 page 24 of 906
REJ09B0292-0200
Page 51
Section 1 Overview
No.Function 1Function 2Function 3Function 4Type
30TCKH-UDI
31TMS
29TDI
28TDO
32TRST
6ASEMODE
*
6 pins
201TX-CLKEtherC
192RX-CLK
203TX-EN5 V I/O compatibility
207ETXD3
206ETXD2
205ETXD1
204ETXD0
208TX-ER
188RX-DV
197ERXD3
196ERXD2
195ERXD1
194ERXD0
187RX-ER
190CRS
189COL
199MDC
198MDIO18 pins
143DACK1DMAC
144DACK0
141DREQ1
142DREQ04 pins
Note: * When carrying out debugging using the E10A emulator, this pin is used for mode switching.
It should be connected to V
when using the E10A emulator (ASE mode). When using the
SS
chip in the normal user system, and not using the E10A emulator (user mode), connect this
pin to V
. When a boundary scan test is performed with the H-UDI, user mode must be
CC
used. A boundary scan test cannot be performed in ASE mode.
Rev. 2.00 Mar 09, 2006 page 25 of 906
REJ09B0292-0200
Page 52
Section 1 Overview
Function 1
No.
151PB15SCK1Port B
152PB14RXD1SCIF, SIO, TPU
153PB13TXD1
154PB12SRCK2RTSSTATS15 V I/O compatibility
156PB11SRS2CTSSTATS0
158PB10SRXD2TIOCA1
159PB9STCK2TIOCB1/TCLKC
160PB8STS2TIOCA2
161PB7STXD2TIOCB2/TCLKD
162PB6SRCK1SCK2
163PB5SRS1RXD2
164PB4SRXD1TXD2
165PB3STCK1TIOCA0
166PB2STS1TIOCB0
168PB1STXD1TIOCC0/TCLKA
170PB0TIOCD0/TCLKB WOL16 pins
171PA13SRCK0Port A
172PA12SRS0SIOF, FRT, WDT,
173PA11SRXD0EtherC
174PA10STCK05 V I/O compatibility
175PA9STS0
176PA8STXD0
177WDTOVFPA7
178PA6FTCI
180PA5FTI
182PA4FTOA
183CKPOFTOB
184PA2LNKSTA
185PA1EXOUT
186PA0CAMSEN14 pins
Note: * Figures in square brackets indicate the settings of the mode bits (MD0, MD1) in the PFC in
*
[00]
order to select the multiplex functions in port A [0:13] and port B [0:15].
WDTOVF: In a reset, this pin becomes an output pin.
Function 2
*
[01]
Function 3
*
[10]
Function 4
*
[11]
Type
Rev. 2.00 Mar 09, 2006 page 26 of 906
REJ09B0292-0200
Page 53
Section 1 Overview
When used for general input/output, attention must be paid to the polarity of
this pin.
1.4Processing States
State Transitions: The CPU has five processing states: the reset state, exception handling state,
bus-released state, program execution state, and power-down state. Figure 1.3 shows the state
transitions.
From any state when
RES = 0 and NMI = 1
Interrupt or DMA
address error
Bus-released state
Bus request
Bus request
received
Bus request
cleared
Bus request
cleared
received
SLEEP
instruction
(SBY = 0)
RST = 0, NMI = 0
RST = 0, NMI = 1
RST = 1,
NMI = 1
Exception-handling state
Bus
request
Exception
Bus request
cleared
Program execution state
MSTP
bit
cleared
From any state when
RES = 0 and NMI = 0
Manual reset statePower-on reset state
RST = 1,
NMI = 0
End of
exception
handling
MSTP
bit set
SLEEP
instruction
(SBY = 1)
Reset states
NMI interrupt
CKPREQ = 1
SBY bit set and
CKPREQ = 0
*
*
Sleep mode
Note: * clock pause function
Figure 1.3 Processing State Transitions
Standby mode
Module standby
Power-down state
Rev. 2.00 Mar 09, 2006 page 27 of 906
REJ09B0292-0200
Page 54
Section 1 Overview
• Reset State
In this state, the CPU is reset. The reset state is entered when the RES pin goes low. The
power-on reset state is entered if the NMI pin is high, and the manual reset state is entered if
the NMI pin is low.
• Exception Handling State
The exception handling state is a transient state that occurs when the CPU alters the normal
programming flow dues to a reset, interrupt, or other exception handling source.
In the case of a reset, the CPU fetches the execution start address as the initial value of the
program counter (PC) from the exception vector table, and the initial value of the stack pointer
(SP), stores these values, branches to the start address, and begins program execution at that
address.
In the case of an interrupt, etc., the CPU references the SP and saves the PC and status register
(SR) in the stack area. It fetches the start address of the exception service routine from the
exception vector table, branches to that address, and begins program execution.
Subsequently, the processing state is the program execution state.
• Program Execution State
In the program execution state the CPU executes program instructions in normal sequence.
• Power-Down State
In the power-down state the CPU stops operating to conserve power. The power-down state is
entered by executing a SLEEP instruction. The power-down state includes two modes—sleep
mode and standby mode—and a module standby function.
• Bus-Released State
In the bus-released state, the CPU releases the bus to a device that has requested it.
Power-Down State: In addition to the normal program execution state, another CPU processing
state called the power-down state is provided. In this state, CPU operation is halted and power
consumption is reduced. The power-down state includes two modes—sleep mode and standby
mode—and a module standby function.
• Sleep Mode
A transition to sleep mode is made if the SLEEP instruction is executed while the standby bit
(SBY) is cleared to 0 in standby control register 1 (SBYCR1). In sleep mode CPU operations
stop but data in the CPU’s internal registers and in on-chip cache memory and on-chip RAM is
retained. The functions of the on-chip supporting modules do not stop.
Rev. 2.00 Mar 09, 2006 page 28 of 906
REJ09B0292-0200
Page 55
Section 1 Overview
• Standby Mode
A transition to standby mode is made if the SLEEP instruction is executed while SBY is set to
1 in SBYCR1. In standby mode the CPU, the on-chip modules, and the oscillator all stop.
When entering standby mode, the DMAC’s DMA master enable bit should be cleared to 0.
Also, the cache should be turned off before entering this mode. The contents of the cache and
on-chip RAM are not retained in this mode.
Standby mode is exited by means of a reset or an external NMI interrupt. When standby mode
is exited, the normal program execution state is entered via the exception handling state after
the elapse of the oscillation settling time.
If a transition is made to standby mode using the clock pause function, it is possible to change
the frequency of the CKIO pin input clock, or to stop the clock itself. When SBY in SBYCR1
is set to 1 and a low level is applied to the CKPREQ/CKM pin, a transition is made to standby
mode and a low level is output from the CKPACK pin. The clock can then be stopped, or its
frequency changed.
On-chip supporting module states and pin states are the same as in the normal standby mode
entered by means of the SLEEP instruction. A transition to the program execution state is
made by applying a high level to the CKPREQ/CKM pin.
In this mode the oscillator is halted, greatly reducing power consumption.
• Module Standby Function
A module standby function is provided for the following on-chip supporting modules: the
direct memory access controller (DMAC), DSP, 16-bit free-running timer (FRT), serial
communication interface with FIFO (SCIF), serial I/O with FIFO (SIOF), serial I/O (SIO), user
break controller (UBC), and timer pulse unit (TPU). A module standby function is not
supported for the Ethernet controller (EtherC) or the Ethernet direct memory access controller
(E-DMAC).
Setting one of module stop bits 11 to 3 and 1 (MSTP11 to MSTP3, MSTP1) to 1 in the standby
control register (SBYCR1/2) stops the clock supply to the corresponding on-chip supporting
module. Use of this function enables power consumption to be reduced.
The module standby function is cleared by clearing the corresponding MSTP bit to 0.
DSP instructions must not be used when the DSP has been placed in the module standby state.
When using the DMAC module standby function, the direct memory access controller’s DMA
master enable bit should be cleared to 0.
Rev. 2.00 Mar 09, 2006 page 29 of 906
REJ09B0292-0200
Page 56
Section 1 Overview
Table 1.4Power-Down State
State
On-chip
Mode
Sleep
mode
Standby
mode
Module
standby
function
Entering
ConditionsClockCPU
Executing
SLEEP
instruction
while SBY bit
is cleared in
SBYCR1
Executing
SLEEP
instruction
while SBY
bit is set in
SBYCR1
Setting
MSTP bit
corresponding
to individual
module
OperatingHaltedOperatingHeldHeld
HaltedHaltedHalted and
OperatingOperating
(DSP
halted)
Notes: 1. Depends on individual supporting module or pin.
2. DMAC and DSP registers and specified module interrupt vectors retain their set values.
Supporting
Modules
1
initialized
Clock supply
to specified
module
halted,
module
initialized
*
2
*
On-Chip
Cache or
CPU
Registers
HeldUndefined
HeldHeld
On-Chip
RAM
Exiting
Conditions
1. Interrupt
2. DMA address
error
3. Power-on reset
4. Manual reset
1. NMI interrupt
2. Power-on reset
3. Manual reset
1. Clearing MSTP
bit
2. Power-on reset
3. Manual reset
Rev. 2.00 Mar 09, 2006 page 30 of 906
REJ09B0292-0200
Page 57
Section 2 CPU
Section 2 CPU
2.1Register Configuration
The register set consists of sixteen 32-bit general registers, six 32-bit control registers and ten 32bit system registers.
This chip is upwardly compatible with the SH-1, SH-2 on the object code level. For this reason,
several registers have been added to the previous SuperH microcontroller registers. The added
registers are the three control registers: repeat start register (RS), repeat end register (RE), and
modulo register (MOD) and the six system registers: DSP status register (DSR), and A0, A1, X0,
X1, Y0 and Y1 among the DSP data registers.
The general registers are used in the same manner as the SH-1, SH-2 with regard to SuperH
microcontroller-type instructions. With regard to DSP type instructions, they are used as address
and index registers for accessing memory.
2.1.1General Registers
There are 16 general registers (Rn) numbered R0–R15, which are 32 bits in length. General
registers are used for data processing and address calculation.
With SuperH microcomputer type instructions, R0 is also used as an index register. Several
instructions are limited to use of R0 only. R15 is used as the hardware stack pointer (SP). Saving
and recovering the status register (SR) and program counter (PC) in exception processing is
accomplished by referencing the stack using R15.
With DSP type instructions, eight of the 16 general registers are used for the addressing of X, Y
data memory and data memory (single data) using the I bus.
R4, R5 are used as an X address register (Ax) for X memory accesses, and R8 is used as an X
index register (Ix). R6, R7 are used as a Y address register (Ay) for Y memory accesses, and R9 is
used as a Y index register (Iy). R2, R3, R4, R5 are used as a single data address register (As) for
accessing single data using the I bus, and R8 is used as a single data index register (Is).
DSP type instructions can simultaneously access X and Y data memory. There are two groups of
address pointers for designating X and Y data memory addresses.
R0 also functions as an index register in the indirect indexed register
addressing mode and indirect indexed GBR addressing mode. In some
instructions, only the R0 functions as a source register or destination register.
2.
R15 functions as a hardware stack pointer (SP) during exception processing.
3.
Used as memory address registers, memory index registers with DSP type
instructions.
Figure 2.1 General Register Configuration
With the assembler, symbol names are used for R2, R3 ... R9. If it is wished to use a name that
makes clear the role of a register for DSP type instructions, a different register name (alias) can be
used. This is written in the following manner for the assembler.
Ix:.REG (R8)
Rev. 2.00 Mar 09, 2006 page 32 of 906
REJ09B0292-0200
Page 59
Section 2 CPU
The name Ix is an alias for R8. The other aliases are assigned as follows:
Ax0:.REG (R4)
Ax1:.REG (R5)
Ix:.REG (R8)
Ay0:.REG (R6)
Ay1:.REG (R7)
Iy:.REG (R9)
As0:.REG (R4)
As1:.REG (R5) defined when an alias is required for single data transfer
As2:.REG (R2) defined when an alias is required for single data transfer
As3:.REG (R3) defined when an alias is required for single data transfer
Is:.REG (R8) defined when an alias is required for single data transfer
defined when an alias is required for single data transfer
2.1.2Control Registers
The six 32-bit control registers consist of the status register (SR), repeat start register (RS), repeat
end register (RE), global base register (GBR), vector base register (VBR), and modulo register
(MOD).
The SR register indicates processing states.
The GBR register functions as a base address for the indirect GBR addressing mode, and is used
for such as on-chip peripheral module register data transfers.
The VBR register functions as the base address of the exception processing vector area (including
interrupts).
The RS and RE registers are used for program repeat (loop) control. The repeat count is
designated in the SR register repeat counter (RC), the repeat start address in the RS register, and
the repeat end address in the RE register. However, note that the address values stored in the RS
and RE registers are not necessarily always the same as the physical start and end address values
of the repeat.
The MOD register is used for modulo addressing to buffer the repeat data. The modulo addressing
designation is made by DMX or DMY, the modulo end address (ME) is designated in the upper 16
bits of the MOD register, and the modulo start address (MS) is designated in the lower 16 bits.
Note that the DMX and DMY bits cannot simultaneously designate modulo addressing. Modulo
addressing is possible with X and Y data transfer instructions (MOVX, MOVY). It is not possible
with single data transfer instructions (MOVS).
Rev. 2.00 Mar 09, 2006 page 33 of 906
REJ09B0292-0200
Page 60
Section 2 CPU
Figure 2.2 shows the control registers. Table 2.1 indicates the SR register bits.
Status register (SR)
31 28 271615 12 1110 9 8 74 32 1 0
Repeat start register (RS)
31
RS
Repeat end register (RE)
31
RE
Global base register (GBR)
31
GBR
Vector base register (VBR)
31
VBR
STI3 I2 I1 I0 RF1 RF0QMDMXDMY00000000RC
0
0
0
0
Modulo register (MOD)
31
MEMS
ME: Modulo end address
MS: Modulo start address
Figure 2.2 Control Register Configuration
Rev. 2.00 Mar 09, 2006 page 34 of 906
REJ09B0292-0200
016 15
Page 61
Section 2 CPU
Table 2.1SR Register Bits
BitName (Abbreviation)Function
27–16Repeat counter (RC)Designate the repeat count (2–4095) for repeat (loop)
control
11Y pointer usage modulo
addressing designation
(DMY)
10X pointer usage modulo
addressing designation
(DMX)
9M bitUsed by the DIV0S/U, DIV1 instructions
8Q bitUsed by the DIV0S/U, DIV1 instructions
7–4Interrupt request mask
(I3–I0)
3–2Repeat flags (RF1, RF0) Used in zero overhead repeat (loop) control. Set as
1Saturation arithmetic bit
(S)
0T bitFor MOVT, CMP/cond, TAS, TST, BT, BT/S, BF,
31–28
15–12
0 bit0: 0 is always read out; write a 0
1: modulo addressing mode becomes valid for Y
memory address pointer, Ay (R6, R7)
1: modulo addressing mode becomes valid for X
memory address pointer, Ax (R4, R5)
Indicate the receive level of an interrupt request (0 to
The GBR register and VBR register are the same as the previous SuperH microprocessor registers.
An RC counter and four control bits (DMX bit, DMY bit, RF1 bit, RF0 bit) have been added to
the SR register. The RS, RE and MOD registers are new registers.
2.1.3System Registers
System registers consist of four 32-bit registers: high and low multiply and accumulate registers
(MACH and MACL), the procedure register (PR), and the program counter (PC). The MACH and
MACL store the results of multiplication or multiply and accumulate operations*. The PR stores
the return address from the subroutine procedure. The PC indicates the address of the program in
execution; it controls the flow of the processing. The PC indicates the fourth byte after the
instruction currently being executed. These registers are the same as those in the SuperH
microprocessor.
Note: These are used only when executing an instruction that was supported by SH-1 and SH-2.
They are not used for newly added multiplication instructions (PMULS).
310
MACH
MACL
31
PR
31
PC
Multiply and accumulate
register high (MACH)
Multiply and accumulate
register low (MACL)
0
Procedure register (PR)
0
Program counter (PC)
Figure 2.3 System Register Configuration
Rev. 2.00 Mar 09, 2006 page 36 of 906
REJ09B0292-0200
Page 63
Section 2 CPU
In addition, among the DSP unit usage registers (DSP registers) described in 2.1.4 DSP Registers,
the DSP status register (DSR) and the five registers A0, X0, X1, Y0 and Y1 of the eight data
registers are treated as system registers. Among these, the A0 is a 40-bit register, but when data is
output from the A0 register, the guard bit section (A0G) is disregarded; when data is input to the
A0 register, the MSB of the data is copied into the guard bit section (A0G).
2.1.4DSP Registers
The DSP unit has eight data registers and one control register as its DSP registers.
The DSP data registers are comprised of the two 40-bit registers A0 and A1, and the six 32-bit
registers M0, M1, X0, X1, Y0 and Y1. The A0 and A1 registers have the 8-bit guard bits A0G and
A1G, respectively.
The DSP data registers are used for the transfer and processing of the DSP data of DSP instruction
operands. There are three types of instructions that access DSP data registers: those for DSP data
processing, and those for X or Y data transfer processing.
The control register is the 32-bit DSP status register (DSR) that represents operation results. The
DSR register has bits that represent operation results, a signed greater than bit (GT), a zero bit (Z),
a negative value bit (N), an overflow bit (V), a DSP status bit (DC: DSP condition), and a status
selection bit (CS: condition select) for controlling DC bit setting.
The DC bit represents one status flag and is very similar to the SuperH microprocessor CPU core
T bit. For conditional DSP type instructions, DSP data processing execution is controlled in
accordance with the DC bit. This control is related to execution in the DSP unit only, and only
DSP registers are updated. It bears no relation to address calculation or such SuperH
microprocessor CPU core execution instructions as load/store instructions. The control bits CS
(bits 2 to 0) designate the status for setting the DC bit.
DSP type instructions are comprised of unconditional DSP type instructions and conditional DSP
type instructions. The status and DC bits are updated in unconditional DSP type data processing,
with the exception of the PMULS, MOVX, MOVY and MOVS instructions. Conditional DSP
type instructions are executed according to the status of the DC bit, but regardless of whether or
not they are executed, the DSR register is not updated.
Figure 2.4 shows the DSP registers. The DSR register bit functions are shown in table 2.2.
Registers A0, X0, X1, Y0, Y1, and DSR are handled as system registers by CPU core instructions.
Rev. 2.00 Mar 09, 2006 page 37 of 906
REJ09B0292-0200
Page 64
Section 2 CPU
3932 310
A0G
A1G
A0
A1
M0
M1
X0
X1
Y0
Y1
87654321031
GT Z N V CS[2:0] DC
Figure 2.4 DSP Register Configuration
DSP data registers
DSP status register (DSR)
Rev. 2.00 Mar 09, 2006 page 38 of 906
REJ09B0292-0200
Page 65
Section 2 CPU
Table 2.2DSR Register Bits
BitName (Abbreviation)Function
31–8Reserved bits0: Always read out; always use 0 as a write value
7Signed greater than bit
(GT)
6Zero bit (Z)Indicates that the operation result is zero (0), or that
5Negative bit (N)Indicates that the operation result is negative, or that
4Overflow bit (V)Indicates that the operation result has overflowed
3–1Status selection bits (CS) Designate the mode for selecting the operation result
0DSP status bit (DC)Sets the status of the operation result in the mode
Indicates that the operation result is positive
(excepting 0), or that operand 1 is greater than
operand 2
1: Operation result is positive, or operand 1 is greater
operand 1 is equal to operand 2
1: Operation result is zero (0), or equivalence
operand 1 is smaller than operand 2
1: Operation result is negative, or operand 1 is
smaller
1: Operation result has overflowed
status set in the DC bit
Do not set either 110 or 111
000: Carry/borrow mode
001: Negative value mode
010: Zero mode
011: Overflow mode
100: Signed greater mode
101: Signed above mode
designated by the CS bits
0: Designated mode status not realized (unrealized)
1: Designated mode status realized
Rev. 2.00 Mar 09, 2006 page 39 of 906
REJ09B0292-0200
Page 66
Section 2 CPU
2.1.5Notes on Guard Bits and Overflow Treatment
DSP unit data operations are fundamentally performed as 32-bit, but these operations are always
executed with a 40-bit length including the 8-bit guard section. When the guard bit section does
not match the value of the 32-bit section MSB, the operation result is treated as an overflow. In
this case, the N bit indicates the correct status of the operation result regardless of the existence or
not of an overflow. This is so even if the destination operand is a 32-bit length register. The 8-bit
section guard bits are always presupposed and each status flag is updated.
When place overflows occur so that the correct result cannot be displayed even when the guard
bits are used, the N flag cannot indicate the correct status.
2.1.6Initial Values of Registers
Table 2.3 lists the values of the registers after reset.
Table 2.3Initial Values of Registers
ClassificationRegisterInitial Value
General registersR0–R14Undefined
R15 (SP)Value of the SP in the vector address table
Control registersSRBits I3–I0 are 1111 (H'F), the reserved bits, RC, DMY,
and DMX are 0, and other bits are undefined
RS
RE
GBRUndefined
VBRH'00000000
MODUndefined
System registersMACH, MACL, PRUndefined
PCValue of the PC in the vector address table
DSP registersA0, A0G, A1, A1G, M0,
M1, X0, X1, Y0, Y1
DSRH'00000000
Rev. 2.00 Mar 09, 2006 page 40 of 906
REJ09B0292-0200
Undefined
Undefined
Page 67
Section 2 CPU
2.2Data Formats
2.2.1Data Format in Registers
Register operand data size is always longword (32 bits). When loading data from memory into a
register, if the memory operand is a byte (8 bits) or a word (16 bits), it is sign-extended into a
longword, then loaded into the register.
310
Longword
Figure 2.5 Register Data Format
2.2.2Data Formats in Memory
These formats are classified into bytes, words, and longwords.
Place byte data in any address, word data from 2n addresses, and longword data from 4n
addresses. An address error will occur if accesses are made from any other boundary. In such
cases, the access results cannot be guaranteed. In particular, the stack area referred to by the
hardware stack pointer (SP, R15) stores the program counter (PC) and status register (SR) as
longwords, so establish the hardware stack pointer so that a 4n value will always result.
To enable sharing of the processor accessing memory in little-endian mode and memory, the CS2,
4 space (area 2, 4) has a function that allows access in little-endian mode. The order of byte data
differs between little-endian mode and normal big-endian mode.
Address m + 1
237
WordWord
Longword
Little endian
Address 2n
Address 4n
Address 2n
Address 4n
Address m + 1Address m + 3
Address mAddress m + 2
31015
237
ByteByteByteByte
WordWord
Longword
Big endian
Address m + 3
Address m + 2Address m
31015
ByteByteByteByte
Figure 2.6 Data Formats in Memory
Rev. 2.00 Mar 09, 2006 page 41 of 906
REJ09B0292-0200
Page 68
Section 2 CPU
2.2.3Immediate Data Format
Byte immediate data is placed in an instruction code.
With the MOV, ADD, and CMP/EQ instructions, immediate data is sign-extended and operated in
registers as longword data. Immediate data accessed by the TST, AND, OR, and XOR instructions
is zero-extended and handled as longword data. Consequently, AND instructions with immediate
data always clear the upper 24 bits of the destination register.
Word or longword immediate data is not located in the instruction code; it should be placed in a
memory table. Use an immediate data transfer instruction (MOV) to refer the memory table using
the PC relative addressing mode with displacement.
2.2.4DSP Type Data Formats
This chip has three different types of data format that correspond to various instructions. These are
the fixed-point data format, the integer data format, and the logical data format.
The DSP type fixed-point data format has a binary point fixed between bits 31 and 30. There are
three types: with guard bits, without guard bits, and multiplication input; each with different valid
bit lengths and value ranges.
The DSP type integer data format has a binary point fixed between bits 16 and 15. There are three
types: with guard bits, without guard bits, and shift amount; each with different valid bit lengths
and value ranges. The shift amount of the arithmetic shift (PSHA) has a 7 bit range and can
express values from –64 to +63, but the actual valid values are from –32 to +32. In the same
manner, the shift amount of the logical shift has a 6 bit range, but the actual valid values are from
–16 to +16.
The DSP type logical data format does not have a decimal point.
The data format and valid data length are determined by the instructions and DSP registers.
Figure 2.7 shows the three DSP type data formats and binary point positions. The SuperH type
data format is also shown for reference.
Rev. 2.00 Mar 09, 2006 page 42 of 906
REJ09B0292-0200
Page 69
DSP fixed decimal
point data
With guard bits
No guard bits
39
Section 2 CPU
30
323231
S
30
31
S
0
8
to +28 – 2
–2
0
–1 to +1 – 2
–31
–31
Multiplication input
DSP integer data
With guard bits
No guard bits
Arithmetic shift (PSHA)
Logical shift (PSHL)
SuperH integer (word)
(Reference)
39
39
39
30
31
16 15
S
31
16
15
S
31
16
15
S
31
22
16
15
S
31
21
16
15
S
31
16
15
0
–1 to +1 – 2
0
–223 to +2
0
15
–2
0
–32 to +32
0
–16 to +16
0
to +2
23
15
–15
–1
–1
(16 bits)DSP logical data
31
S
0
31
31
–2
to +2
–1
: Sign bitS
: Binary decimal point
: Unrelated to processing (ignored)
Figure 2.7 DSP Type Data Formats
Rev. 2.00 Mar 09, 2006 page 43 of 906
REJ09B0292-0200
Page 70
Section 2 CPU
2.2.5DSP Type Instructions and Data Formats
The DSP data format and valid data length are determined by DSP type instructions and DSP
registers. There are three types of instructions that access DSP data registers, DSP data processing,
X, Y data transfer processing, and single data transfer processing instructions.
DSP Data Processing: The guard bits (bits 39–32) are valid when the A0 and A1 registers are
used as source registers in DSP fixed-point data processing. When any registers other than A0, A1
(e.i., M0, M1, X0, X1, Y0, Y1 registers) are used as source registers, the sign-extended part of that
register data becomes the bits 39 to 32 data. When the A0 and A1 registers are used as destination
registers, the guard bits (bits 39–32) are valid. When any registers other than A0, A1 are used as
destination registers, bits 39 to 32 of the result data are disregarded.
Processing for DSP integer data is the same as the DSP fixed-point data processing. However, the
lower word (the lower 16 bits, bits 15–0) of the source register is disregarded. The lower word of
the destination register is cleared to 0.
In DSP logical data processing, the upper word (the upper 16 bits, bits 31–16) of the source
register is valid. The lower word and the guard bits of the A0, A1 registers are disregarded. The
upper word of the destination register is valid. The lower word and the guard bits of the A0, A1
registers are cleared to 0.
X, Y Data Transfers: The MOVX.W and MOVY.W instructions access X, Y memory via the
16-bit X, Y data buses. The data loaded into registers and data stored from registers is always the
upper word (the upper 16 bits, bits 31–16).
When loading, the MOVX.W instruction loads X memory, with the X0 and X1 registers as the
destination registers. The MOVY.W instruction loads Y memory, with the Y0 and Y1 registers as
the destination registers. Data is stored in the upper word of the register; the lower word is cleared
to 0.
The upper word data of the A0, A1 registers can be stored in X or Y memory with these data
transfer instructions, but storing is not possible from any other registers. The guard bits and the
lower word of the A0, A1 registers are disregarded.
Single Data Transfers: The MOVS.W and MOVS.L instructions can access any memory via the
data bus (CDB). All DSP registers are connected to the CDB bus, and they can become source or
destination registers during data transfers. The two data transfer modes are word and longword.
In word mode, data is loaded to and stored in the upper word of the DSP register, with the
exception of the A0G, A1G registers. In longword mode, data is loaded to and stored in the 32 bits
of the DSP register, with the exception of the A0G, A1G registers. The A0G, A1G registers can be
Rev. 2.00 Mar 09, 2006 page 44 of 906
REJ09B0292-0200
Page 71
Section 2 CPU
treated as independent registers during single data transfers. The load/store data length for the
A0G, A1G registers is 8 bits.
If DSP registers are used as source registers in word mode, when data is stored from any registers
other than A0G, A1G, the data in the upper word of the register is transferred. In the case of the
A0, A1 registers, the guard bits are disregarded. When the A0G, A1G registers are the source
registers in word mode, only 8 bits of the data are stored from the registers; the upper bits are signextended.
If the DSP registers are used as destination registers in word mode, the load is to the upper word of
the register, with the exception of A0G, A1G. When data is loaded to any register other than A0G,
A1G, the lower word of the register is cleared to 0. In the case of the A0, A1 registers, the data
sign is extended and stored in the guard bits; the lower word is cleared to 0. When the A0G, A1G
registers are the destination registers in word mode, the least significant 8 bits of the data are
loaded into the registers; the A0, A1 registers are not zero cleared but retain their previous values.
If the DSP registers are used as source registers in longword mode, when data is stored from any
registers other than A0G, A1G, the 32 bits (data) of the register are transferred. When the A0, A1
registers are used as the source registers the guard bits are disregarded. When the A0G, A1G
registers are the source registers in longword mode, only 8 bits of the data are stored from the
registers; the upper bits are sign-extended.
If the DSP registers are used as destination registers in longword mode, the load is to the 32 bits of
the register, with the exception of A0G, A1G. In the case of the A0, A1 registers, the data sign is
extended and stored in the guard bits. When the A0G, A1G registers are the destination registers in
longword mode, the least significant 8 bits of the data are loaded into the registers; the A0, A1
registers are not zero cleared but retain their previous values.
Tables 2.4 and 2.5 indicate the register data formats for DSP instructions. Some registers cannot
be accessed by certain instructions. For example, the PMULS instruction can designate the A1
register as a source register but cannot designate A0 as such. Refer to the instruction explanations
for details.
Figure 2.8 shows the relationship between the buses and the DSP registers during transfers.
Rev. 2.00 Mar 09, 2006 page 45 of 906
REJ09B0292-0200
Page 72
Section 2 CPU
Table 2.4Source Register Data Formats for DSP Instructions
Guard Bits
RegisterInstruction39–3231–1615–0
A0, A1DSP
operation
Data
transfer
A0G, A1GDataMOVS.WData——
transfer
X0, X1, Y0,
Y1, M0, M1
Note: * The sign is extended and stored in the ALU’s guard bits.
DSP
operation
DataMOVS.W
transfer
Fixed decimal,
PDMSB,
PSHA
Integer24-bit data—
Logic, PSHL,
PMULS
MOVX.W,
MOVY.W,
MOVS.W
MOVS.L32-bit data
MOVS.L
Fixed decimal,
PDMSB,
PSHA
Integer16-bit data—
Logic, PSHL,
PMULS
MOVS.L32-bit data
40-bit data
—16-bit data
*
Sign
—
32-bit data
Register Bits
Rev. 2.00 Mar 09, 2006 page 46 of 906
REJ09B0292-0200
Page 73
Table 2.5Destination Register Data Formats for DSP Instructions
Figure 2.8 DSP Register-Bus Relationship during Data Transfers
2.3CPU Core Instruction Features
The CPU core instructions are RISC type. The characteristics are as follows.
CDB
XDB
YDB
32 bits
MOVS.W,
MOVS.L
0
16-Bit Fixed Length: All instructions are 16 bits long, increasing program code efficiency.
One Instruction per Cycle: The microprocessor can execute basic instructions in one cycle using
the pipeline system. One state equals 16.0 ns when operating at 62.5 MHz.
Data Length: Longword is the basic data length for all operations. Memory can be accessed in
bytes, words, or longwords. Byte or word data accessed from memory is sign-extended and
handled as longword data. Immediate data is sign-extended for arithmetic operations or zeroextended for logic operations. It also is handled as longword data.
Rev. 2.00 Mar 09, 2006 page 48 of 906
REJ09B0292-0200
Page 75
Section 2 CPU
Table 2.6Sign Extension of Word Data
SH7616 CPUDescriptionExample of Conventional CPU
MOV.W @(disp,PC),R1
ADDR1,R0
........
.DATA.W H'1234
Note: @(disp, PC) accesses the immediate data.
Data is sign-extended to 32
bits, and R1 becomes
H'00001234. It is next operated
upon by an ADD instruction
ADD.W #H'1234,R0
Load-Store Architecture: Basic operations are executed between registers. For operations that
involve memory access, data is loaded to the registers and executed (load-store architecture).
However, Instructions such as AND manipulating bits, are executed directly in memory.
Delayed Branches: Such instructions as unconditional branches are delayed branch instructions.
In the case of delayed branch instructions, the branch occurs after execution of the instruction
immediately following the delayed branch instruction (slot instruction). This reduces pipeline
disruption during branching.
The branching operation of the delayed branch occurs after execution of the slot instruction.
However, with the exception of such branch operations as register updating, execution of
instructions is performed with the order of delayed branch instruction, then delayed slot
instruction.
For example, even if the contents of a register storing a branch destination address are modified by
a delayed slot, the branch destination address will still be the contents of the register before the
modification.
Table 2.7Delayed Branch Instructions
SH7616 CPUDescriptionExample of Conventional CPU
BRA TRGET
ADD R1,R0
Executes an ADD before
branching to TRGET
ADD.W R1,R0
BRA TRGET
Multiplication/Multiply-Accumulate Operation: 16 × 16 → 32 multiplications execute in one
to three cycles, and 16 × 16 + 64 → 64 multiply-accumulate operations execute in two to three
cycles. 32 × 32 → 64 multiplications and 32 × 32 + 64 → 64 multiply-accumulate operations
execute in two to four cycles.
Rev. 2.00 Mar 09, 2006 page 49 of 906
REJ09B0292-0200
Page 76
Section 2 CPU
T Bit: The T bit in the status register (SR) changes according to the result of a comparison, and
conditional branches occur in accordance with its true or false status. The number of instructions
modifying the T bit is kept to a minimum to improve the processing speed.
Table 2.8T Bit
SH7616 CPUDescriptionExample of Conventional CPU
CMP/GE R1,R0
BTTRGET0
BFTRGET1
ADD#–1,R0
CMP/EQ #0,R0
BTTRGET
T bit is set when R0 ≥ R1.
The program branches to TRGET0
when R0 ≥ R1.
The program branches to TRGET1
when R0 < R1
T bit is not changed by ADD. T bit
is set when R0 = 0. The program
branches when R0 = 0
CMP.W R1,R0
BGETRGET0
BLTTRGET1
SUB.W #1,R0
BEQ TRGET
Immediate Data: Byte immediate data resides in instruction code. Word or longword immediate
data is not input in instruction codes but is stored in a memory table. An immediate data transfer
instruction (MOV) accesses the memory table using the PC relative addressing mode with
displacement.
Table 2.9Immediate Data Accessing
ClassificationSH7616 CPUExample of Conventional CPU
8-bit immediateMOV#H'12,R0MOV.B#H'12,R0
16-bit immediateMOV.W @(disp,PC),R0
........
.DATA.W H'1234
32-bit immediateMOV.L@(disp,PC),R0
........
.DATA.L H'12345678
Note: @(disp, PC) accesses the immediate data.
Rev. 2.00 Mar 09, 2006 page 50 of 906
REJ09B0292-0200
MOV.W #H'1234,R0
MOV.L#H'12345678,R0
Page 77
Section 2 CPU
Absolute Address: When data is accessed by absolute address, the value already in the absolute
address is placed in the memory table. Loading the immediate data when the instruction is
executed transfers that value to the register and the data is accessed in the indirect register
addressing mode.
Table 2.10 Absolute Address Accessing
ClassificationSH7616 CPUExample of Conventional CPU
Absolute addressMOV.L@(disp,PC),R1
MOV.B@R1,R0
........
.DATA.L H'12345678
MOV.B @H'12345678,R0
16-Bit/32-Bit Displacement: When data is accessed by 16-bit or 32-bit displacement, the preexisting displacement value is placed in the memory table. Loading the immediate data when the
instruction is executed transfers that value to the register and the data is accessed in the indirect
indexed register addressing mode.
Table 2.11 Displacement Accessing
ClassificationSH7616 CPUExample of Conventional CPU
16-bit displacementMOV.W @(disp,PC),R0
MOV.W @(R0,R1),R2
........
.DATA.W H'1234
MOV.W @(H'1234,R1),R2
Rev. 2.00 Mar 09, 2006 page 51 of 906
REJ09B0292-0200
Page 78
Section 2 CPU
2.4Instruction Formats
2.4.1CPU Instruction Addressing Modes
The addressing modes and effective address calculation for instructions executed by the CPU core
are listed in table 2.12.
Table 2.12 CPU Instruction Addressing Modes and Effective Addresses
@RnThe effective address is the content of register
Rn
RnRn
@Rn+The effective address is the content of register
Rn. A constant is added to the content of Rn after
the instruction is executed. 1 is added for a byte
operation, 2 for a word operation, and 4 for a
longword operation
Rn
Rn + 1/2/4
1/2/4
@–RnThe effective address is the value obtained by
subtracting a constant from Rn. 1 is subtracted
for a byte operation, 2 for a word operation, and
4 for a longword operation
Rn
Rn – 1/2/4
1/2/4
+
–
Rn
Rn – 1/2/4
—
Rn
Rn
(After the
instruction
executes)
Byte: Rn + 1 → Rn
Word: Rn + 2 → Rn
Longword: Rn + 4
→ Rn
Byte: Rn – 1 → Rn
Word: Rn – 2
Rn
Longword: Rn – 4
→ Rn (Instruction
executed with Rn
after calculation)
→
Rev. 2.00 Mar 09, 2006 page 52 of 906
REJ09B0292-0200
The effective address is Rn plus a 4-bit
displacement (disp). The value of disp is zeroextended, and remains the same for a byte
operation, is doubled for a word operation, and is
quadrupled for a longword operation
Byte: Rn + disp
Word: Rn + disp ×
2
Longword: Rn +
disp × 4
Rn
disp
(zero-extended)
1/2/4
+
×
@(R0, Rn) The effective address is the Rn value plus R0
Rn
+
R0
@(disp:8,
GBR)
The effective address is the GBR value plus an
8-bit displacement (disp). The value of disp is
zero-extended, and remains the same for a byte
operation, is doubled for a word operation, and
is quadrupled for a longword operation
The effective address is the GBR value plus the R0
GBR
+
GBR + R0
GBR + R0
R0
@(disp:8,
PC)
The effective address is the PC value plus an
8-bit displacement (disp). The value of disp is zeroextended, is doubled for a word operation, and is
quadrupled for a longword operation. For a
longword operation, the lowest two bits of the PC
value are masked
PC
(for longword)
&
H'FFFFFFFC
+
disp
(zero-extended)
×
PC + disp × 2
or
PC&H'FFFFFFFC
+ disp × 4
Word: PC + disp
× 2
Longword: PC &
H'FFFFFFFC +
disp × 4
2/4
Rev. 2.00 Mar 09, 2006 page 54 of 906
REJ09B0292-0200
Page 81
Section 2 CPU
PC relative
addressing
disp:8The effective address is the PC value sign-extended
with an 8-bit displacement (disp), doubled, and
added to the PC value
PC
disp
(sign-extended)
2
+
PC + disp × 2
×
disp:12The effective address is the PC value sign-extended
with a 12-bit displacement (disp), doubled, and
added to the PC value
PC
disp
(sign-extended)
2
+
PC + disp × 2
×
RnThe effective address is the register PC value plus
Rn
PC
PC + disp × 2
PC + disp × 2
PC + Rn
Immediate
addressing
+
Rn
PC + Rn
#imm:8The 8-bit immediate data (imm) for the TST, AND,
OR, and XOR instructions are zero-extended
#imm:8The 8-bit immediate data (imm) for the MOV, ADD,
and CMP/EQ instructions are sign-extended
#imm:8The 8-bit immediate data (imm) for the TRAPA
instruction is zero-extended and is quadrupled
Rev. 2.00 Mar 09, 2006 page 55 of 906
—
—
—
REJ09B0292-0200
Page 82
Section 2 CPU
2.4.2DSP Data Addressing
There are two different kinds of memory accesses with DSP instructions. One type is with the X,
Y data transfer instructions (MOVX.W, MOVY.W), and the other is with the single data transfer
instructions (MOVS.W, MOVS.L). The data addressing differs between these two types of
instructions. Table 2.13 shows a summary of the data transfer instructions.
X, Y Data Addressing: Among the DSP instructions, the MOVX.W and MOVY.W instructions
can be used to simultaneously access X, Y data memory. The DSP instructions have two address
pointers for simultaneous accessing of X, Y data memory. Only pointer addressing is possible with
DSP instructions; there is no immediate addressing. The address registers are divided into two; the
R4, R5 registers become the X memory address register (Ax), and the R6, R7 registers become the
Y memory address register (Ay). The following three types of addressing exist with X, Y data
transfer instructions.
1. Non-updated address registers: The Ax, Ay registers are address pointers. They are not
updated.
2. Add index registers: The Ax, Ay registers are address pointers. The Ix, Iy register values are
added to them, respectively, after the data transfer (post-update).
Rev. 2.00 Mar 09, 2006 page 56 of 906
REJ09B0292-0200
Page 83
Section 2 CPU
3. Increment address registers: The Ax, Ay registers are address pointers. The value +2 is added
to each of them after the data transfer (post-update).
Each of the address pointers has an index register. The R8 register becomes the index register (Ix)
of the X memory address register (Ax), and the R9 register becomes the index register (Iy) of the
Y memory address register (Ay).
The X, Y data transfer instructions are processed in word lengths. X, Y data memory is accessed
in 16 bit lengths. This is why the increment processing adds 2 to the address registers. In order to
decrement, set –2 in the index register and designate add index register addressing. During X, Y
data addressing, only bits 1 to 15 of the address pointer are valid. Always write a 0 to bit 0 of the
address pointer and the index register during X, Y data addressing.
Figure 2.9 shows the X, Y data transfer addressing. When X memory and Y memory are accessed
using the X, Y bus, the upper word of Ax (R4 or R5) and Ay (R6 or R7) is ignored. The result of
@Ay+ and @Ay+Iy is stored in the lower word of Ay, and the upper word retains its original
value.
R8[Ix]R4[Ax]
+2 (INC)+2 (INC)
+0 (No update)
ALUAU*
Notes:
All three addressing methods (increment, index register addition (Ix, Iy), and
no update) are post-updating methods. To decrement the address pointer, set
the index register to –2 or –4.
* Adder added for DSP addressing.
R5[Ax]
+0 (No update)
Figure 2.9 X, Y Data Transfer Addressing
R9[Iy]R6[Ay]
R7[Ay]
Rev. 2.00 Mar 09, 2006 page 57 of 906
REJ09B0292-0200
Page 84
Section 2 CPU
Single Data Addressing: Among the DSP instructions, the single data transfer instructions
(MOVS.W and MOVS.L) are used to either load data into DSP registers or to store it from them.
With these instructions, the registers R2 to R5 are used as address registers (As) for the single data
transfers.
The four following data addressing instructions exist for single data transfer instructions.
1. Non-updated address registers: The As registers are address pointers. They are not updated.
2. Add index registers: The As registers are address pointers. The Is register values are added to
them after the data transfer (post-update).
3. Increment address registers: The As registers are address pointers. The value +2 or +4 is added
after the data transfer (post-update).
4. Decrement address registers: The As registers are address pointers. The value –2 or –4 is added
(+2 or +4 is subtracted) before the data transfer (pre-update).
The address pointer (As) uses the R8 register as an index register (Is).
Figure 2.10 shows the single data transfer addressing.
310
R8[Is]
–2/–4 (DEC)
+2/+4 (INC)
+0 (No update)
Note: There are four addressing methods (no update, index register addition (Is),
increment, and decrement). Index register addition and increment are
post-updating methods. Decrement is a pre-updating method.
Figure 2.10 Single Data Transfer Addressing
Rev. 2.00 Mar 09, 2006 page 58 of 906
REJ09B0292-0200
ALU
31
0
R2[As]
R3[As]
R4[As]
R5[As]
31
MAB
CAB
0
Page 85
Section 2 CPU
Modulo Addressing: The chip has a modulo addressing mode, just as other DSPs do. Address
registers are updated in the same manner as with other modes. When the address pointer value
becomes the same as a previously established modulo end address, the address pointer becomes
the modulo start address.
Modulo addressing is valid only with X, Y data transfer instructions (MOVX.W, MOVY.W).
When the DMX bit of the SR register is set, the X address register enters modulo addressing
mode; when the DMY bit of the SR register is set, the Y address register does so. Modulo
addressing is valid only for either the X or the Y address register; it is not possible to make them
both modulo addressing mode at the same time. Therefore, do not simultaneously set the DMX
and DMY. If they happen to be set at the same time, only the DMY side is valid.
The MOD register is used to designate the start and end addresses of the modulo address area; it
stores the MS (modulo start) and ME (modulo end). An example of MOD register (MS, ME)
usage is indicated below.
Designate the start and end addresses in MS and ME, and then set the DMX or DMY bit to 1. The
contents of the address register are compared with ME. If they match ME, the start address MS is
stored in the address register. The lower 16 bits of the address register are compared with ME. The
maximum modulo size is 64 kbytes. This is sufficient for X, Y data memory accesses. Figure 2.11
shows a block diagram of modulo addressing.
Rev. 2.00 Mar 09, 2006 page 59 of 906
REJ09B0292-0200
Page 86
Section 2 CPU
310
R8[Ix]
+2
+0
31
16
R4[Ax]
R5[Ax]
Instruction (MOVX/MOVY)
DMY
15
DMX
0
CONT
15
1
MS
31
15
16
R6[Ay]
R7[Ay]
0
31
R9[Iy]
0
+2
+0
ALU
CMP
ABxABy
15
XAB
1
15
ME
1
15
YAB
Figure 2.11 Modulo Addressing
An example of modulo addressing is indicated below:
(becomes the modulo start address because the modulo end
address occurred)
AU
1
Data is placed so that the upper 16 bits of the modulo start and end addresses become identical.
This is so because the modulo start address replaces only the lower 15 bits of the address register,
excepting bit 0.
Note: When using add index with DSP data addressing, there are cases where the value is
exceeded without the address pointer matching the ME. In such cases, the address pointer
does not return to the modulo start address. Bit 0 is disregarded not only for modulo
addressing, but also during X, Y data addressing, so always write 0 to the 0 bits of the
address pointer, index register, MS, and ME.
Rev. 2.00 Mar 09, 2006 page 60 of 906
REJ09B0292-0200
Page 87
Section 2 CPU
DSP Addressing Operation: The DSP addressing operation in the item stage (EX) of the
pipeline, including modulo addressing, is indicated below.
if ( Operation is MOVX.W MOVY.W ) {
ABx=Ax; ABy=Ay;
/* memory access cycle uses ABx and ABy. The addresses to be used
have not been updated */
/* Ax is one of R4,5 */
if ( DMX==0 || DMX==1 && DMY==1 )} Ax=Ax+(+2 or R8[Ix} or +0);
/* Inc,Index,Not-Update */
else if (!not-update) Ax=modulo( Ax, (+2 or R8[Ix]) );
/* Ay is one of R6,7 */
if ( DMY==0 ) Ay=Ay+(+2 or R9[Iy] or +0; /* Inc,Index,Not-Update */
else if (! not-update) Ay=modulo( Ay, (+2 or R9[Iy]) );
}
else if ( Operation is MOVS.W or MOVS.L ) {
if ( Addressing is Nop, Inc, Add-index-reg ) {
MAB=As;
/* memory access cycle uses MAB. The address to be used has not
been updated */
/* As is one of R2–5 */
As=As+(+2 or +4 or R8[Is] or +0); /* Inc.Index,Not-Update */
else { /* Decrement, Pre-update */
/* As is one of R2–5 */
As=As+(–2 or –4);
MAB=As;
/* memory access cycle uses MAB. The address to be used has been
updated */
}
/* The value to be added to the address register depends on addressing
operations.
For example, (+2 or R8[Ix] or +0) means that
+2:if operation is increment
R8[Ix}:if operation is add-index-reg
Rev. 2.00 Mar 09, 2006 page 61 of 906
REJ09B0292-0200
Page 88
Section 2 CPU
+0:if operation is not-update
*/
function modulo ( AddrReg, Index ) {
if ( AdrReg[15:0]==ME ) AdrReg[15:0]=MS;
else AdrReg=AdrReg+Index;
return AddrReg;
}
2.4.3Instruction Formats for CPU Instructions
The instruction format of instructions executed by the CPU core and the meanings of the source
and destination operands are indicated below. The meaning of the operand depends on the
instruction code. The symbols are used as follows:
• xxxx: Instruction code
• mmmm: Source register
• nnnn: Destination register
• iiii: Immediate data
• dddd: Displacement
Rev. 2.00 Mar 09, 2006 page 62 of 906
REJ09B0292-0200
Page 89
Table 2.14 Instruction Formats for CPU Instructions
Rev. 2.00 Mar 09, 2006 page 68 of 906
REJ09B0292-0200
Page 95
Section 2 CPU
Parallel Processing Instructions: The parallel processing instructions allow for more efficient
execution of digital signal processing using the DSP unit. They are 32 bit length, allowing
simultaneously in parallel four processes, ALU operations, multiplications or 2 data transfers.
The parallel processing instructions are divided into A fields and B fields. The A field defines data
transfer instructions; the B field defines ALU operation instructions and multiplication
instructions. These instructions can be defined independently, the processes can be independent,
and furthermore, they can be executed simultaneously in parallel. Table 2.17 indicates the A field
parallel data transfer instructions, and table 2.18 indicates the B field ALU operation instructions
and multiplication instructions. A fields instruction is the same as double data transfers in table
2.15.
Table 2.17 A Field Parallel Data Transfer Instructions
2. (if cc): DCT (DC bit true), DCF (DC bit false), or none (unconditional instruction)
2.5Instruction Set
The instructions are divided into three groups: CPU instructions executed by the CPU core, DSP
data transfer instructions executed by the DSP unit, and DSP operation instructions. There are a
number of CPU instructions for supporting the DSP functions. The instruction set is explained
below in terms of each of the three groups.
Rev. 2.00 Mar 09, 2006 page 72 of 906
REJ09B0292-0200
Page 99
2.5.1CPU Instruction Set
Table 2.19 lists the CPU instructions by classification.
Table 2.19 Classification of CPU Instructions
Section 2 CPU
Operation
Classification Types
Data transfer5MOVData transfer, immediate data transfer, peripheral
Arithmetic21ADDBinary addition33
operations
CodeFunction
module data transfer, structure data transfer
MOVAEffective address transfer
MOVTT bit transfer
SWAPSwap of upper and lower bytes
XTRCTExtraction of the middle of registers connected
ADDCBinary addition with carry
ADDVBinary addition with overflow
CMP/cond Comparison
DIV1Division
DIV0SInitialization of signed division
DIV0UInitialization of unsigned division
DMULSSigned double-length multiplication
DMULUUnsigned double-length multiplication
DTDecrement and test
EXTSSign extension
EXTUZero extension
MACMultiply/accumulate, double-length
multiply/accumulate operation
MULDouble-length multiply operation
MULSSigned multiplication
MULUUnsigned multiplication
NEGNegation
NEGCNegation with borrow
SUBBinary subtraction
SUBCBinary subtraction with borrow
SUBVBinary subtraction with underflow
No. of
Instructions
39
Rev. 2.00 Mar 09, 2006 page 73 of 906
REJ09B0292-0200
Page 100
Section 2 CPU
Operation
Classification Types
Logic6ANDLogical AND14
operations
Shift10ROTCLOne-bit left rotation with T bit14
Branch9BFConditional branch, conditional branch with delay
CodeFunction
NOTBit inversion
ORLogical OR
TASMemory test and bit set
TSTLogical AND and T bit set
XORExclusive OR
ROTCROne-bit right rotation with T bit
ROTLOne-bit left rotation
ROTROne-bit right rotation
SHALOne-bit arithmetic left shift
SHAROne-bit arithmetic right shift
SHLLOne-bit logical left shift
SHLLnn-bit logical left shift
SHLROne-bit logical right shift
SHLRnn-bit logical right shift
(Branch when T = 0)
BTConditional branch, conditional branch with delay
(Branch when T = 1)
BRAUnconditional branch
BRAFUnconditional branch
BSRBranch to subroutine procedure
BSRFBranch to subroutine procedure
JMPUnconditional branch
JSRBranch to subroutine procedure
RTSReturn from subroutine procedure
No. of
Instructions
11
Rev. 2.00 Mar 09, 2006 page 74 of 906
REJ09B0292-0200
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.