For the information for microcontroller supports, see the following web site.
http://edevice.fujitsu.com/micom/en-support/
FUJITSU MICROELECTRONICS LIMITED
PREFACE
■ Objectives and targeted reader
FR81 Family is a 32 bit single chip microcontroller with CPU of new RISC Architecture as the core. FR81
Family has specifications that are optimum for embedded use requiring high performance CPU processing
power.
This manual explains the programming model and execution instructions for engineers developing a
product using this FR81 Family Microcontroller, especially the programmers who produce program s using
assembly language of the assembler for FR/FR80/FR81 Family.
For the rules of assembly grammar language and the method of use of Assembler Programs, kindly refer to
"FR Family Assembler Manual".
*: FR, the abbreviation of Fujitsu RISC controller, is a line of products of Fujitsu Microel ectroni cs Limited.
Other company names and brand names are the trademarks or registered trademarks of their respective
owners.
■ Organization of this Manual
This manual consists of the following 7 chapters and 1 supplement.
CHAPTER 1 OVERVIEW OF FR81 FAMILY CPU
This chapter describes the features of FR81 Family CPU and its differences from hitherto FR Family.
CHAPTER 2 MEMORY ARCHITECTURE
This chapter describes Memory Architecture of the CPU of FR81 Family. Memory Architecture is the
method of allocation of memory space and access to this memory space.
CHAPTER 3 PROGRAMMING MODEL
This chapter describes registers in the CPU existing as programming model of FR81 Family CPU.
CHAPTER 4 RESET AND "EIT" PROCESSING
This chapter describes resetting of FR81 Family CPU and EIT processing. EIT processing is the generic
term for exceptions, interruption and trap.
CHAPTER 5 PIPELINE OPERATION
This chapter describes pipeline operation and delay divergence, the salient feature of FR81 Family CPU.
CHAPTER 6 INSTRUCTION OVERVIEW
This chapter describes outline of commands of FR81 Family CPU.
CHAPTER 7 DETAILED EXECUTION INSTRUCTIONS
This chapter describes Execution Instructions of FR81 Family CPU in Reference Format in the
alphabetical order.
APPENDIX
It contains instruction list and instruction map of FR81 Family CPU.
i
• The contents of this document are subject to change without notice.
Customers are advised to consult with sales representatives before ordering.
• The information, such as descriptions of function and application circuit examples, in this document are presented solely for the
purpose of reference to show examples of operations and uses of FUJITSU MICROELECTRONICS device; FUJITSU
MICROELECTRONICS does not warrant proper operation of the device with respect to use based on such information. When
you develop equipment incorporating the device based on such information, you must assume any responsibility arising out of
such use of the information. FUJITSU MICROELECTRONICS assumes no liability for any damages whatsoever arising out of
the use of the information.
• Any information in this document, including descriptions of function and schematic diagrams, shall not be construed as license
of the use or exercise of any intellectual property right, such as patent right or copyright, or any other right of FUJITSU
MICROELECTRONICS or any third party or does FUJITSU MICROELECTRONICS warrant non-infringement of any thirdparty's intellectual property right or other right by using such information. FUJITSU MICROELECTRONICS assumes no
liability for any infringement of the intellectual property rights or other rights of third parties which would result from the use of
information contained herein.
• The products described in this document are designed, developed and manufactured as contemplated for general use, including
without limitation, ordinary industrial use, general office use, personal use, and household use, but are not designed, developed
and manufactured as contemplated (1) for use accompanying fatal risks or dangers that, unless extremely high safety is secured,
could have a serious effect to the public, and could lead directly to death, personal injury, severe physical damage or other loss
(i.e., nuclear reaction control in nuclear facility, aircraft flight control, air traffic control, mass transport control, medical life
support system, missile launch control in weapon system), or (2) for use requiring extremely high reliability (i.e., submersible
repeater and artificial satellite).
Please note that FUJITSU MICROELECTRONICS will not be liable against you and/or any third party for any claims or
damages arising in connection with above-mentioned uses of the products.
• Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or loss from such
failures by incorporating safety design measures into your facility and equipment such as redundancy, fire protection, and
prevention of over-current levels and other abnormal operating conditions.
• Exportation/release of any products described in this document may require necessary procedures in accordance with the
regulations of the Foreign Exchange and Foreign Trade Control Law of Japan and/or US export control laws.
• The company names and brand names herein are the trademarks or registered trademarks of their respective owners.
6.3Data Format ...................................................................................................................................... 93
6.3.1Data Format Used by Integer Type Instructions (Common with All FR Family) .......................... 93
6.3.2Format Used for Floating Point Type Instructions ....................................................................... 94
6.4Read-Modify-Write type Instructions ................................................................................................. 96
6.5Branching Instructions and Delay Slot .............................................................................................. 97
This chapter describes the features of FR81 Family CPU
and the changes from the earlier FR Family.
1.1 Features of FR81 Family CPU
1.2 Changes from the earlier FR Family
CHAPTER 1 OVERVIEW OF FR81 FAMILY CPU
1.1
FR81 Family
1.1Features of FR81 Family CPU
FR81 Family CPU is meant for 32 bit RISC controller having proprietary FR81
architecture of Fujitsu. The FR81 architecture is optimized for microcontrollers by using
the FR family instruction set and including improved floating-point, memory protection,
and debug functions.
■ General-purpose Register Architecture
It is load/store architecture based on 16 numbers of 32-bit General-purpose registers R0 to R15. The
architecture also has instructions that are suitable for embedded uses such as memory to memory transfer,
bit processing etc.
■ Linear Space for 32-bit (4G bytes) addressing
Address space is controlled for each byte unit. Linear specification of Address is made based on 32-bit
address.
■ 16-bit fixed instruction length (excluding immediate data transfer instructions)
It is 16-bit fixed length instruction format excluding 32/20-bit immediate data transfer instruction. It
enables securing high object efficiency.
■ Floating point calculation unit (FPU)
FR81 Family supports single precision floating point calculation (IEEE754 compliant). It has 16 pieces of
32-bit floating point registers from FR0 to FR15. A single instruction can execute a product-sum operation
type calculation (multiplication, or addition/subtraction). The instruction length of a floating point type
instruction is 32 bits
■ Pipeline Configuration
High speed one-instruction one-cycle processing of the basic instructions based on 5-stage pipeline
operation can be carried out. Pipeline has following 5-stage configuration.
• IF Stage: Load Instruction
• ID Stage: Interpret Instruction
• EX Stage: Execute Instruction
• MA Stage: Memory Access
• WB Stage: Write to register
FR81 Family has the 6-stage pipeline configuration to execute floating point type instructions.
■ Non-blocking load
In FR81 Family, non-blocking loading is carried out m aking execution of LD (load) instructions efficient.
A maximum of four LD (Load) instructions can be issued in anticipation. In non-blocking, succeeding
instruction is executed without waiting for the completion o f a load instruction, in case general-purpose
register storing the value of load instruction is not referred by the succeeding instruction.
2FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
CHAPTER 1 OVERVIEW OF FR81 FAMILY CPU
FR81 Family
■ Harvard Architecture
An instruction can be executed efficiently based on Harvard Architecture where instruction bus for
instruction access and data bus for data access are independent.
■ Multiplication Instruction
Multiplication/division computation can be executed at the instructio n level based on an in-built mult iplier.
32-bit multiplication, signed or unsigned, is executed in 5 cycles. 16-bit multiplication is executed in 3
cycles.
■ Step Division Instruction
32-bit ÷ 32-bit division, signed or unsigned, can be executed based on combination of step division
instructions.
■ Direct Addressing Instruction for peripheral access
Address of 256 words/ 256 half-words/ 256 bytes from the top of address space (low order address) can be
directly specified. It is convenient for address specification in the I/O Register of the peripheral resource.
1.1
■ High-speed interrupt processing complete within 6 cycles
Acceptance of interruption is processed at a high speed within 6 cycles. A 16-level priority order is given to
the request for interruption. Masking in line with the priority order can be carried out based on interruption
mask level of the CPU.
CM71-00105-1EFUJITSU MICROELECTRONICS LIMITED3
CHAPTER 1 OVERVIEW OF FR81 FAMILY CPU
1.2
FR81 Family
1.2Changes from the earlier FR Family
FR81 Family has partial addition and deletion of instructions and operational changes
from the earlier FR Family (FR30 Family, FR60 Family etc.).
■ Instructions that cannot be used in FR81/FR80 Family
Following instructions cannot be used in FR81/FR80 Family.
• Resource Instructions (LDRES, STRES)
Undefined Instruction Exceptions and not the Coprocessor Error Trap occur when execution of
Coprocessor Instruction is attempted. Undefined In struction Exceptions occur when execution of Resource
Instruction is attempted.
■ Instructions added to FR81/FR80 Family
Following instructions have been added in FR81/FR80 Family. These instructions have replaced the bit
search module embedded as a peripheral function.
• SRCH1 (Bit Search Instruction Detection of First "1" bit from MSB to LSB)
• SRCH0 (Bit Search Instruction Detection of first "0" bit from MSB to LSB)
• SRCHC (Bit Search Instruction Detection of Change point from MSB to LSB)
see "Chapter 7 Detailed Execution Instructions" and "Appendix A 2 Instruction Lists" for operation of Bit
Search Instructions.
■ Adding floating point type instructions
Floating point type instructions and 16 pieces of 32-bit floating point registers (FR0 to FR15) have been
added in FR81 Family.
■ Privilege mode
Privilege mode has been added in FR81 family. Privilege mode and user mode are two CPU operation
modes.
■ Exception processing
Exception processing has been improved for FR81 Family. The following exceptions have been added.
• Invalid instruction exception (Changing definition from undefined instruction exception)
• Data access error exception
• FPU absence exception
4FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
CHAPTER 1 OVERVIEW OF FR81 FAMILY CPU
FR81 Family
■ Operation of INTE Instructions during Step Execution
In FR81 Family, trap processing is initiate d based on INTE instructions even during step execution based
on step trace trap.
In hitherto FR Family, trap processing is not initiated based on INTE inst ruct ions during step execution.
For trap processing based on step trace trap and INTE instructions, see “4.6 Traps”.
1.2
CM71-00105-1EFUJITSU MICROELECTRONICS LIMITED5
CHAPTER 1 OVERVIEW OF FR81 FAMILY CPU
1.2
FR81 Family
6FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
CHAPTER 2
MEMORY ARCHITECTURE
This chapter explains the memory architecture of FR81
Family CPU. Memory architecture refers to allocation of
memory spaces and methods used to access memory.
2.1 Address Space
2.2 Data Structure
2.3 Word Alignment
CM71-00105-1EFUJITSU MICROELECTRONICS LIMITED7
CHAPTER 2 MEMORY ARCHITECTURE
2.1
2.1Address Space
The address space of FR81 Family CPU is 32 bits (4Gb yte).
CPU controls the address spaces in byte units. An address on the address space is accessed from the CPU
by specifying a 32-bit value. Address space is indicated in Figure 2.1-1.
Figure 2.1-1 Address space
FR81 Family
Direct address area
General addressing
0000 0000 H
0000 0100 H
0000 0200 H
0000 0400 H
000F FC00H
0010 0000H
FFFF FFFFH
Byte data
Half-word data
Word data
Vector table
initial area
Program or data area
Address space is also called memory space. It is a logical address space as seen from the CPU. Addresses
cannot be changed. Logical address as seen from the CPU, and the physical address actually allocated to
memory or I/O are identical.
2.1.1 Direct Address Area
In the lower address in the address space, there is a direct address area.
Direct address area directly specifies an address in the direct address specification instruction. This area
accesses only based on operand data in the instruction without the use of general-purpose registers. The
size of the address area that can be specified by direct addressing varies according to the data type being
accessed.
000F FC00
TBR initial value
HTBR
The correspondence between data type and area specified by direct address is as follows.
• byte data access: 0000 0000
• half-word data access: 0000 0000H to 0000 01FF
• word data access: 0000 0000H to 0000 03FF
to 0000 00FF
H
H
H
H
The method of using the 8-bit address data contained in the operand of instructions that specify direct
addresses is as follows:
8FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
FR81 Family
0000 0000H
FFFF FFFFH
TBR
1 Kbyte
Number
EIT source
FF
H
FEH
FDH
FCH
00H
000H
004H
008H
00CH
3FCH
Entry address for INT instruction
Entry address for INT instruction
Entry address for INT instruction
Entry address for INT instruction
Entry address for reset processing
Memory space
Vect or
table
area
• byte data access: Lower 8 bits of the address are used as it is
• half word data access: Value is doubled and used as lower 9 bits of the address
• word data access: Value is quadrupled and used as lower 10 bits of the address
The relation between data types specified by direct address and memory address is shown in Figure 2.1-2.
CHAPTER 2 MEMORY ARCHITECTURE
2.1
Figure 2.1-2
[Example 1] Byte data: DMOVB R13,@58H
[Example 2] Half-word data: DMOVH R13,@58H
[Example 3] Word data: DMOV R13,@58H
Relation between data type specified by direct address and memory address
Memory space
58
Object code:1A58H
Object code:192C
R13 12345678
Right 2-bit shift
Object c ode:1816
No datashift
Right 1-bit shift
H 58HLeft 1-bit shift
H 58HLeft 2-bit shi
f
t
0000 0058HR13 12345678
0000 0058
0000 0058
H
78
Memory space
H
5678
Memory space
HR13 12345678
1345678
2.1.2Vector Table Area
An area of 1Kbyte from the address shown in the Table Base Register (TBR) is called the EIT Vector Table
Area.
Table Base Register (TBR) represents the top address of the vector table area. In this vector table area, the
entry addresses of EIT processing (Exception processing, Interrupt processing, Trap processing) are
described. The relation between Table Base Register (TBR) and vector table area is shown in Figure 2.1-3.
Figure 2.1-3 Relation between Table Base Register (TBR) and Vector Table Area addresses
CM71-00105-1EFUJITSU MICROELECTRONICS LIMITED9
CHAPTER 2 MEMORY ARCHITECTURE
2.1
FR81 Family
Table 2.1-1
Offset from
TBR
3FC
H
3F8
H
3F4
H
3F0
H
3EC
H
3E8
H
3E4
H
3E0
H
3DC
H
3D8
H
3D4
H
3D0
H
3CC
H
3C8
H
3C4
H
3C0
H
3BC
H
to
304
H
300
H
2FC
H
2F8
H
2F4
H
to
000
H
As a result of reset, the value of Table Base Register (TBR) is initialized to 000F FC00
vector table area extends from 000F FC00
to 000F FFFFH. By rewriting the Table Base Register (TBR),
H
, and the range of
H
the vector table area can be allocated to any desired location.
A vector table is composed of entry addresses for each EIT processing programs. Each vector table
contains values whose use is fixed according to the CPU architecture, and values that vary according to the
type of built-in peripheral functions. The structure of vector table area is shown in Table 2.1-1.
violation exception
NoData access error interrupt
NoINTE instructionFor use in the emulator
NoInstruction break
Nosystem reserved
NoStep trace trap
Nosystem reserved
NoInvalid instruction exception
NoNMI request
General interrupt
Yes
(used in external interrupt,
interrupt from peripheral
Refer to the Hardware Manual for each
model
function)
NoGeneral interruptsUsed in Delayed interrupt
Nosystem reservedUsed in REALOS
Nosystem reservedUsed in REALOS
NoUsed in INT instruction
For vector tables of actual models, refer to the hardware manuals for each model.
10FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
CHAPTER 2 MEMORY ARCHITECTURE
FR81 Family
2.1.320-bit Addressing Area & 32-bit Addressing Area
The lower portion of the address space extending from 0000 0000H to 000F FFFFH (1Mbyte) will be the
20-bit addressing area. The overall address space from 0000 0000
addressing space.
If all the program locations and data locations are positioned within the 20-bit addressing area, a compact
and high-speed program can be realized as compared to a 32-bit addressing area.
In a 20-bit addressing area, as the address values are within 20 bits, the LDI:20 instruction can be used for
immediate loading of address information. The instruction length (Code size) of LDI:20 instruction is
4bytes. By using LDI:20 instruction, the program becomes more compact than when using LDI:32
instruction of instruction length 6bytes.
FR81 Family CPU has three data types namely byte data (8-bits), half word data (16-bits)
and word data (32-bits). The byte order is big endian.
2.2.1Byte Data
This is a data type having 8 bits as unit. Bit order is l ittle endian, MSB side becomes bit7 and LSB side
becomes bit0. The structure of byte data is shown in Figure 2.2-1.
Figure 2.2-1
2.2.2Half Word Data
This is a data type having 16 bits (2byte) as unit . Bit order is little endian, MSB side is bit15 while LSB
side is bit0. Bit15 to bit8 of MSB side represent the higher bytes wh ile bit7 to bit0 of LSB side represent
the lower bytes. The structure of half word data is shown in Figure 2.2-2.
Figure 2.2-2
MSB
bit
Higher bytesLower bytes
Structure of byte data
Structure of Half Word Data
LSB
7891011121314156543210
2.2.3Word Data
This is a data type having 32 bits (4byte) as unit . Bit order is little endian, MSB side is bit31 while LSB
side is bit0. Bit31 to bit16 of the MSB side become the higher half word, while bit1 5 to bit0 of the LSB
side become the lower half word. The structure of word data is shown in Figure 2.2-3.
Figure 2.2-3
MSB
bit31
Higher half wordLower half word
12FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
Structure of Word Data
16 1524 238 70
LSB
FR81 Family
2.2.4Byte Order
The byte order of FR81 Family CPU is big endian. When word data or half word data are allocated to
address spaces, the higher bytes are placed in the lower address side while the lower bytes are placed in the
higher address side. The arrangement of big endian byte data is shown in Figure 2.2-4.
CHAPTER 2 MEMORY ARCHITECTURE
2.2
Byte
Half word
Word
For example, if a word data was written on the memory (RAM) at address location 0004 1234
memory space, the highest byte will be stored at location 0004 1234
at location byte 0004 1237
Address
MSB
AddressAddress +1
MSB
MSB
Higher byteLower byte
AddressAddress +1Address +2Address +3
Highest byteLowest byte
Higher half wordLower half word
.
H
Figure 2.2-4
LSB
Big Endian Byte Orde
LSB
while the lowest byte will be stored
H
H
LSB
of the
CM71-00105-1EFUJITSU MICROELECTRONICS LIMITED13
CHAPTER 2 MEMORY ARCHITECTURE
2.3
FR81 Family
2.3Word Alignment
The data type used determines restrictions on the designation of memory addresses
(word alignment).
2.3.1 Program Access
Unit of instruction length is half word (2byte) and all instructions are allocated to addresses which are
multiples of 2 (2n location).
At the time of execution of the instruction, bit0 of the program counter (PC) automatically becomes "0",
and is always at an even address. In a branched instruction, even if an odd address is generated as a result
of branch destination address calculation, the bit0 of the address will be assigned "0" and branched to an
even address.
There is no address exception in program access.
2.3.2 Data Access
There are following restrictions on addresses for data access depending upon the data type used.
Word data
Data is assigned to addresses that are multiples of 4 (4n location). The restriction of multiples of 4
on addresses is called ‘word boundary’. If the specified address is not a multiple of 4, the lower two
bits of the address are set to "00" forcibly.
Half-word data
Data is assigned to addresses that are multiples of 2 (2n locations). The restr iction of multiples of 2
on addresses is called ‘half-word boundary’. If the specified address is not a multiple of 2, the lower
1 bit of the address is set to "0" forcibly.
Byte data
There is no restriction on allocation of addresses.
During word and half-word data access, condition that lower bit of an address has to be "0" is applicable
only for the result of computation of an effective address. Values still under calcula tion are used as they
are.
14FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
CHAPTER 3
PROGRAMMING MODEL
This chapter describes the programming model of FR81
Family CPU.
3.1 Register Configuration
3.2 General-purpose Registers
3.3 Dedicated Registers
3.4 Floating-point Register
CM71-00105-1EFUJITSU MICROELECTRONICS LIMITED15
CHAPTER 3 PROGRAMMING MODEL
3.1
FR81 Family
3.1Register Configuration
FR81 Family CPU uses three types of registers, namely, general-purpose registers, dedicated
registers and floating point registers.
General-purpose registers are registers that store computation data and address information. They comprise
16 registers from R0 to R15. Dedicated registers are registers that store information for specific
applications.
Floating point registers are registers that store calculation inform ation for floating point calculations . They
are comprised of 16 registers from FR0 to FR15.
16FUJITSU MICROELECTRONICS LIMITEDCM71-00105-1E
Loading...
+ 460 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.