RL78 Family is a 16-bit CPU core for embedded microcontrollers of Renesas Electronics introduced in 2010.
Architecture
Although it has eight 8-bit registers or four 16-bit register pairs, essentially all arithmetic operations are performed on a single accumulator (the A register or AX register pair). Most models have four register banks which may be selected quickly.
Special-purpose registers consist of: 20-bit program counter PC 16-bit stack pointer SP. This is always 2-byte aligned. 8-bit program status word PSW. This includes a carry flag (borrow bit on subtract), auxiliary carry flag and zero flag, but not a negative flag or overflow flag. The former is unnecessary, as it is possible to branch on the most significant bit of the accumulator directly, but the lack of the latter makes signed comparisons awkward. Two 4-bit segment registers, describes below.
Data addressing is mostly 16-bit, with all RAM and special function registers located in the high 64 KB of the address space (0xF0000–0xFFFFF), and data accesses defaulting to that region. Access to other regions of the address space uses an "ES" prefix opcode, indicating that the high four address bits should come from a special "extra segment" register instead.
The basic 2-operand ALU operations come in the following forms: A, #immediate (A ← A op immediate) A, register (A ← A op register) register, A (register ← register op A) A, addr8 (A ← A op [addr8], range limited to special function registers) A, addr16 (A ← A op [addr16], ES: prefix optional) A, [HL] (A ← A op [HL], ES: prefix optional) A, [HL+byte] (A ← A op [HL+byte], ES: prefix optional) A, [HL+B] (A ← A op [HL+B], ES: prefix optional) A, [HL+C] (A ← A op [HL+C], ES: prefix optional)
Code addresses, in contrast, default to the low portion of the address space where the ROM is located. Control transfer instructions (jump and call) allow a 20-bit address to be specified, while indirect control transfers use the concatenation of a 16-bit register address and a 4-bit "code segment" register. Unlike the 8086 microprocessor, there are no separate near and far return instructions; all subroutine calls push the full 20-bit return address.
The architecture is consistently little-endian, with all multi-bytes values appearing least significant byte.
Microarchitectures
RL78 Family is an accumulator-based register-bank CISC architecture
with 3-stage instruction pipelining. It has 20-bit () address space. Its basic instruction set architecture is succeeded from 78K0R, which has 75 same instructions out of 80.
RL78 has three microarchitecture variants as follows.
Applications
RL78 covers wide range of application area for mechanical system controls and for user interfaces.
Grouping
RL78 Family is divided into some groups, those have unique naming rules. G1x: For general purpose use L1x: For segment LCD controls I1x: Mainly for industrial use F1x: For automotive use D1x: Specially designed for automotive customers only
Application examples
RL78 is suitable for consumer electronics, such as major appliances (including; washing machines, clothes dryers, dishwashers, refrigerators, and air conditioners), small appliances (including; power tools, vacuum cleaners, and coffeemakers), and medical devices (including; electronic toothbrushes, blood glucose meters, holter monitors). It is also used for factory automation infrastructure (including; sensors, gauges, and actuators), and energy conservation (including; smart meters, inverter compressors, and lighting control systems).
For automotive industry, low-power and size constrained applications are ideally suited to RL78's automotive dedicated communication interfaces, such as CAN, LIN, and IEBus, and brushless DC electric motor solutions. Three special grade of maximum ambient temperature, , , and , are available for some products.
History
RL78 (130nm MF3 flash process) was the first new MCU to emerge from the new Renesas Electronics company from the merger of NEC Electronics and Renesas Technology and incorporated the features of the NEC 78K0R (150nm MF2 flash process) and Renesas Technology R8C microcontrollers. The RL78 core variants include the S1, S2, and S3 type cores which evolved from the NEC 78K0R core. The basic S1 core support 74 instructions, the S2 core adds register banking and supports 75 instructions, while the S3 core adds an on-chip multiplier / divider / multiple-accumulate and supports 81 instructions.