JP2014179107A - Semiconductor integrated circuit device - Google Patents

Semiconductor integrated circuit device Download PDF

Info

Publication number
JP2014179107A
JP2014179107A JP2014078466A JP2014078466A JP2014179107A JP 2014179107 A JP2014179107 A JP 2014179107A JP 2014078466 A JP2014078466 A JP 2014078466A JP 2014078466 A JP2014078466 A JP 2014078466A JP 2014179107 A JP2014179107 A JP 2014179107A
Authority
JP
Japan
Prior art keywords
data
bus
address
memory
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014078466A
Other languages
Japanese (ja)
Other versions
JP5802791B2 (en
Inventor
Nao Ishikawa
直 石川
Seiji Inokari
誠司 猪狩
Hiromi Nagayama
ひろみ 永山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2014078466A priority Critical patent/JP5802791B2/en
Publication of JP2014179107A publication Critical patent/JP2014179107A/en
Application granted granted Critical
Publication of JP5802791B2 publication Critical patent/JP5802791B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/04Addressing variable-length words or parts of words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30025Format conversion instructions, e.g. Floating-Point to Integer, decimal conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Microcomputers (AREA)
  • Executing Machine-Instructions (AREA)
  • Memory System (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data processing device in a bi-endian system, which allows the shared use of a program regardless of the endian type and allows the sharing of a vector table.SOLUTION: An instruction is fixed to a little endian, and the endian of data used for executing the instruction is variable. The size of each vector address of a vector table is 32-bits, and the number of bits at the time of data access is 32 bits at the maximum. A CPU performs an instruction fetch and before executing the fetched instruction, performs a 32-bit data access to a memory, for example. In so doing, the CPU controls an aligner so that the address and alignment of data which is stored in each address in the unit of byte in a data register become identical to the address and alignment of data which is specified by the little endian of the instruction, without depending on the endian type of the data.

Description

この発明は、プロセッサを有するデータ処理装置に関する。   The present invention relates to a data processing apparatus having a processor.

CPU(中央処理装置)又はDSP(ディジタル・シグナル・プロセッサ)等のプロセッサを有するデータ処理装置、例えば、所謂マイクロコンピュータ(マイクロプロセッサ、マイクロコントローラ、マイコンともいう。)と言われる半導体集積回路装置においては、バイナリ情報のデータの並びにおいて、リトルエンディアン(Little Endian)と呼ばれるデータの並びと、ビッグエンディアン(Big Endian)と呼ばれるデータの並びとがある。   In a data processing device having a processor such as a CPU (central processing unit) or DSP (digital signal processor), for example, a so-called microcomputer (also referred to as a microprocessor, a microcontroller, or a microcomputer) is a semiconductor integrated circuit device. In the data arrangement of binary information, there are a data arrangement called “Little Endian” and a data arrangement called “Big Endian”.

マイクロコンピュータで扱うバイナリ情報としては、マイクロコンピュータの動作を制御する命令として処理されるバイナリ情報と、斯かる命令の実行等により処理されるデータとしてのバイナリ情報とがあり、ある特定のマイクロコンピュータにおいては命令及びデータ共に、リトルエンディアン又はビッグエンディアンのいずれか一方を採用して、データ処理を行うことが一般的である。   The binary information handled by the microcomputer includes binary information processed as an instruction for controlling the operation of the microcomputer and binary information as data processed by execution of the instruction. In general, data processing is performed using either little endian or big endian for both instructions and data.

一方で、特許文献1に記載されるように、マイクロコンピュータの命令およびデータの双方のエンディアンについてリトルエンディアン/ビッグエンディアン両方のエンディアンにも対応可能としたマイクロコンピュータ、または特許文献2に記載されるようにマイクロコンピュータで処理するデータについてリトルエンディアン/ビッグエンディアンを変更可能とするマイクロコンピュータの記載がある。   On the other hand, as described in Patent Document 1, a microcomputer that can support both little endian / big endian endian of both instructions and data of the microcomputer, or Patent Document 2 Describes a microcomputer that can change little endian / big endian for data processed by the microcomputer.

特許文献2に記載されるマイクロコンピュータでは、格納されているデータがリトルエンディアンであるかビッグエンディアンであるかに応じて、バイト単位でのデータの並びを変更させ、いずれのエンディアンであっても処理可能となるように構成することが記載されている。   In the microcomputer described in Patent Document 2, the arrangement of data in byte units is changed depending on whether stored data is little endian or big endian, and processing can be performed for any endian. It is described that it is configured to be possible.

又、マイクロコンピュータにおいて、命令やデータを格納するために必要とされるメモリ容量を削減し、適正な消費電力で命令の実行/データの処理効率を向上することも求められる。   In addition, in a microcomputer, it is also required to reduce the memory capacity required for storing instructions and data, and to improve instruction execution / data processing efficiency with appropriate power consumption.

特開2000−82009号公報JP 2000-82009 A 特開2005−174296号公報JP 2005-174296 A

現在、CPU(機能としての記載と半導体上に形成される物理的領域としての記載を区別する場合は、前者はCPU,後者はCPUコアと記載し、区別不要の場合はCPUと記載する。)又はDSP等のプロセッサを有するデータ処理装置(以下、単にマイクロコンピュータという。)の開発においては、CPU自体の機能と共に、CPUコアとともに各種の周辺機能ブロック(周辺機能IP又は周辺機能IPコアという。)を半導体基板上に構成し、CPUの制御の下で各種の周辺機能ブロックを動作させることで、全体として一つの目的に応じた処理を行うようにされる。その場合に、所謂IPコアベンダと呼ばれる特定の周辺機能ブロックの設計開発を専門とする企業から必要とする周辺機能ブロックを購入したり、自社で過去に設計した若しくは別製品で設計している周辺機能ブロックを使用したりして1の半導体基板上に構成することで、目的とするマイクロコンピュータを設計開発することも行われ始めている。   Currently, a CPU (when the description as a function and the description as a physical area formed on a semiconductor are distinguished, the former is described as a CPU, the latter is described as a CPU core, and when there is no need for distinction, it is described as a CPU.) Alternatively, in the development of a data processing apparatus (hereinafter simply referred to as a microcomputer) having a processor such as a DSP, various peripheral function blocks (referred to as peripheral function IP or peripheral function IP core) together with the function of the CPU itself and the CPU core. Is configured on a semiconductor substrate, and various peripheral function blocks are operated under the control of the CPU, so that processing corresponding to one purpose is performed as a whole. In such a case, the peripheral function block that is required by a company specializing in the design and development of a specific peripheral function block called a so-called IP core vendor is purchased, or the peripheral function that has been designed in the past or designed by another product. Designs and development of target microcomputers have begun by using blocks and configuring them on a single semiconductor substrate.

このようなマイクロコンピュータの設計開発体制においては、購入又は自社で設計した周辺機能ブロックのデータのエンディアンがCPU自体のエンディアンと相違し、また協働すべき周辺機能ブロック同士のエンディアンにおいても相違することも生じえる。   In such a microcomputer design and development system, the endian of the peripheral function block data purchased or designed by the company is different from the endian of the CPU itself, and the endian of the peripheral function blocks to be cooperated is also different. Can also occur.

従来はこのようなエンディアンの相違が生じた場合には、CPUのエンディアンに一致する周辺機能ブロックを選択し、またはCPUのエンディアンに一致するように周辺機能ブロックを再設計することも行われていた。   Conventionally, when such an endian difference occurs, a peripheral function block that matches the endian of the CPU is selected or the peripheral function block is redesigned to match the endian of the CPU. .

本願発明者らは、このようなマイクロコンピュータの開発体制を鑑みたところ、特に特許文献2に記載されているようなエンディアンの変換ではCPUおよびマイクロコンピュータ全体としての処理性能を損じることに認識が至った。   In view of such a microcomputer development system, the inventors of the present application have recognized that the processing performance of the CPU and the microcomputer as a whole is impaired particularly by endian conversion as described in Patent Document 2. It was.

本願発明の一つの目的は、好適なエンディアン変換を行うマイクロコンピュータを提供することにある。   One object of the present invention is to provide a microcomputer that performs suitable endian conversion.

本発明の別の目的は、エンディアンの種類に依存せずに、CPUが共通のプログラム及び共通のベクタアドレスを使用出来るバイエンディアン方式のデータ処理装置を提供することにある。   Another object of the present invention is to provide a bi-endian data processing apparatus in which a CPU can use a common program and a common vector address without depending on the type of endian.

CPUが処理するデータは、リトルエンディアン又はビッグエンディアンのどちらか一方を選択可能にされる。CPUとメモリとの間でデータを転送する際、エンディアンがいずれである場合であっても、CPUのベクタアドレスのサイズにおいてのデータ転送の並びが一致するようにする。   Either little endian or big endian can be selected as data to be processed by the CPU. When data is transferred between the CPU and the memory, the data transfer sequences at the size of the vector address of the CPU are made to match regardless of the endian.

命令コードのエンディアンを固定することにより同一のプログラムを使用可能とすると共に、データのエンディアンは可変とされ、ベクタテーブルの各ベクタアドレスがNビットである場合に、NビットにアラインされたNビットサイズのデータをアクセスする際には、データのエンディアンがビッグエンディアン/リトルエンディアンのいずれの場合であってもエンディアンに依存することなく、同一アドレス/同一アライメントでアクセス可能になるよう制御される。一方、CPUがNビットと異なる単位のデータをメモリに対してアクセスを行う場合、CPU内のデータレジスタのバイト単位での各番地に格納されるデータの番地及びアライメントに適するように、メモリから取得したデータの番地及びアライメントを変更する機構を設ける。   By fixing the endian of the instruction code, the same program can be used, the endian of the data is variable, and each vector address of the vector table is N bits, and the N bit size aligned to N bits When the data is accessed, the data is controlled so that it can be accessed with the same address / alignment without depending on the endian regardless of whether the data is endian or big endian. On the other hand, when the CPU accesses data in a unit different from N bits, it is obtained from the memory so that it is suitable for the address and alignment of the data stored in each address in byte units of the data register in the CPU. A mechanism for changing the address and alignment of the data is provided.

ベクタサイズでのデータ転送において、データのエンディアンによらず同じデータ順序でデータ転送を可能としたことで、ベクタアドレスの共通化が可能となる。   In the data transfer at the vector size, the vector address can be shared by enabling the data transfer in the same data order regardless of the data endian.

命令のエンディアンを固定化したバイエンディアン方式を採用するデータ処理装置に於いて、プログラムを共通して使用することが出来ると共に、ベクタテーブルを共通化することが出来る。   In a data processing apparatus that employs a bi-endian system in which the endian of an instruction is fixed, a program can be used in common and a vector table can be used in common.

以下、この発明の様々な具体化を、添付図面を基に、その効果・利点と共に、詳述する。   Hereinafter, various embodiments of the present invention will be described in detail along with the effects and advantages thereof with reference to the accompanying drawings.

実施の形態1に係るマイクロコンピュータの一部分の構成を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration of a part of the microcomputer according to the first embodiment. メモリ領域に格納されているベクタテーブルの構成を模式的に示す図である。It is a figure which shows typically the structure of the vector table stored in the memory area. バイエンディアン方式に於いて、CPUがデータのリード動作又はライト動作を行う際の信号配線関係を模式的に示すブロック図である。FIG. 3 is a block diagram schematically showing signal wiring relationships when a CPU performs a data read operation or write operation in a bi-endian system. 32ビットデータアクセスの場合に於ける、CPU内のレジスタの各番地とメモリ内の格納領域の各番地との接続関係を模式的に示すブロック図である。FIG. 3 is a block diagram schematically showing a connection relationship between each address of a register in a CPU and each address of a storage area in a memory in the case of 32-bit data access. メモリ領域に格納されているデータを読み出してレジスタに格納する際のメモリ及びレジスタに於けるバイトオーダを示す図である。It is a figure which shows the byte order in a memory and a register at the time of reading the data stored in the memory area, and storing in a register. 実施の形態2に於けるCPUとCPU周辺I/O装置との間の接続構成を模式的に示すブロック図である。FIG. 10 is a block diagram schematically showing a connection configuration between a CPU and a CPU peripheral I / O device in the second embodiment. メモリの構成を模式的に示す図である。It is a figure which shows the structure of a memory typically. マイクロコンピュータの概略構成を示す図である。It is a figure which shows schematic structure of a microcomputer. CPUの概略構成を示す図である。It is a figure which shows schematic structure of CPU. CPUとメモリとの間の概略接続関係を示す図である。It is a figure which shows the general connection relationship between CPU and memory. CPUが割付けたメモリのアドレス空間を示す図である。It is a figure which shows the address space of the memory allocated by CPU. メモリとレジスタ間でのデータ転送時のアクセス関係を示す図である。It is a figure which shows the access relationship at the time of the data transfer between a memory and a register | resistor. アライナの一例を示す図である。It is a figure which shows an example of an aligner. 割込みベクタアドレス単位でのデータ転送時のアライナの接続状況の一例を示す図である。It is a figure which shows an example of the connection condition of the aligner at the time of the data transfer per interrupt vector address. エンディアンの異なる周辺機能ブロックを有するマイクロコンピュータの概略構成を示す図である。It is a figure which shows schematic structure of the microcomputer which has a peripheral function block from which an endian differs. アライナの一例を示す図である。It is a figure which shows an example of an aligner. マイクロコンピュータで実行するプログラムの開発ツールのフローを概略的に示す図である。It is a figure which shows roughly the flow of the development tool of the program run with a microcomputer. マイクロコンピュータの処理性能についての評価項目例を示す図である。It is a figure which shows the example of an evaluation item about the processing performance of a microcomputer. 命令のパイプライン処理の概略を示す図である。It is a figure which shows the outline of the pipeline process of an instruction. ハーバード・アーキテクチャでのバス構成の概略を示す図である。It is a figure which shows the outline of the bus structure in a Harvard architecture. ハーバード・アーキテクチャでのパイプライン処理の概略を示す図である。It is a figure which shows the outline of the pipeline process in a Harvard architecture. 積和演算器を用いた演算例を示す図である。It is a figure which shows the example of a calculation using a product-sum calculator. 浮動小数点演算器を用いた演算例を示す図である。It is a figure which shows the example of a calculation using a floating point arithmetic unit. 積和演算器と浮動小数点演算器とを用いた別の演算例を示す図である。It is a figure which shows another example of calculation using a sum-of-products calculator and a floating point calculator. プログラムに出現する命令の出現頻度を示す図である。It is a figure which shows the appearance frequency of the command which appears in a program. 出現頻度の高い命令のうち、命令サイズを小さくした命令の一例を示す図である。It is a figure which shows an example of the instruction | command which made instruction size small among the instructions with high appearance frequency. インデックス付レジスタ間接アドレッシングのアドレス演算を示す図である。It is a figure which shows the address calculation of the register indirect addressing with an index. ポストインクリメント/プリデクリメント機能付のレジスタ間接アドレッシングのアドレス演算を示す図である。It is a figure which shows the address calculation of the register indirect addressing with a post-increment / pre-decrement function. 3オペランド指定での演算を示す図である。It is a figure which shows the calculation by 3 operand specification. マイクロコンピュータでのレジスタ構成の一例を示す図である。It is a figure which shows an example of the register structure in a microcomputer. 割込み処理の高速化についての一例を示す図である。It is a figure which shows an example about speeding up of an interruption process. 高速割込み処理でのレジスタの使用例を示す図である。It is a figure which shows the usage example of a register | resistor in a high-speed interrupt process. 高速割込み処理による割込み処理実行開始までの時間を例示的に示す図である。It is a figure which shows the time until the interruption process execution start by a high-speed interruption process exemplarily. メモリプロテクションの機能の概略を示す図である。It is a figure which shows the outline of the function of a memory protection. エンディアン変換命令の一例を示す図である。It is a figure which shows an example of an endian conversion instruction | indication. クロックゲーティング設計の概略を示す図である。It is a figure which shows the outline of a clock gating design. クリティカルパスでのタイミングバイオレーション解決設計の概略を示す図である。It is a figure which shows the outline of the timing biolation solution design in a critical path. 電源ドメイン分割に関する概略を示す図である。It is a figure which shows the outline regarding power supply domain division | segmentation. マイクロコンピュータにFlashメモリを使用した場合の処理性能の概略を示す図である。It is a figure which shows the outline of the processing performance at the time of using Flash memory for a microcomputer.

(実施の形態1)
図1は、本実施の形態に係るマイクロコンピュータの一部分の構成を示すブロック図である。尚、図1に於いては、後述するアライナ11の記載を省略している。
(Embodiment 1)
FIG. 1 is a block diagram showing a configuration of a part of the microcomputer according to the present embodiment. In FIG. 1, the description of an aligner 11 to be described later is omitted.

図1に於いて、メモリ4は、リード/ライト可能な記憶媒体であり、例えばSRAMの様な揮発性メモリ又はフラッシュメモリ(EEPROMの一例)の様な不揮発性メモリから成り、CPU1と同一の半導体チップ上に搭載されている。或いは、メモリ4は、CPU1とは別個の半導体チップ上に搭載されていても良い。或いは、メモリ4は、その実用状態に於いて、例えばUSBメモリの様に、本マイクロコンピュータの外部に存在し、且つ、USB端子の様な接続端子を介して、後述する本マイクロコンピュータのシステムバスに電気的に接続されていても良い。   In FIG. 1, a memory 4 is a readable / writable storage medium, and is composed of, for example, a volatile memory such as SRAM or a nonvolatile memory such as a flash memory (an example of EEPROM), and is the same semiconductor as the CPU 1. It is mounted on the chip. Alternatively, the memory 4 may be mounted on a semiconductor chip separate from the CPU 1. Alternatively, the memory 4 is present outside the microcomputer in a practical state, such as a USB memory, and is connected to a system bus of the microcomputer, which will be described later, via a connection terminal such as a USB terminal. May be electrically connected.

メモリ4は、(1)命令コード(以下、単に「命令」と言う。)を格納する格納領域4R1と、(2)プログラムの命令実行時に利用されるデータを格納する格納領域4R2と、(3)それら以外のデータ等の信号を格納する格納領域4R3とを、有する。   The memory 4 includes (1) a storage area 4R1 for storing instruction codes (hereinafter simply referred to as “instructions”), (2) a storage area 4R2 for storing data used when executing instructions of the program, (3 ) A storage area 4R3 for storing signals such as other data.

本実施の形態では、その特徴点の一つとして、命令のエンディアンは、リトルエンディアン又はビッグエンディアンの一方にのみ常に固定されている。従って、CPU1が命令をフェッチするときのみ使用可能な命令バス5のエンディアンもまた、リトルエンディアン又はビッグエンディアンの一方にのみ常に固定されている。尚、本例では、命令のエンディアンは、リトルエンディアンに常に固定されているものとする。   In this embodiment, as one of the feature points, the endian of the instruction is always fixed only to one of little endian and big endian. Therefore, the endian of the instruction bus 5 that can be used only when the CPU 1 fetches an instruction is always fixed to only one of little endian and big endian. In this example, it is assumed that the endian of the instruction is always fixed to little endian.

これに対して、格納領域4R2に格納されている命令実行時に使用するデータのエンディアン、従って、CPU1がリード動作又はライト動作を実行する際に用いられるデータバス3のエンディアンは可変であり、リトルエンディアン又はビッグエンディアンの何れかに設定され得る。本実施の形態では、アドレスバス2、データバス3及び命令バス5の転送可能な信号のビット量は、何れも、32ビットである。従って、マルチバイトのバイナリ数値であるデータを転送するバイエンディアン方式に於いて、データバス3は、その各々が8ビット(1バイト)のデータを転送する4組の信号線より構成されている(後述する図3の信号線30〜33に相当。)。尚、アドレスバス2、データバス3、及び命令バス5は物理的に異なるバスとして構成されるだけでなく、物理的に1のバスとして構成され時間的に異なるバスとして機能する(所謂スプリットトランザクションバス等)ものであっても、当該バスとして機能している時間を示すものと理解されるべきである。   On the other hand, the endian of the data used when the instruction stored in the storage area 4R2 is executed, that is, the endian of the data bus 3 used when the CPU 1 executes the read operation or the write operation is variable. Alternatively, it can be set to either big endian. In the present embodiment, the bit amounts of signals that can be transferred through the address bus 2, the data bus 3, and the instruction bus 5 are all 32 bits. Therefore, in the bi-endian system for transferring data which is a multi-byte binary numerical value, the data bus 3 is composed of four sets of signal lines each transferring 8-bit (1 byte) data ( This corresponds to signal lines 30 to 33 in FIG. Note that the address bus 2, the data bus 3, and the instruction bus 5 are not only configured as physically different buses, but also physically configured as one bus and function as temporally different buses (a so-called split transaction bus). Etc.) should be understood as indicating the time during which the bus is functioning.

図2は、メモリ4の領域4R3に格納されているベクタテーブル6の構成を模式的に示す図である。ベクタテーブル6は、その各々がNビットのサイズを有する複数のベクタアドレス7がまとめて配置されている領域である。即ち、各ベクタアドレス7は、本マイクロコンピュータの起動時のリセット信号の入力、及び、例えばデバッグ処理のプログラムの実行の様な特定の共通に使用される割り込みプログラムの処理を要求する割り込み信号の入力(両者を「割り込み要因」と言う。)に応じて、各割り込み要因に応じて予め決められた、領域4R1内の該当割り込み処理プログラムの格納位置を与えるアドレスである。先ず、起動時に於いて、外部より、リセット信号が入力されると、Nビットのリセットベクタアドレス8がデータバス3を介して読み出されて、リセットベクタアドレス8は、CPU1へ出力される。又、CPUの動作時にCPU1に割り込み信号が入力されると、入力した割り込み信号に対応するベクタアドレス7がデータバス3を介して読み出されて、CPU1へ出力される。本実施の形態の一例では、リセットベクタアドレス8を含む各ベクタアドレス7のビット単位でのサイズNは、32に設定されている(N=32)。尚、このリセット時にCPU1より与えられるエンディアン信号のレベルにより、データバス3のエンディアンは切り替えられる。即ち、パワーオンリセット時に専用のモード端子の状態及び汎用I/Oポート(外部端子)と兼用のモード端子の状態をマイクロコンピュータに取り込んで、例えばレジスタにラッチし、データがリトルエンディアンかビッグエンディアンのいずれであるかをCPU1がベクタアドレスをアクセスする前に確定できるようにしている。   FIG. 2 is a diagram schematically showing the configuration of the vector table 6 stored in the area 4R3 of the memory 4. As shown in FIG. The vector table 6 is an area in which a plurality of vector addresses 7 each having a size of N bits are arranged together. That is, each vector address 7 is input with a reset signal when the microcomputer is started, and an interrupt signal for requesting processing of a specific commonly used interrupt program such as execution of a debug processing program. (Both are referred to as “interrupt factors”). The address gives the storage location of the corresponding interrupt processing program in the area 4R1, which is predetermined according to each interrupt factor. First, when a reset signal is input from the outside at the time of activation, an N-bit reset vector address 8 is read through the data bus 3 and the reset vector address 8 is output to the CPU 1. When an interrupt signal is input to the CPU 1 during the operation of the CPU, the vector address 7 corresponding to the input interrupt signal is read through the data bus 3 and output to the CPU 1. In the example of the present embodiment, the size N of each vector address 7 including the reset vector address 8 in a bit unit is set to 32 (N = 32). The endian of the data bus 3 is switched according to the level of the endian signal given from the CPU 1 at the time of reset. In other words, the state of the dedicated mode terminal and the state of the mode terminal that is also used as a general-purpose I / O port (external terminal) are taken into the microcomputer at the time of power-on reset, and latched in a register, for example, and the data is little endian or big endian. The CPU 1 can determine which is before the vector address is accessed.

ここで、ベクタテーブル6は、命令及びデータを格納するメモリ(第1メモリ)4とは別個のリード/ライト可能なROM(第2メモリ)の記憶領域内に格納されていても良い。本実施の形態の一例では、メモリ4の記憶領域の内で命令及びデータを格納する領域4R1,4R2が「第1メモリ」に該当しており、ベクタテーブル6を格納する領域4R3が「第2メモリ」に該当しているとも、定義し得る。   Here, the vector table 6 may be stored in a storage area of a ROM (second memory) that can be read / written separately from the memory (first memory) 4 for storing instructions and data. In an example of the present embodiment, the areas 4R1 and 4R2 for storing instructions and data in the storage area of the memory 4 correspond to the “first memory”, and the area 4R3 for storing the vector table 6 is the “second memory”. It can also be defined as “memory”.

尚、図1に記載のメモリ4をRAM(第1メモリ)で構成するときには、RAM4とは別個に、本マイクロコンピュータ内の半導体チップ上に搭載された第2メモリとして、又は、外部の第2メモリ(USBメモリ等)として、ベクタテーブル6を格納するリード/ライト可能なROMを設けることとなる。   When the memory 4 shown in FIG. 1 is composed of a RAM (first memory), the RAM 4 is provided separately from the RAM 4 as a second memory mounted on a semiconductor chip in the microcomputer, or an external second memory. As a memory (USB memory or the like), a readable / writable ROM for storing the vector table 6 is provided.

図7は、メモリの概略構成を示す図である。複数のメモリセルがアレイ状に配置され、夫々のメモリセルが対応するワード線とビット線とに接続される。一般的にメモリはCPU等から供給されるアクセスアドレスに基づき、Xデコーダが所定のワード線を活性化し、当該ワード線に接続されるメモリセルに格納されるデータをYデコーダがビット線を介して読み出す。例えばアクセスアドレスとしてアドレス0を供給された場合は第0ワード線が活性化されるメモリであれば、第0ワード線の第0ビット線からアクセスすべきバイト数のデータがCPUに供給される。即ち、アクセスアドレスとしてXが供給された場合、第Yワード線(Y=X'/l,X'はX×8であるXのビット表現,lはワード線当りのメモリセル数)が活性化され、第Zビット線(Z=X' mod l,modは剰余演算)からデータが読み出される。   FIG. 7 is a diagram showing a schematic configuration of the memory. A plurality of memory cells are arranged in an array, and each memory cell is connected to a corresponding word line and bit line. In general, a memory activates a predetermined word line based on an access address supplied from a CPU or the like, and a Y decoder sends data stored in a memory cell connected to the word line via a bit line. read out. For example, when address 0 is supplied as an access address, if the memory is one in which the 0th word line is activated, data of the number of bytes to be accessed is supplied to the CPU from the 0th bit line of the 0th word line. That is, when X is supplied as the access address, the Yth word line (Y = X ′ / l, X ′ is X × 8 bit representation, l is the number of memory cells per word line) is activated. Then, data is read from the Zth bit line (Z = X ′ mod 1, mod is a remainder operation).

図3は、バイエンディアン方式に於いて、CPU1がデータのリード動作又はライト動作を行う際の信号配線関係を模式的に示すブロック図である。CPU1内に配置されているレジスタ(データレジスタであり、主として汎用レジスタが用いられる。)9は、バイト単位で、4個の番地0,1,2,3で与えられる記憶領域90,91,92,93を有している。他方、メモリ4の記憶領域4R2のメモリセルアレイは、バイト単位で、それぞれ番地0,1,2,3で与えられる4個の記憶領域10A,10B,10C,10Dを一組とする格納領域10が行方向及び列方向にアライメントされて成る。又、アライナ11は、CPU1より出力される制御信号CNT1に応じて、そのオン/オフ動作を切り替えられる各スイッチより成るスイッチ群(図示せず。)より構成されている。そして、アライナ11は、格納領域10の各番地10A〜10Dに、対応するビット線を通じて接続された各信号線(データバス3の各ライン)30〜33と、レジスタ9の各番地90〜93に接続された信号線とを、データないしはデータバス3のエンディアンの種類に対応して連結させる機能を呈する。図4は、32ビットデータアクセスの場合に於ける、CPU1内のレジスタの各番地とメモリ内の格納領域の各番地との接続関係を模式的に示すブロック図である。レジスタ9の0番地90側をLSB、3番地93側をMSBとし、メモリ4の0番地10A側をLSB、3番地10D側をMSBとすると、アライナ11はデータがリトルエンディアンである場合の接続関係を示している。   FIG. 3 is a block diagram schematically showing a signal wiring relationship when the CPU 1 performs a data read operation or write operation in the bi-endian system. A register (data register, mainly a general-purpose register) 9 arranged in the CPU 1 is a storage area 90, 91, 92 given by four addresses 0, 1, 2, 3 in byte units. , 93. On the other hand, the memory cell array of the storage area 4R2 of the memory 4 has a storage area 10 that is a set of four storage areas 10A, 10B, 10C, and 10D given by addresses 0, 1, 2, and 3, respectively. Aligned in the row and column directions. The aligner 11 is composed of a switch group (not shown) including switches that can be switched on / off in accordance with a control signal CNT1 output from the CPU 1. The aligner 11 is connected to each address 10A to 10D in the storage area 10 to each signal line (each line of the data bus 3) 30 to 33 connected through the corresponding bit line and to each address 90 to 93 of the register 9. A function of connecting the connected signal lines in accordance with the data or the endian type of the data bus 3 is exhibited. FIG. 4 is a block diagram schematically showing a connection relation between each address of the register in the CPU 1 and each address of the storage area in the memory in the case of 32-bit data access. If the 0 address 90 side of the register 9 is LSB, the 3 address 93 side is MSB, the 0 address 10A side of the memory 4 is LSB, and the 3 address 10D side is MSB, the aligner 11 is connected when the data is little endian. Is shown.

ここで、CPU1は、32ビットのデータをメモリ4の格納領域10(アクセスアドレスX)に記憶する場合には、予め、次の通りに32ビットデータが各番地10A〜10Dに記憶される様に、メモリ4の領域4R2のアドレスを規定している。即ち、図5に示す様に、(1)データがリトルエンディアンで記憶されるときには、レジスタに格納されているデータのLSB側を+0のバイトオーダとし、MSB側を+3のバイトオーダとするようにデータのバイトオーダを決定する。またメモリの格納先アドレスにおいて同様に+0〜+3のバイトオーダを決定し、レジスタに格納されているデータのバイトオーダとメモリの格納先アドレスに対して決定したバイトオーダとが一致するようにデータを格納する。他方、(2)データがビッグエンディアンで記憶されるときには、レジスタに格納されているデータのMSB側を+0のバイトオーダとし、LSB側を+3のバイトオーダとするようにデータのバイトオーダを決定し、メモリの格納先アドレスにおいてもバイトオーダを決定して、データをメモリに格納する。メモリの格納先アドレスに対して決定した+0〜+3の夫々のバイトオーダが各番地10A〜10Dに対応する。   Here, when the CPU 1 stores 32-bit data in the storage area 10 (access address X) of the memory 4, the 32-bit data is stored in advance in the respective addresses 10 </ b> A to 10 </ b> D as follows. The address of the area 4R2 of the memory 4 is defined. That is, as shown in FIG. 5, (1) when data is stored in little endian, the LSB side of the data stored in the register is set to +0 byte order, and the MSB side is set to +3 byte order. Determine the byte order of the data. Similarly, the byte order of +0 to +3 is determined at the memory storage destination address so that the byte order of the data stored in the register matches the byte order determined for the memory storage address. Store the data. On the other hand, (2) when the data is stored in big endian, the byte order of the data is set so that the MSB side of the data stored in the register is +0 byte order and the LSB side is +3 byte order. The byte order is also determined at the storage destination address of the memory, and the data is stored in the memory. Each byte order of +0 to +3 determined with respect to the storage destination address of the memory corresponds to each address 10A to 10D.

今、起動時に於いて外部よりリセット信号が入力されて、CPU1が、オペランドアクセスすることによって、図2に示す32ビットのリセットベクタアドレス8を取得したものとする。この32ビットのリセットベクタアドレス8は、メモリ4の領域4R1に格納された命令のアドレスを与える。又、割り込み信号がCPU1に入力されたときも、CPU1は、自動的にオペランドアクセスして、32ビットのベクタアドレス7を取得する。その上で、CPU1は、リセットベクタアドレス8又は割り込み要因に応じたベクタアドレス7に基づいて、命令のフェッチ動作を行い、フェッチした命令をデコードした上で、命令の実行へと、その動作を移す。その際、リセットベクタアドレス8及びベクタアドレス7と同じデータサイズの32ビットデータをメモリから取得する場合と、ベクタアドレスとは異なるデータサイズの16ビットデータをメモリから取得する場合とを、以下に記載する。   Assume that a reset signal is input from the outside at the time of startup, and the CPU 1 acquires the 32-bit reset vector address 8 shown in FIG. 2 by performing operand access. The 32-bit reset vector address 8 gives the address of the instruction stored in the area 4R1 of the memory 4. When an interrupt signal is input to the CPU 1, the CPU 1 automatically performs operand access and obtains a 32-bit vector address 7. Then, the CPU 1 performs an instruction fetch operation based on the reset vector address 8 or the vector address 7 corresponding to the interrupt factor, decodes the fetched instruction, and moves the operation to the instruction execution. . In this case, the case where 32-bit data having the same data size as the reset vector address 8 and the vector address 7 is acquired from the memory and the case where 16-bit data having a data size different from the vector address are acquired from the memory are described below. To do.

図5は、データの転送に際して、どのようにデータアライメントの変更が行われるかを示す。アドレス0の矢印が示す箇所をメモリの4バイト境界(第32nビット線)に対応させ、32ビット分(第32(n+1)−1ビット線まで)のメモリセルに32ビットのデータは格納される。係るデータの格納状態に対して、アライナは当該データのエンディアンに応じてバイトオーダを割付け、レジスタに転送をする。夫々のエンディアンにおいてメモリに格納されているバイトオーダとレジスタに格納する際のバイトオーダとを一致させるように格納することから、4バイト転送時にはエンディアンに関わらずレジスタに格納されたデータ順序は一致する。   FIG. 5 shows how data alignment is changed during data transfer. The location indicated by the arrow at address 0 corresponds to the 4-byte boundary (the 32nth bit line) of the memory, and 32-bit data is stored in the memory cells for 32 bits (up to the 32nd (n + 1) -1 bit line). . For the data storage state, the aligner assigns a byte order according to the endian of the data and transfers it to the register. Since the byte order stored in the memory in each endian is stored so that the byte order stored in the register matches, the data order stored in the register matches regardless of the endian when transferring 4 bytes. .

又、16ビットデータ転送を行う場合においては、データアライメントの変更は次のようになる。メモリの4バイト境界から32ビット分のデータに対してアライナが当該データのエンディアンに応じてバイトオーダを割付ける。夫々のエンディアンの+0/+1のバイトオーダに当たるデータをレジスタのLSBから順に格納する。図に示すように、リトルエンディアンではアライナが割付けたバイトオーダの+0がレジスタのLSBに当たることから、メモリに格納されている2バイトのデータとレジスタに格納される2バイトのデータとが一致する。一方でビッグエンディアンではアライナが割付けたバイトオーダの+0はレジスタのMSBに当たることから、4バイト転送時にはレジスタのMSB側に格納される2バイトのデータがレジスタのLSB側に格納される。なお、レジスタのMSB側2バイトに格納される”**”は、'0'又は'1'若しくはデータの符号ビットが拡張して格納されることを示す。   In the case of performing 16-bit data transfer, the data alignment is changed as follows. The aligner assigns a byte order to 32-bit data from the 4-byte boundary of the memory according to the endian of the data. Data corresponding to the + 0 / + 1 byte order of each endian is stored in order from the LSB of the register. As shown in the figure, in little endian, the byte order +0 assigned by the aligner corresponds to the LSB of the register, so the 2-byte data stored in the memory matches the 2-byte data stored in the register. . On the other hand, in the big endian, +0 of the byte order assigned by the aligner corresponds to the MSB of the register. Therefore, at the time of 4-byte transfer, 2-byte data stored in the MSB side of the register is stored in the LSB side of the register. Note that “**” stored in the MSB side 2 bytes of the register indicates that “0” or “1” or the sign bit of the data is expanded and stored.

以上の記述は、CPU1が8ビットデータアクセスする場合に於いても、妥当する。   The above description is valid even when the CPU 1 accesses 8-bit data.

尚、上記の一例の動作記載に於いては、データのリード動作が中心に記載されているが、既述した本実施の形態の特徴点をデータのライト動作に於いても、レジスタに格納されているデータのバイトオーダとメモリに格納する際にアライナが割付けるバイトオーダとを同様に対応させることで適用可能である。   In the operation description of the above example, the data read operation is mainly described. However, the feature points of the present embodiment described above are stored in the register even in the data write operation. It is possible to apply the same correspondence between the byte order of the stored data and the byte order assigned by the aligner when stored in the memory.

以上の通り、データ処理装置の構成として本実施の形態の構成を採用する場合には、ベクタアドレス及びベクタアドレスと同じサイズのデータの転送においては、データのエンディアンの種類に依存すること無く、同一のアドレス及び同一のデータアライメントに於いてデータをメモリに対してリード/ライトすることが出来、その際に共通のプログラムを実行することが出来ると共に、ベクタテーブルを共通化することが可能となる。   As described above, when the configuration of the present embodiment is adopted as the configuration of the data processing device, the transfer of data having the same size as the vector address and the vector address is the same regardless of the type of data endian. Data can be read / written to / from the memory at the same address and the same data alignment, and a common program can be executed at that time, and the vector table can be shared.

(実施の形態2)
本実施の形態の特徴点は、実施の形態1に係るバイエンディアン方式のマイクロコンピュータに於いて、CPU周辺の各I/O装置とCPU間のデータバスを、リトルエンディアン専用のデータバスとビッグエンディアン専用のデータバスとに分離した点にある。
(Embodiment 2)
The feature of the present embodiment is that in the bi-endian microcomputer according to the first embodiment, the data bus between each I / O device around the CPU and the CPU is changed to a data bus dedicated to little endian and big endian. It is in a point separated from a dedicated data bus.

図6は、本実施の形態の特徴点を模式的に示すブロック図である。図6に示す様に、CPU1と、CPU1の周辺I/O装置との間のデータの転送を行うデータバスは、ビッグエンディアン専用のデータバス14と、リトルエンディアン専用のデータバス17とが設けられている。そして、各ビッグエンディアン専用の周辺I/O装置15,16は、個々の信号線を介して、ビッグエンディアン用データバス14に接続されており、他方で、各リトルエンディアン専用の周辺I/O装置18,19は、個々の信号線を介して、リトルエンディアン用データバス17に接続されている。各周辺I/O装置としては、例えば、割り込み制御回路(INTC)又はダイレクトメモリアクセスコントローラ(DMAC)又はシリアルコミュニケーションインターフェース(SCI)等がある。   FIG. 6 is a block diagram schematically showing feature points of the present embodiment. As shown in FIG. 6, a data bus for transferring data between the CPU 1 and peripheral I / O devices of the CPU 1 is provided with a data bus 14 dedicated to big endian and a data bus 17 dedicated to little endian. ing. The peripheral I / O devices 15 and 16 dedicated to each big endian are connected to the big endian data bus 14 via individual signal lines. On the other hand, the peripheral I / O devices dedicated to each little endian are used. Reference numerals 18 and 19 are connected to the little endian data bus 17 via individual signal lines. Examples of each peripheral I / O device include an interrupt control circuit (INTC), a direct memory access controller (DMAC), and a serial communication interface (SCI).

CPU1は、CPU1と、CPU1の周辺I/O装置15〜19との間で転送し合うデータを、I/Oレジスタ12に格納している。このI/Oレジスタ12に格納されているデータのエンディアンは、リトルエンディアン及びビッグエンディアンの何れか一方である。アライナ13は、CPU1が出力する制御信号CNT2による制御の下で、I/Oレジスタ12に格納されているデータのエンディアンの種類に応じて、I/Oレジスタ12内の当該データのバイトオーダを、ビッグエンディアン用データバス14及びリトルエンディアン用データバス17の内の該当するデータバスに割付けられるバイトオーダに一致させるように接続する。周辺I/O装置内のレジスタ及びメモリ等がどのアドレス範囲にあるかによって、リトルエンディアンかビックエンディアンであるかが分る様にされている。即ち、CPU1がアクセスするアドレスをデコードすることによって、制御信号CNT2の状態が決定される様にしている。   The CPU 1 stores data transferred between the CPU 1 and the peripheral I / O devices 15 to 19 of the CPU 1 in the I / O register 12. The endian of the data stored in the I / O register 12 is one of little endian and big endian. Under the control of the control signal CNT2 output from the CPU 1, the aligner 13 determines the byte order of the data in the I / O register 12 according to the type of endian of the data stored in the I / O register 12. The connection is made to match the byte order assigned to the corresponding data bus among the big endian data bus 14 and the little endian data bus 17. Depending on which address range the registers, memories, etc. in the peripheral I / O device are in, little endian or big endian is known. That is, the state of the control signal CNT2 is determined by decoding the address accessed by the CPU1.

以上の構成を採用するときには、周辺I/O装置とCPUとの間で転送されるデータのエンディアンが固定化され、周辺I/O装置へのアクセス処理に於いては、エンディアンの種類如何に拘らず、共通のプログラムを使用することが可能となる。即ち、アライナ13によってデータのバイトオーダが夫々の周辺I/O装置にとって適合するようにされることから、ビッグエンディアン用周辺I/O装置とリトルエンディアン用周辺I/O装置との両方を用いてデータの処理を行う場合であっても、CPUが実行するプログラムにおいてデータのエンディアン変換を行う等の周辺I/O装置のデータのエンディアンを考慮した処理が不要とできる。更には、1の半導体基板上に複数のデータ処理モジュール(所謂機能IPと呼ばれ、図6の周辺I/O装置に相当)を有するデータ処理装置において、データ処理モジュール自体のデータのエンディアンに応じてバスを分離しアライナを介してCPUと接続されるように構成することにより、データ処理装置の構成においてデータのエンディアンが一致するようにデータ処理モジュールを選択し若しくはデータ処理装置のCPUが実行するプログラムでデータ処理モジュールごとにデータのエンディアンを変換する等の、データ処理装置を構成する際のハードウェア/ソフトウェアに対する負担を軽減することが可能となる。   When the above configuration is adopted, the endian of the data transferred between the peripheral I / O device and the CPU is fixed, and the access processing to the peripheral I / O device depends on the type of endian. Therefore, a common program can be used. That is, since the aligner 13 adjusts the byte order of data to each peripheral I / O device, both the big endian peripheral I / O device and the little endian peripheral I / O device are used. Even when data processing is performed, it is possible to eliminate the processing that considers the endian of the data of the peripheral I / O device such as performing endian conversion of the data in the program executed by the CPU. Further, in a data processing apparatus having a plurality of data processing modules (so-called function IP, which corresponds to the peripheral I / O device in FIG. 6) on one semiconductor substrate, it corresponds to the data endian of the data processing module itself. By separating the bus and connecting to the CPU via the aligner, the data processing module is selected or executed by the CPU of the data processing device so that the data endian matches in the configuration of the data processing device. It is possible to reduce the burden on the hardware / software when configuring the data processing apparatus, such as converting the endian of the data for each data processing module by the program.

(実施の形態3)
図8は、マイクロコンピュータMCUの一例の概略を示すブロック図である。
(Embodiment 3)
FIG. 8 is a block diagram showing an outline of an example of the microcomputer MCU.

中央処理装置(以下、CPUという。)1は不揮発性メモリROMや揮発性メモリRAM等に格納されている命令をフェッチし実行することで、マイクロコンピュータMCU全体としての処理制御を行う。ダイレクトメモリアクセスコントローラDMACは外部メモリEMEM等とメモリ4(不揮発性メモリROMや揮発性メモリRAM等から構成される。)間、又はメモリ4と周辺回路群(IP1,IP2)との間のデータ転送制御を行う。バスコントローラBSCはCPU1その他の機能ブロックがバスを介してデータ転送等を行う際に、バス権の付与等の制御を行う。割込みコントローラINTCはマイクロコンピュータMCU内部又は外部で発生する割込みを受付け、CPU1に通知等の制御を行う。周辺回路群(IP1,IP2)は、マイクロコンピュータMCUの外部に接続される別の半導体集積回路装置との通信を行う通信IF(InterFace)系(シリアルIO(Input/Output)、パラレルIO等)、専用データ処理系(画像処理ブロック、暗号処理ブロック等)などである。外部バスインタフェースBIFはマイクロコンピュータMCUの外部に接続されるバスを介して外部メモリEMEM等に接続される。   A central processing unit (hereinafter referred to as a CPU) 1 performs processing control for the entire microcomputer MCU by fetching and executing instructions stored in a nonvolatile memory ROM, a volatile memory RAM, or the like. The direct memory access controller DMAC transfers data between the external memory EMEM and the memory 4 (consisting of a nonvolatile memory ROM, a volatile memory RAM, etc.) or between the memory 4 and the peripheral circuit group (IP1, IP2). Take control. The bus controller BSC performs control such as granting a bus right when the CPU 1 and other functional blocks perform data transfer via the bus. The interrupt controller INTC accepts an interrupt generated inside or outside the microcomputer MCU and performs control such as notification to the CPU 1. The peripheral circuit group (IP1, IP2) is a communication IF (InterFace) system (serial IO (Input / Output), parallel IO, etc.) that communicates with another semiconductor integrated circuit device connected to the outside of the microcomputer MCU, Dedicated data processing system (image processing block, encryption processing block, etc.). The external bus interface BIF is connected to an external memory EMEM and the like via a bus connected to the outside of the microcomputer MCU.

図9はCPU1内の概略を示すブロック図、図10はCPU1のメモリアクセス関係を示す図、図11はCPU1で割付けたメモリ4のアドレス空間を示す図である。図11において、アドレスの右側の「H」は、16進法でアドレスが表記されていることを示している。なお、図11では、各領域の先頭アドレスのみのアドレスが表記されている。   FIG. 9 is a block diagram showing an outline in the CPU 1, FIG. 10 is a diagram showing a memory access relationship of the CPU 1, and FIG. 11 is a diagram showing an address space of the memory 4 allocated by the CPU 1. In FIG. 11, “H” on the right side of the address indicates that the address is expressed in hexadecimal. In FIG. 11, only the address of the head address of each area is shown.

図8のCPU1が他の機能ブロックと接続されるバスは、図10に示す32ビット長のアドレスバス2、32ビット長のデータバス3、32ビット長の命令バス5から構成される。他のバス構成としては、アドレスとデータ及び命令とが、バス信号線上で、時分割で情報のやり取りを行うスプリットトランザクションバスの構成であっても良い。また、データと命令とが並列にアクセスされない様なアーキテクチャの場合には、データバス3及び命令バス5は、分離されたものではなく、同一のバスで構成されたものであってもよい。さらに、データバス3及び命令バス5は64ビット長であってもよい。   A bus to which the CPU 1 in FIG. 8 is connected to other functional blocks is composed of a 32-bit address bus 2, a 32-bit data bus 3, and a 32-bit instruction bus 5 shown in FIG. Another bus configuration may be a split transaction bus configuration in which addresses, data, and instructions are exchanged on a bus signal line in a time-sharing manner. In the case of an architecture in which data and an instruction are not accessed in parallel, the data bus 3 and the instruction bus 5 are not separated but may be configured by the same bus. Further, the data bus 3 and the instruction bus 5 may be 64 bits long.

CPU1が命令フェッチを行う場合、32ビット長のプログラムカウンタPCに格納されているフェッチすべき命令のアドレスをアドレスバス2に出力し、アドレスバス2を介して当該アドレスを受信したメモリ4が当該アドレスに対応するバイナリ情報を命令バス5に対して出力する。CPU1は命令バス5から受信したバイナリ情報を実行すべき命令として命令レジスタIRに格納し、命令デコーダiDECで命令をデコードし、デコードした結果に応じた制御信号が算術論理ユニットALU、乗算器MLT、除算器DIV、シフト演算器SHFT、浮動小数点演算器等の演算器に出力され、演算器でレジスタ群REG(汎用レジスタや専用レジスタ)やメモリ4等に格納されているデータに対して該当する演算を実行する。   When the CPU 1 performs instruction fetch, the address of the instruction to be fetched stored in the 32-bit program counter PC is output to the address bus 2, and the memory 4 that has received the address via the address bus 2 receives the address. Binary information corresponding to is output to the instruction bus 5. The CPU 1 stores the binary information received from the instruction bus 5 in the instruction register IR as an instruction to be executed, decodes the instruction by the instruction decoder iDEC, and a control signal corresponding to the decoded result is an arithmetic logic unit ALU, a multiplier MLT, Calculations that are output to arithmetic units such as a divider DIV, shift arithmetic unit SHFT, and floating-point arithmetic unit, and that correspond to the data stored in the register group REG (general-purpose registers and dedicated registers), the memory 4, etc. Execute.

また、CPU1が割込みコントローラINTCから割込み通知を受信した場合、CPU1は受信した割込み通知に対応する割込み処理を行うために、メモリ4の割込みベクタテーブル領域(図11のアドレスFFFFFD00H〜FFFFFDFFH)のアドレスのうち受信した割込み通知に対応するアドレスをアドレスバス2に出力し、メモリ4が当該アドレスに対応するバイナリ情報をデータバス3に対して出力する。CPU1はデータバス3から受信したバイナリ情報を割込み処理ルーチンの格納されているアドレス(ベクタアドレスという。)としてプログラムカウンタPCに設定し、割込み処理ルーチンの命令を実行するために分岐を行う。ここで、ベクタアドレスは32ビット(4バイト)長である。なお、割り込みコントローラINTCからの割込み通知以外による例外処理(例えば、特権命令例外処理、未定義命令例外処理など)のためのベクタアドレスも割込みベクタテーブル領域に格納されているものとする。   When the CPU 1 receives an interrupt notification from the interrupt controller INTC, the CPU 1 performs the interrupt processing corresponding to the received interrupt notification, in order to perform the interrupt processing corresponding to the received interrupt notification. Among them, an address corresponding to the received interrupt notification is output to the address bus 2, and the memory 4 outputs binary information corresponding to the address to the data bus 3. The CPU 1 sets the binary information received from the data bus 3 in the program counter PC as an address (referred to as a vector address) where the interrupt processing routine is stored, and branches to execute the instruction of the interrupt processing routine. Here, the vector address is 32 bits (4 bytes) long. It is assumed that a vector address for exception processing other than the interrupt notification from the interrupt controller INTC (for example, privileged instruction exception processing, undefined instruction exception processing, etc.) is also stored in the interrupt vector table area.

なお、リセットベクタ領域(図11のアドレスFFFFFE00H)は、マイクロコンピュータMCUが電源投入されまたは外部からリセット信号を入力された場合に、リセット期間終了直後に実行すべきプログラムを格納したアドレス(例えば、ブート命令領域の先頭アドレス0000H)を格納した領域である。割込み処理とリセット処理とは起因が割込みであるかリセットであるかの相違はあるものの、分岐するアドレスの取得においては大凡同じである。   Note that the reset vector area (address FFFFFE00H in FIG. 11) is an address (for example, boot) that stores a program to be executed immediately after the reset period ends when the microcomputer MCU is turned on or a reset signal is input from the outside. This is an area in which the head address (0000H) of the instruction area is stored. Although there is a difference between the interrupt process and the reset process whether the cause is an interrupt or a reset, they are almost the same in acquiring a branching address.

ブート命令領域、第1プログラム領域、第2プログラム領域及び割込み処理ルーチン領域等のプログラム領域に格納される命令のエンディアンは、リトルエンディアン又はビッグエンディアンのいずれかに固定されている。また、リセットベクタ領域及び割込みベクタテーブル等のベクタ領域のデータのエンディアンも、リトルエンディアン又はビッグエンディアンのいずれかに固定されている。これらのエンディアンの固定は、マイクロコンピュータの製造時に固定してもよく、遅くともパワーオンリセット後ベクタ領域をアクセスする前までに固定されていればよい。後者の場合は、パワーオンリセット時に専用のモード端子や汎用I/Oポート(外部端子)と兼用のモード端子の状態をマイクロコンピュータに取り込んで、例えばレジスタにラッチし、データがリトルエンディアンかビッグエンディアンのいずれであるかをCPU1がベクタアドレスをアクセスする前に確定できるようにすればよい。   The endian of the instruction stored in the program area such as the boot instruction area, the first program area, the second program area, and the interrupt processing routine area is fixed to either little endian or big endian. Further, the endian of the data in the vector areas such as the reset vector area and the interrupt vector table is fixed to either little endian or big endian. These endians may be fixed at the time of manufacture of the microcomputer, and may be fixed at the latest before the vector area is accessed after the power-on reset. In the latter case, the state of the dedicated mode terminal and the mode terminal that is also used as a general-purpose I / O port (external terminal) is taken into the microcomputer at power-on reset, and latched in a register, for example, and the data is little endian or big endian It is only necessary that the CPU 1 can determine before the vector address is accessed.

第1プログラムは、メモリ4のアドレス1000H〜1FFFHの範囲の領域に格納されている。第2プログラムは、メモリ4のアドレス3000H〜3FFFHの範囲の領域に格納されている。第1プログラムと第2プログラムとは、夫々、第1データ領域(アドレス2000H〜2FFFH)及び第2データ領域(アドレス4000H〜4FFFH)とを有している。第1プログラムは第1データ領域のデータのエンディアンをリトルエンディアンとしてデータ処理をし、第2プログラムは第2データ領域のデータのエンディアンをビッグエンディアンとしてデータ処理をする。例えば第1プログラムがリトルエンディアンでデータ処理をする周辺回路が生成したデータを処理するプログラムで、第2プログラムがビッグエンディアンでデータ処理をする周辺回路が生成したデータを処理するプログラムである場合などが該当する。   The first program is stored in an area in the range of addresses 1000H to 1FFFH in the memory 4. The second program is stored in an area in the range of addresses 3000H to 3FFFH in the memory 4. The first program and the second program each have a first data area (addresses 2000H to 2FFFH) and a second data area (addresses 4000H to 4FFFH). The first program performs data processing with the endian of the data in the first data area as little endian, and the second program performs data processing with the endian of the data in the second data area as big endian. For example, the first program is a program that processes data generated by a peripheral circuit that processes data in little endian, and the second program is a program that processes data generated by a peripheral circuit that processes data in big endian. Applicable.

CPU1のアドレス空間のアドレス範囲によって、予めリトルエンディアン又はビッグエンディアンのどちらのデータを処理するかが決まっている。なお、アドレス範囲によって、リトルエンディアン又はビッグエンディアンのどちらのデータを処理するかをCPUによってレジスタに設定できるようにしてもよい。また、リセット解除後、内蔵の不揮発性メモリに予め格納されたデータが自動的にレジスタに転送されることによってリトルエンディアン又はビッグエンディアンのどちらのデータを処理するかを設定できるようにしてもよい。   Whether little-endian or big-endian data is processed is determined in advance depending on the address range of the CPU 1 address space. Depending on the address range, the little endian or big endian data may be processed by the CPU. In addition, after the reset is released, data stored in advance in the built-in nonvolatile memory may be automatically transferred to a register so that it can be set whether little endian data or big endian data is processed.

CPU1が第1プログラムを実行している間に割込みコントローラINTCからの割込み通知が発生した場合、割込みベクタテーブル領域(アドレスFFFFFD00H〜FFFFFDFFH)へのアクセスは、予め固定されたエンディアンでアクセスを行う。   When an interrupt notification is generated from the interrupt controller INTC while the CPU 1 is executing the first program, the interrupt vector table area (addresses FFFFFD00H to FFFFFFFFH) is accessed in a fixed endian.

一方で、CPU1が第2プログラムを実行している間に割込み通知が発生した場合は、割込みベクタテーブル領域へのアクセスは、予め固定されたエンディアンでアクセスを行う。   On the other hand, when an interrupt notification is generated while the CPU 1 is executing the second program, the interrupt vector table area is accessed in a fixed endian.

図12はメモリ4とCPU1のレジスタ9間でデータを転送する際のアクセス関係示す図であり、図13はアライナ11の一例を示す図である。   FIG. 12 is a diagram showing an access relationship when data is transferred between the memory 4 and the register 9 of the CPU 1. FIG. 13 is a diagram showing an example of the aligner 11.

メモリ4からレジスタ9(レジスタ群REGのうちの一つのレジスタ)へデータ転送をする場合において、転送すべきデータがメモリ4の10A乃至10Dに示す領域に格納されている場合、相対的なアドレス変位0番地のデータ(10A)はデータバス3のうちの付番30で示す8bitの部分バスに出力される。以下同様にアドレス変位1番地〜3番地のデータ(10B〜10D)は付番31,32,33で示す8bitの部分バスに出力される。付番30〜33で示す夫々の部分バスに出力されたデータは、レジスタの相対的なアドレス変位0番地〜3番地のどの8bitの部分領域に格納されるかが、制御信号CNT1の状態に応じてアライナ11により決定される。制御信号CNT1は、リトルエンディアン又はビッグエンディアン、メモリ4へのアクセスサイズ、アクセスバイトアドレス等の情報によって、生成される信号である。   When data is transferred from the memory 4 to the register 9 (one register in the register group REG), if the data to be transferred is stored in the areas 10A to 10D of the memory 4, the relative address displacement The data at address 0 (10A) is output to the 8-bit partial bus indicated by number 30 in the data bus 3. Similarly, the data (10B to 10D) at the address displacements 1 to 3 are output to the 8-bit partial bus indicated by the numbers 31, 32 and 33. Depending on the state of the control signal CNT1, whether the data output to the respective partial buses indicated by the numbered numbers 30 to 33 is stored in the 8-bit partial area of the relative address displacements 0 to 3 of the register Is determined by the aligner 11. The control signal CNT1 is a signal generated by information such as little endian or big endian, an access size to the memory 4, and an access byte address.

最初に、メモリ4からレジスタへのデータ転送をリセットベクタアドレスや割込みベクタアドレス等のベクタアドレス(以下、割込みベクタアドレスという。)のサイズである4バイトでアクセスをする場合について説明をする。この場合、アライナ11は図14に示すような接続状態となるように設定される。図14は、4バイトでのアクセスの場合に於ける、CPU内のレジスタの各番地とメモリ4内の格納領域の各番地との接続関係を模式的に示すブロック図である。レジスタ9の0番地90側をLSB、3番地93側をMSBとし、メモリ4の0番地10A側をLSB、3番地10D側をMSBとすると、アライナ11はメモリ4内のデータとCPU1内のデータとのエンディアンが同一である場合の接続関係を示している。すなわち、CPU1内のデータのエンディアンがリトルエンディアンである場合、メモリ4内のデータのエンディアンがリトルエンディアンであることを示している。以下、一例として、CPU1内のデータのエンディアンがリトルエンディアンである場合について、記載する。   First, the case where data transfer from the memory 4 to the register is accessed with 4 bytes, which is the size of a vector address (hereinafter referred to as interrupt vector address) such as a reset vector address or an interrupt vector address, will be described. In this case, the aligner 11 is set to be in a connected state as shown in FIG. FIG. 14 is a block diagram schematically showing a connection relation between each address of the register in the CPU and each address of the storage area in the memory 4 in the case of access with 4 bytes. If the 0 address 90 side of the register 9 is LSB, the 3rd address 93 side is MSB, and the 0 address 10A side of the memory 4 is LSB, and the 3rd address 10D side is MSB, the aligner 11 stores data in the memory 4 and data in the CPU 1. The connection relationship when the endian is the same is shown. That is, when the endian of the data in the CPU 1 is little endian, it indicates that the endian of the data in the memory 4 is little endian. Hereinafter, as an example, a case where the endian of data in the CPU 1 is little endian will be described.

図13において、第1データ領域のデータ(リトルエンディアンのデータ)に4バイトアクセスをした場合、部分バス[0:7](データバス30)、[8:15](データバス31)、[16:23](データバス32)、[24:31](データバス33)に接続される4バイトのデータが出力され、部分バス[24:31]に出力されるデータをレジスタのMSB側となるようにレジスタ9のアドレス変位0番地(90)、1番地(91)、2番地(92)、3番地(93)に格納される。一方で第2データ領域のデータ(ビッグエンディアンのデータ)にアクセスをした場合、部分バス[24:31]に出力されるデータをレジスタのMSB側となるように、部分バス[0:7]、[8:15]、[16:23]、[24:31]に接続される夫々のデータがレジスタ9のアドレス変位0番地、1番地、2番地、3番地に格納される。すなわち第1データ領域又は第2データ領域のどちらのデータをアクセスしている際においても、割込みベクタアドレスサイズでのアクセスにおいては、CPU1内のレジスタ9に格納される順番が一致するように、アライナ11のセレクタ1〜4が設定される。セレクタ1〜4はそれぞれ4個の双方向性スイッチで構成され、双方性スイッチはCMOSトランスファゲートで構成される。制御信号CNT1をそのまま、あるいはデコードして双方性スイッチを制御するようにされる。   In FIG. 13, when 4-byte access is made to data in the first data area (little endian data), partial buses [0: 7] (data bus 30), [8:15] (data bus 31), [16 : 23] (data bus 32), [24:31] (data bus 33) is connected to the 4-byte data, and the data output to the partial bus [24:31] is on the MSB side of the register. Thus, the address displacement of the register 9 is stored at address 0 (90), address 1 (91), address 2 (92), address 3 (93). On the other hand, when data in the second data area (big endian data) is accessed, the partial bus [0: 7], so that the data output to the partial bus [24:31] is on the MSB side of the register, The respective data connected to [8:15], [16:23], and [24:31] are stored at address displacement address 0, address 1, address 2, and address 3 of register 9. That is, regardless of whether the data in the first data area or the second data area is being accessed, the aligner is arranged so that the order stored in the register 9 in the CPU 1 coincides with the access at the interrupt vector address size. Eleven selectors 1 to 4 are set. Each of the selectors 1 to 4 is composed of four bidirectional switches, and the bidirectional switch is composed of a CMOS transfer gate. The control signal CNT1 is directly or decoded to control the bidirectional switch.

同様に、第1プログラム又は第2プログラムのどちらを実行中に割込み通知が発生したとしても、割込みベクタアドレスへのアクセスでは、割込みベクタアドレスを格納したアドレスの部分バス[0:7]、[8:15]、[16:23]、[24:31]に接続される4バイトのデータが出力され、部分バス[24:31]に出力されるデータをレジスタのMSB側となるようにレジスタのアドレス変位0番地、1番地、2番地、3番地に格納される。   Similarly, even if an interrupt notification is generated during execution of either the first program or the second program, the partial bus [0: 7], [8] of the address storing the interrupt vector address is used to access the interrupt vector address. : 15], [16:23], and [24:31] are output 4 bytes of data, and the data output to the partial bus [24:31] is placed on the MSB side of the register. Address displacement is stored at address 0, address 1, address 2, and address 3.

なお、割込みベクタアドレスが格納されるレジスタはプログラムカウンタPCであり、プログラムカウンタPCに格納されるアドレスが更新されることにより割込み処理ルーチンへ分岐することとなる。   The register that stores the interrupt vector address is the program counter PC, and the address stored in the program counter PC is updated to branch to the interrupt processing routine.

斯かる分岐動作は割込み通知発生時の割込み処理ルーチンへの分岐だけでなく、アドレス修飾分岐命令等のアドレス修飾がなされる命令の実行でも同様である。   Such a branching operation is not limited to branching to an interrupt processing routine when an interrupt notification is generated, but is also the same for execution of an instruction with an address modification such as an address modification branch instruction.

アドレス修飾分岐命令としては、例えば、
jmp @#adr (1)
jmp @Rn (2)
のように、命令が記述される。命令の記述に含まれる“@”はアドレス修飾が行われることを示し、“#”は続くバイナリ情報を数値情報として認識し、Rnはレジスタ番号を指定することを示す。
As an address modification branch instruction, for example,
jmp @ # adr (1)
jmp @Rn (2)
The instruction is described as follows. “@” Included in the instruction description indicates that address modification is performed, “#” indicates that the following binary information is recognized as numerical information, and Rn indicates that a register number is designated.

命令(1)では、adrで示されるメモリ4のアドレスに分岐先アドレスが格納されており、当該命令の実行では、アドレスadrにアクセスをして分岐先アドレスを割込みベクタアドレスと同じサイズで取得し、プログラムカウンタPCに転送される。プログラムカウンタPCに格納されるアドレスが分岐先アドレスに更新されることにより、命令の実行分岐をすることができる。命令(2)では、命令(1)でのアドレスadrがレジスタに格納されており、レジスタRnにアクセスをしてアドレスadrを取得する。その後の動作は命令(1)と同じである。   In the instruction (1), the branch destination address is stored at the address of the memory 4 indicated by adr. When the instruction is executed, the address adr is accessed and the branch destination address is acquired with the same size as the interrupt vector address. And transferred to the program counter PC. By updating the address stored in the program counter PC to the branch destination address, it is possible to branch the execution of the instruction. In the instruction (2), the address adr in the instruction (1) is stored in a register, and the address adr is acquired by accessing the register Rn. Subsequent operations are the same as those of the instruction (1).

次に、メモリ4からレジスタへのデータ転送を、割込みベクタアドレスサイズの半分である2バイトで行う場合、及び1バイトで行う場合について記載する。メモリ4からのデータ転送を2バイト又は1バイトで行う場合であっても、メモリ4から4バイトでデータ読出しを行った後、読み出し対象とする2バイト又は1バイトをレジスタに転送する。   Next, a case where data transfer from the memory 4 to the register is performed with 2 bytes, which is half the interrupt vector address size, and a case where the data transfer is performed with 1 byte will be described. Even when data transfer from the memory 4 is performed by 2 bytes or 1 byte, after data is read from the memory 4 by 4 bytes, 2 bytes or 1 byte to be read is transferred to the register.

第1データ領域のアドレス2000Hから2バイトのデータ転送を指定した場合、アドレス2000Hを先頭として読み出した4バイトデータのうちの部分バス [24:31]と [16:23]に接続されるデータに対して、セレクタ3は部分バス [24:31]をレジスタ9のレジスタ内変位1番地に接続し、セレクタ4は部分バス [16:23]をレジスタ内変位0番地に接続する。この場合、セレクタ1及び2は部分バス[0:7]、[8:15]に接続されるデータはレジスタに格納しないよう制御される。   When 2-byte data transfer is specified from the address 2000H of the first data area, the data connected to the partial buses [24:31] and [16:23] of the 4-byte data read starting from the address 2000H On the other hand, the selector 3 connects the partial bus [24:31] to the in-register displacement address 1 of the register 9, and the selector 4 connects the partial bus [16:23] to the in-register displacement address 0. In this case, the selectors 1 and 2 are controlled not to store the data connected to the partial buses [0: 7] and [8:15] in the register.

また、アドレス2002Hから2バイトのデータ転送を指定した場合、アドレス2000Hを先頭として読み出した4バイトデータのうちの部分バス[8:15]と[0:7]に接続されるデータに対して、セレクタ3は部分バス[24:31]をレジスタ内変位1番地に接続し、セレクタ4は部分バス[16:23]をレジスタ内変位0番地に接続する。この場合は、セレクタ1及び2は部分バス[0:7]、[8:15]に接続されるデータはレジスタに格納しないよう制御される。   When 2-byte data transfer is specified from the address 2002H, for the data connected to the partial buses [8:15] and [0: 7] of the 4-byte data read starting from the address 2000H, The selector 3 connects the partial bus [24:31] to the in-register displacement address 1, and the selector 4 connects the partial bus [16:23] to the in-register displacement address 0. In this case, the selectors 1 and 2 are controlled so as not to store the data connected to the partial buses [0: 7] and [8:15] in the register.

一方で、第2データ領域のアドレス4000Hから2バイトのデータ転送を指定した場合、アドレス4000Hを先頭として読み出した4バイトデータのうちの部分バス[0:7]と[8:15]に接続されるデータに対して、セレクタ3は部分バス[0:7]をレジスタ9のレジスタ内変位1番地に接続し、セレクタ4は部分バス[8:15]をレジスタ9のレジスタ内変位0番地に接続する。この場合、セレクタ1及び2は部分バス[0:7]、[8:15]に接続されるデータはレジスタに格納しないよう制御される。   On the other hand, when 2-byte data transfer is specified from the address 4000H of the second data area, it is connected to the partial buses [0: 7] and [8:15] of the 4-byte data read starting from the address 4000H. The selector 3 connects the partial bus [0: 7] to the in-register displacement address 1 of the register 9, and the selector 4 connects the partial bus [8:15] to the in-register displacement address 0 of the register 9. To do. In this case, the selectors 1 and 2 are controlled not to store the data connected to the partial buses [0: 7] and [8:15] in the register.

また、アドレス4002Hから2バイトのデータ転送を指定した場合、アドレス4000Hを先頭として読み出した4バイトデータのうちの部分バス[16:23]と[24:31]に接続されるデータに対して、セレクタ3は部分バス[16:23]をレジスタ内変位1番地に接続し、セレクタ4は部分バス[24:31]をレジスタ内変位0番地に接続する。この場合は、セレクタ1及び2は部分バス[0:7]、[8:15]に接続されるデータはレジスタに格納しないよう制御される。   When 2-byte data transfer is specified from the address 4002H, for the data connected to the partial buses [16:23] and [24:31] of the 4-byte data read starting from the address 4000H, The selector 3 connects the partial bus [16:23] to the in-register displacement address 1, and the selector 4 connects the partial bus [24:31] to the in-register displacement address 0. In this case, the selectors 1 and 2 are controlled so as not to store the data connected to the partial buses [0: 7] and [8:15] in the register.

次に、メモリ4からレジスタ9へのデータ転送を、割込みベクタアドレスサイズの4分の1である1バイトで行う場合について記載する。   Next, a case where data transfer from the memory 4 to the register 9 is performed with 1 byte which is a quarter of the interrupt vector address size will be described.

第1データ領域のアドレス2000Hから1バイトのデータ転送を指定した場合、部分バス[0:7]に接続されるデータが出力され、セレクタ4は部分バス[0:7]をレジスタ内変位0番地に接続する。また、アドレス2001Hから1バイトのデータ転送を指定した場合、部分バス[8:15]に接続されるデータが出力され、セレクタ4は部分バス[8:15]をレジスタ内変位0番地に接続する。また、アドレス2002Hから1バイトのデータ転送を指定した場合、部分バス[16:23]に接続されるデータが出力され、セレクタ4は部分バス[16:23]をレジスタ内変位0番地に接続する。また、アドレス2003Hから1バイトのデータ転送を指定した場合、部分バス[24:31]に接続されるデータが出力され、セレクタ4は部分バス[24:31]をレジスタ内変位0番地に接続する。   When 1-byte data transfer is specified from the address 2000H of the first data area, data connected to the partial bus [0: 7] is output, and the selector 4 shifts the partial bus [0: 7] to address 0 in the register. Connect to. When 1-byte data transfer is specified from the address 2001H, data connected to the partial bus [8:15] is output, and the selector 4 connects the partial bus [8:15] to the displacement 0 in the register. . When 1-byte data transfer is specified from the address 2002H, data connected to the partial bus [16:23] is output, and the selector 4 connects the partial bus [16:23] to the in-register displacement address 0. . When 1-byte data transfer is designated from the address 2003H, data connected to the partial bus [24:31] is output, and the selector 4 connects the partial bus [24:31] to the displacement 0 in the register. .

一方で、第2データ領域のアドレス4000Hから1バイトのデータ転送を指定した場合、部分バス[24:31]に接続されるデータが出力され、セレクタ4は部分バス[24:31]をレジスタ内変位0番地に接続する。またアドレス4001Hから1バイトのデータ転送を指定した場合、部分バス[16:23]に接続されるデータが出力され、セレクタ4は部分バス[16:23]をレジスタ内変位0番地90に接続する。また、アドレス4002Hから1バイトのデータ転送を指定した場合、部分バス[8:15]に接続されるデータが出力され、セレクタ4は部分バス[8:15]をレジスタ内変位0番地90に接続する。またアドレス4003Hから1バイトのデータ転送を指定した場合、部分バス[0:7]に接続されるデータが出力され、セレクタ4は部分バス[0:7]をレジスタ内変位0番地に接続する。   On the other hand, when 1-byte data transfer is designated from the address 4000H of the second data area, data connected to the partial bus [24:31] is output, and the selector 4 places the partial bus [24:31] in the register. Connect to address 0. When 1-byte data transfer is specified from the address 4001H, data connected to the partial bus [16:23] is output, and the selector 4 connects the partial bus [16:23] to the in-register displacement 0 address 90. . When 1 byte data transfer is specified from the address 4002H, data connected to the partial bus [8:15] is output, and the selector 4 connects the partial bus [8:15] to the in-register displacement 0 address 90. To do. When 1-byte data transfer is designated from the address 4003H, data connected to the partial bus [0: 7] is output, and the selector 4 connects the partial bus [0: 7] to the in-register displacement address 0.

なお、アライナ11は、CPU1のレジスタ9とデータバス3との間に設けられればよく、例えばCPU1内に設けられてもよい。また、外部バスインタフェースBIF内に外部メモリEMEM用のアライナを設けてもよい。この場合、外部メモリEMEM等の外部デバイスのアドレス空間ごとにビッグエンディアンとリトルエンディアンとの切り替えがCPUによってレジスタで設定可能にしてもよい。   The aligner 11 may be provided between the register 9 of the CPU 1 and the data bus 3, and may be provided in the CPU 1, for example. Further, an aligner for the external memory EMEM may be provided in the external bus interface BIF. In this case, switching between big endian and little endian for each address space of an external device such as the external memory EMEM may be set by a CPU using a register.

以上、メモリ4からレジスタ9へ種々のサイズのデータ転送する場合について説明したが、レジスタ9からメモリ4へデータ転送する場合も同様である。なお、メモリ4からレジスタ9へデータ転送する場合、データサイズが2バイトと1バイトとのときは、転送されない部分のデータは符号拡張される(0拡張または1拡張をしてもよい。)。一方、レジスタ9からメモリ4へデータ転送する場合、データサイズが2バイトと1バイトのときは、転送されない部分は影響を受けない。   The case of transferring data of various sizes from the memory 4 to the register 9 has been described above, but the same applies to the case of transferring data from the register 9 to the memory 4. In the case of transferring data from the memory 4 to the register 9, when the data size is 2 bytes and 1 byte, the data of the portion not transferred is sign-extended (0 extension or 1 extension may be performed). On the other hand, when data is transferred from the register 9 to the memory 4, when the data size is 2 bytes and 1 byte, the untransferred portion is not affected.

以上、実施の形態3では、メモリ4のデータがリトルエンディアンとビッグエンディアンのどちらのエンディアンとなっているかにかかわらず、割込みベクタアドレスのサイズを単位としてメモリ4へのアクセスを行った際に同じデータ順序でレジスタに格納されるようにされることで、割込み通知受領時点で実行しているプログラムのデータのエンディアンに係らず、割り込みベクタアドレス及び割込み処理プログラム等のプログラムを共通化することが可能となる。   As described above, in the third embodiment, the same data is accessed when the memory 4 is accessed in units of the interrupt vector address size regardless of whether the data in the memory 4 is little endian or big endian. By storing in the registers in order, it is possible to share programs such as interrupt vector addresses and interrupt processing programs, regardless of the endianness of the data of the program being executed when the interrupt notification is received. Become.

実施の形態3では、メモリのアドレス空間によって、ビッグエンディアンとリトルエンディアンの領域を設定可能にしたが、実施の形態1と同様にマイクロコンピュータに内蔵されているメモリ4については全体をビッグエンディアン又はリトルエンディアンのいずれか一方に設定可能にしてもよい。この場合には、実施の形態3と同様に、パワーオンリセット時に専用のモード端子や汎用I/Oポート(外部端子)と兼用のモード端子の状態をマイクロコンピュータに取り込んで、例えばレジスタにラッチし、データがリトルエンディアンかビッグエンディアンのいずれであるかをCPU1がベクタアドレスをアクセスする前に確定できるようにしてもよい。   In the third embodiment, the big endian and little endian areas can be set according to the address space of the memory. However, as in the first embodiment, the entire memory 4 built in the microcomputer is either big endian or little endian. It may be possible to set either endian. In this case, as in the third embodiment, the state of a dedicated mode terminal or a general-purpose I / O port (external terminal) and a mode terminal that is also used at the time of power-on reset is taken into a microcomputer and latched in a register, for example. The CPU 1 may determine whether the data is little endian or big endian before the CPU 1 accesses the vector address.

(実施の形態4)
図15はエンディアンの異なる周辺機能ブロックを有するマイクロコンピュータの概略を示し、その他の構成は実施の形態3のマイクロコンピュータMCU(図8)と同様である。図15には、CPU1、バスコントローラBSC、バスコントローラBSCに接続されるリトルエンディアンでデータ処理を行うリトルエンディアン用周辺機能ブロック(リトルエンディアン用周辺I/O装置18,19)、及び、バスコントローラBSCに接続されるビッグエンディアンでデータ処理を行うビッグエンディアン用周辺機能ブロック(ビッグエンディアン用周辺I/O装置15,16)が、記載されている。リトルエンディアン用周辺機能ブロックはリトルエンディアン用周辺データバス17を介してバスコントローラ BSC内のアライナ13に接続され、ビッグエンディアン用周辺機能ブロックはビッグエンディアン用周辺データバス14を介してバスコントローラ BSC内のアライナ13に接続される。本構成において、リトルエンディアン用周辺I/O装置19内の転送バッファTBL等、ビッグエンディアン用周辺I/O装置15内の転送バッファTBB等とCPU1のI/Oレジスタ12(レジスタ群REGのうちの一つのレジスタである。レジスタ9と同一のものであってもよい。)は、周辺I/O装置内の転送バッファやレジスタのサイズに関係なく、LSBが共通に接続されるようにバスが接続される。リトルエンディアン用周辺I/O装置18、19かビッグエンディアン用周辺I/O装置15、16かは、それぞれの転送バッファやレジスタに割り付けられているアドレスによって判別できるようになっている。
(Embodiment 4)
FIG. 15 shows an outline of a microcomputer having peripheral function blocks of different endians, and other configurations are the same as those of the microcomputer MCU (FIG. 8) of the third embodiment. FIG. 15 shows a CPU 1, a bus controller BSC, a little endian peripheral function block (little endian peripheral I / O devices 18, 19) connected to the bus controller BSC, and a bus controller BSC. The big endian peripheral function blocks (big endian peripheral I / O devices 15 and 16) that perform data processing in big endian connected to are described. The little endian peripheral function block is connected to the aligner 13 in the bus controller BSC via the little endian peripheral data bus 17, and the big endian peripheral function block is connected to the bus controller BSC in the bus controller BSC via the big endian peripheral data bus 14. Connected to aligner 13. In this configuration, the transfer buffer TBL in the little endian peripheral I / O device 19 and the transfer buffer TBB in the big endian peripheral I / O device 15 and the I / O register 12 of the CPU 1 (of the register group REG) A single register, which may be the same as register 9, is connected to the bus so that the LSBs are connected in common regardless of the size of the transfer buffers and registers in the peripheral I / O device. Is done. The little endian peripheral I / O devices 18 and 19 or the big endian peripheral I / O devices 15 and 16 can be discriminated by the addresses assigned to the respective transfer buffers and registers.

リトルエンディアン用周辺I/O装置18,19は、外部またはリトルエンディアン用周辺データバス17からリトルエンディアンの並びのデータを受信し、またはデータを処理してリトルエンディアンの並びのデータを生成し、リトルエンディアン用周辺データバス17に出力する。   The little-endian peripheral I / O devices 18 and 19 receive little-endian sequence data from the external or little-endian peripheral data bus 17 or process the data to generate little-endian sequence data. Output to the endian peripheral data bus 17.

ビッグエンディアン用周辺I/O装置15,16は、外部またはビッグエンディアン用周辺データバス14からビッグエンディアンの並びのデータを受信し、又はデータを処理してビッグエンディアンの並びのデータを生成し、ビッグエンディアン用周辺データバス14に出力する。   The big endian peripheral I / O devices 15 and 16 receive big endian sequence data from the external or big endian peripheral data bus 14 or process the data to generate big endian sequence data. Output to the endian peripheral data bus 14.

CPU1は、第1プログラムを実行することにより、リトルエンディアン用周辺I/O装置18,19の動作制御を行い、リトルエンディアン用周辺I/O装置18,19へのデータ入出力を制御する。例えば、リトルエンディアン用周辺I/O装置18,19へデータを転送し、処理後のデータをメモリ4へ転送する場合、転送するデータのサイズにあわせて制御信号CNT2にアライナ13の転送設定情報を設定する。ビッグエンディアン用周辺I/O装置15,16でのデータ転送においても、制御信号CNT2の設定は同様である。   The CPU 1 controls the operation of the little endian peripheral I / O devices 18 and 19 by executing the first program, and controls data input and output to the little endian peripheral I / O devices 18 and 19. For example, when data is transferred to the little endian peripheral I / O devices 18 and 19 and the processed data is transferred to the memory 4, the transfer setting information of the aligner 13 is added to the control signal CNT2 according to the size of the data to be transferred. Set. The setting of the control signal CNT2 is the same in the data transfer in the big endian peripheral I / O devices 15 and 16.

アライナ13は、周辺I/O装置内の転送バッファやレジスタのサイズとこれらの転送バッファやレジスタへのアクセスサイズが同じである場合、エンディアンにかかわらず同じデータの並びとなるように構成される。例えば、CPU1がリトルエンディアン用周辺I/O装置19の転送バッファTBLに格納されたデータを、メモリ4の第2データ領域(ビッグエンディアン)に転送をする場合、転送バッファの指定されたアドレスを先頭として割込みベクタアドレスサイズ分のデータを、第2データ領域の指定されたアドレスを先頭として格納する。この場合、転送バッファTBLに格納されたデータは、一旦、CPU1内のレジスタに取り込まれ、その後、メモリ4の第2データ領域に転送される。   The aligner 13 is configured so that the same data is arranged regardless of the endian when the sizes of the transfer buffers and registers in the peripheral I / O device and the access sizes of these transfer buffers and registers are the same. For example, when the CPU 1 transfers the data stored in the transfer buffer TBL of the little endian peripheral I / O device 19 to the second data area (big endian) of the memory 4, the designated address of the transfer buffer is set to the head. Are stored for the interrupt vector address size, with the designated address in the second data area as the head. In this case, the data stored in the transfer buffer TBL is once taken into a register in the CPU 1 and then transferred to the second data area of the memory 4.

また、リトルエンディアン用周辺I/O装置19からビッグエンディアン用周辺I/O装置(15,16)や第2データ領域(ビッグエンディアン)へデータ転送をする場合、リトルエンディアン用周辺I/O装置19が転送バッファにデータを格納する際のLSB側に格納するデータと当該データを処理するCPU1のI/Oレジスタ12やビッグエンディアン用周辺I/O装置16の転送バッファTBBやビッグエンディアン用周辺I/O装置15のレジスタBIREGのLSB側に格納するデータを同じにすることで、周辺I/O装置内の転送バッファやレジスタのサイズとこれらの転送バッファやレジスタへのアクセスサイズが同じである場合にアライナ13でのデータの並びを変更することが不要にできる。   When data is transferred from the little endian peripheral I / O device 19 to the big endian peripheral I / O device (15, 16) or the second data area (big endian), the little endian peripheral I / O device 19 is used. Stores data on the LSB side when storing data in the transfer buffer, the I / O register 12 of the CPU 1 that processes the data, the transfer buffer TBB of the big endian peripheral I / O device 16, and the big endian peripheral I / O When the data stored on the LSB side of the register BIREG of the O device 15 is the same, the sizes of the transfer buffers and registers in the peripheral I / O device and the access sizes to these transfer buffers and registers are the same It is not necessary to change the arrangement of data in the aligner 13.

一方で、周辺I/O装置内の転送バッファやレジスタのサイズよりもこれらの転送バッファやレジスタへのアクセスサイズが小さい場合、アライナ13はデータの並びを変更することが必要となる。   On the other hand, when the access size to these transfer buffers and registers is smaller than the sizes of the transfer buffers and registers in the peripheral I / O device, the aligner 13 needs to change the data arrangement.

CPU1がアライナ13の転送設定情報を設定する制御信号CNT2は、上述の転送するデータのサイズ情報と共に、転送するデータの処理単位に関する情報および転送方向に関する情報も含む。   The control signal CNT2 in which the CPU 1 sets the transfer setting information of the aligner 13 includes information on the processing unit of the data to be transferred and information on the transfer direction as well as the size information of the data to be transferred.

図16は、アライナ13の構成例を示す。セレクタ1A〜4A及び1B〜4Bはそれぞれ制御信号CNT2が入力され、入出力の方向および部分バス同士の接続を決定する。周辺I/O装置内の転送バッファやレジスタのサイズとこれらの転送バッファやレジスタへのアクセスサイズが同じである場合は、同じビット位置のデータバス (リトルエンディアン用周辺データバス17とビッグエンディアン用周辺データバス14とCPU1/メモリ4用データバス3の部分バス[0:8]) 同士を接続する。   FIG. 16 shows a configuration example of the aligner 13. The selectors 1A to 4A and 1B to 4B receive the control signal CNT2, respectively, and determine the input / output direction and the connection between the partial buses. When the size of the transfer buffer or register in the peripheral I / O device and the access size to these transfer buffer or register are the same, the data bus of the same bit position (the little endian peripheral data bus 17 and the big endian peripheral The data bus 14 and the partial bus [0: 8]) of the CPU 1 / memory 4 data bus 3 are connected to each other.

一方で、周辺I/O装置内の転送バッファやレジスタのサイズが2バイトまたは4バイトの場合、リトルエンディアン用周辺データバス17からビッグエンディアン用周辺データバス14へバイト単位に処理するデータを転送するときは、データの並びが逆になるように(例えば、4バイトの場合は、一方の部分バス[0:7]と他方の部分バス[24:31]、一方の部分バス[8:15]と他方の部分バス[16:23])、部分バスが接続される。   On the other hand, when the size of the transfer buffer or register in the peripheral I / O device is 2 bytes or 4 bytes, the data to be processed in units of bytes is transferred from the little endian peripheral data bus 17 to the big endian peripheral data bus 14. When the order of data is reversed (for example, in the case of 4 bytes, one partial bus [0: 7], the other partial bus [24:31], and one partial bus [8:15] And the other partial bus [16:23]) and the partial bus.

なお、セレクタ1A〜4A及び1B〜4Bは、実施の形態3のセレクタ1〜4と同様な双方性スイッチで構成される。   Note that the selectors 1A to 4A and 1B to 4B are configured by the same bidirectional switches as the selectors 1 to 4 of the third embodiment.

このようにアライナ13を構成することにより、処理するエンディアンに応じて周辺機能ブロックを異なるバスに接続し、アライナ13を介して夫々のバスに接続される周辺機能ブロック間でデータ転送可能とすることが可能となる。   By configuring the aligner 13 in this manner, peripheral function blocks are connected to different buses according to the endian to be processed, and data can be transferred between the peripheral function blocks connected to the respective buses via the aligner 13. Is possible.

以上、実施の形態4では、周辺機能IPとの間での転送対象となるデータのエンディアン及び周辺機能IPを制御するプログラムでの処理対象のデータのエンディアンによらず同じデータ順序でデータ転送を可能としたことで、周辺機能IPを制御するプログラムの共通化をすることが可能となる。   As described above, in the fourth embodiment, data can be transferred in the same data order regardless of the endian of the data to be transferred to and from the peripheral function IP and the endian of the data to be processed in the program that controls the peripheral function IP. This makes it possible to share a program for controlling the peripheral function IP.

更に周辺機能ブロックのデータ処理のエンディアンとCPU1のデータ処理のエンディアンの異同にかかわらず、マイクロコンピュータMCUで必要とされる周辺機能ブロックを採用する自由度を向上させることができる。   Furthermore, regardless of the difference between the endian of the data processing of the peripheral function block and the endian of the data processing of the CPU 1, the degree of freedom to adopt the peripheral function block required by the microcomputer MCU can be improved.

(実施の形態5)
図17は、実施の形態1,2,3,4及び後述する実施の形態6に係るマイクロコンピュータで実行するプログラムの開発ツールのフロー概略を示す。C言語等の高級言語で記述されたソースプログラムをコンパイラが構文解析等、及び最適化を行ってアセンブリ言語で記述したアセンブリ言語プログラムを出力する。アセンブラはコンパイラから出力されたアセンブリ言語から機械語を生成し機械語プログラムを出力する。1又は複数の機械語プログラムをリンケージエディタで結合(リンク処理)してマイクロコンピュータで実行可能なプログラムが生成される。
(Embodiment 5)
FIG. 17 shows an outline of a flow of a program development tool executed by a microcomputer according to the first, second, third, and fourth embodiments and the sixth embodiment described later. The compiler performs syntax analysis and optimization on the source program described in a high-level language such as C language, and outputs an assembly language program described in the assembly language. The assembler generates a machine language from the assembly language output from the compiler and outputs a machine language program. One or a plurality of machine language programs are linked (linked) by a linkage editor to generate a program that can be executed by a microcomputer.

コンパイラの出力するアセンブリ言語プログラムは、大きく分けて、マイクロコンピュータのCPU等が実行する命令コードの集合部であるコードセクション(又はコードセグメント)と、高級言語プログラム中に記述した定数やコンパイラが出力した定数等の集合部であるデータセクション(又はデータセグメント)とを有する。コードセクション中の命令コードは、上述したとおり、リトルエンディアン又はビッグエンディアンのいずれか一方に固定される。一方で、データセクション中の定数等は、リトルエンディアン又はビッグエンディアンのいずれか選択可能となるが、高級言語プログラム中にいずれのエンディアンを使用するかの指定命令を有し、当該指定命令に従い、エンディアン解決が行われる。   Assembly language programs output by the compiler are broadly divided into code sections (or code segments), which are a collection of instruction codes executed by the CPU of the microcomputer, and constants and compilers described in high-level language programs. And a data section (or data segment) that is a set part such as a constant. As described above, the instruction code in the code section is fixed to either little endian or big endian. On the other hand, constants in the data section can be selected as either little endian or big endian. However, there is a specification instruction for which endian is to be used in the high-level language program. A solution is made.

高級言語又はアセンブリ言語プログラム中に含まれる定数であれば、コンパイラ又はアセンブラによりエンディアン解決が可能であるが、分岐命令の分岐先アドレス等のアドレス参照値はリンケージエディタでのリンク処理時に決定するため、コンパイラ又はアセンブラでのエンディアン解決が出来ない。斯かるアドレスのエンディアン解決は、リンケージエディタにより行われる。   If it is a constant included in a high-level language or assembly language program, endian resolution is possible by a compiler or assembler, but the address reference value such as the branch destination address of a branch instruction is determined at the time of link processing in the linkage editor. Endian resolution cannot be performed by the compiler or assembler. The endian resolution of such an address is performed by the linkage editor.

リンケージエディタは1又は複数の機械語プログラムを結合し、結合前の機械語プログラムでは変数名として参照しているアドレス参照値について、リンク後の配置によりアドレス値を決定し、エンディアン解決を行ってアドレス定数として実行プログラムのデータセクション中に格納される。   The linkage editor combines one or more machine language programs. For the address reference value referenced as a variable name in the machine language program before linking, the address value is determined by the arrangement after linking, and endian resolution is performed to determine the address. Stored as a constant in the data section of the executable program.

上述したフローにより生成された実行可能プログラムは、マイクロコンピュータの半導体基板上に構成されるマスクROM又はフラッシュメモリ等に格納され、マイクロコンピュータで実行可能に構成される。   The executable program generated by the above-described flow is stored in a mask ROM or flash memory configured on the semiconductor substrate of the microcomputer and configured to be executable by the microcomputer.

上述した実施の形態3との対応では、データセクションからレジスタへデータ転送を行う際、データ転送サイズに応じてアライナ11の設定を行う制御信号CNT1が出力され、データセクションに格納されているデータの並びが決定される。   In correspondence with the above-described third embodiment, when data is transferred from the data section to the register, the control signal CNT1 for setting the aligner 11 according to the data transfer size is output, and the data stored in the data section is transferred. The order is determined.

また、割込みベクタアドレスを含むアドレス参照値やアドレス定数については、同じデータサイズとなるようにされる。それにより、他の分岐命令やアドレス参照命令の実行において割込みベクタアドレスサイズでのアドレス情報取得では、格納されているデータセクションのエンディアンにかかわらず、適切にアドレス情報を取得することが可能となる。   The address reference value including the interrupt vector address and the address constant are set to have the same data size. As a result, in the execution of other branch instructions and address reference instructions, address information acquisition with the interrupt vector address size can appropriately acquire address information regardless of the endian of the stored data section.

上述した実施の形態4との対応では、周辺機能ブロック間または周辺機能ブロックとメモリ4やレジスタとの間でデータ転送を行う場合、データ転送サイズと共に当該データの処理単位に応じてアライナ13の設定を行う制御信号CNT2が出力され、データ転送の際のデータの並びが決定される。   In correspondence with the above-described fourth embodiment, when data transfer is performed between peripheral function blocks or between the peripheral function block and the memory 4 or the register, the aligner 13 is set according to the data processing unit together with the data transfer size. The control signal CNT2 for performing is output, and the arrangement of data at the time of data transfer is determined.

(実施の形態6)
以下、マイクロコンピュータMCUでの処理性能の向上、コード効率の向上、及び消費電力の向上について、各々、記載する。尚、コード効率の向上とは、命令を格納するために必要とされるメモリ容量を削減することである。
(Embodiment 6)
Hereinafter, improvement in processing performance, improvement in code efficiency, and improvement in power consumption in the microcomputer MCU will be described, respectively. Note that the improvement in code efficiency is to reduce the memory capacity required for storing instructions.

図18に、マイクロコンピュータMCUの処理性能についての評価項目を記載する。マイクロコンピュータMCUは使用される用途に応じて必要とされる処理性能に幅が生じるが、図18は、所謂デジタル家電などの比較的高度な処理を行う機器に組み込まれて用いられるマイクロコンピュータMCUに求められる処理性能の一例である。   FIG. 18 shows the evaluation items for the processing performance of the microcomputer MCU. Although the microcomputer MCU has a range in processing performance required depending on the application to be used, FIG. 18 shows a microcomputer MCU that is incorporated in a device that performs relatively advanced processing such as a so-called digital home appliance. It is an example of the required processing performance.

斯かる処理性能を実現するために、図19に示すように、5段パイプライン処理を採用している。パイプライン処理は、一般的に知られている通り、CPU1での命令実行を複数の処理ステージに分割し、各処理ステージをクロックの1サイクルで実行するようにされる。   In order to realize such processing performance, five-stage pipeline processing is adopted as shown in FIG. As is generally known, pipeline processing divides instruction execution in the CPU 1 into a plurality of processing stages, and each processing stage is executed in one cycle of a clock.

メモリフェッチステージでは、メモリ4から命令レジスタIRへ命令をフェッチする。デコードステージでは、命令レジスタIRにフェッチした命令をデコードし、続く実行ステージで命令実行する演算器のスケジューリング等を行う。また、デコードステージではNOP命令等の実行が不要な命令についてパイプラインを終了させるためのバイパス処理や、演算に使用するレジスタの内容をフェッチするレジスタフェッチも行われる。   In the memory fetch stage, an instruction is fetched from the memory 4 to the instruction register IR. At the decode stage, the instruction fetched into the instruction register IR is decoded, and the arithmetic unit for executing the instruction at the subsequent execution stage is scheduled. In the decode stage, bypass processing for ending the pipeline for an instruction that does not need to be executed, such as a NOP instruction, and register fetch for fetching the contents of a register used for an operation are also performed.

実行ステージでは、デコードステージでスケジューリングした演算器とフェッチしたレジスタの内容とから演算処理やアドレス計算を行う。メモリアクセスステージでは、命令にメモリアクセスが必要なオペランドがある場合にメモリアクセスを行う。   In the execution stage, arithmetic processing and address calculation are performed from the arithmetic unit scheduled in the decode stage and the contents of the fetched register. In the memory access stage, memory access is performed when there is an operand that requires memory access in the instruction.

ライトバックステージでは、実行ステージでの演算結果をレジスタ等に格納し、当該命令についてのパイプラインの終了処理を行う。   In the write-back stage, the operation result in the execution stage is stored in a register or the like, and the pipeline end process for the instruction is performed.

図20は、マイクロコンピュータMCUのCPU1とメモリ4との間のバス構成を示す。図21に示すように、パイプライン処理を行うことでCPU1での命令実行の各処理ステージを、複数の命令で異なる処理ステージを実行させて1命令辺りの実効処理性能を向上させる。この場合、メモリアクセスが必要なオペランドを有する命令のメモリアクセスステージと、命令フェッチとが同じタイミングとなり、メモリアクセスの競合が生じる。そのため、命令フェッチを行う命令バス5とオペランド用のメモリアクセスバス(データバス3)とを分離するハーバード・アーキテクチャを採用し、メモリアクセスの競合が発生する機会を減少させる。   FIG. 20 shows a bus configuration between the CPU 1 and the memory 4 of the microcomputer MCU. As shown in FIG. 21, by performing pipeline processing, each processing stage of instruction execution in the CPU 1 is caused to execute different processing stages with a plurality of instructions, thereby improving the effective processing performance per instruction. In this case, the memory access stage of an instruction having an operand that requires memory access and the instruction fetch have the same timing, resulting in a memory access conflict. For this reason, the Harvard architecture that separates the instruction bus 5 for fetching instructions from the memory access bus (data bus 3) for operands is employed to reduce the chance of occurrence of memory access conflict.

図20に記載のInstruction Interfaceは、図9に記載の命令レジスタIR及び命令デコーダiDECに相当する。Data Interfaceはメモリアクセスバスとのインタフェースであり、オペランド用のメモリアクセス制御を行う。   The Instruction Interface described in FIG. 20 corresponds to the instruction register IR and instruction decoder iDEC described in FIG. Data Interface is an interface with the memory access bus, and performs memory access control for operands.

CPU1においてハーバード・アーキテクチャとパイプライン処理を採用したことにより、CPU1の行うメモリアクセスの競合(命令フェッチとオペランドフェッチ)回避が可能となり、CPU1における命令実行性能を向上させることが可能となる。   By adopting the Harvard architecture and pipeline processing in the CPU 1, it is possible to avoid a memory access conflict (instruction fetch and operand fetch) performed by the CPU 1 and to improve instruction execution performance in the CPU 1.

所謂デジタル家電では、DVD(高記録密度規格を含む)やデジタルTVといった、動画処理を行う機器が少なからず存在する。動画処理では画素毎に積和演算などのDSP (Digital Signal Processing) 演算を繰返し実行する。   In so-called digital home appliances, there are a number of devices that perform moving image processing, such as DVDs (including high recording density standards) and digital TVs. In moving image processing, a DSP (Digital Signal Processing) operation such as a product-sum operation is repeatedly executed for each pixel.

図22に記載の通り、DSP演算においてメモリ4に格納されている画素毎のデータを演算ごとにレジスタへ読み出し演算を繰返したのでは、データをレジスタへ読み出す処理が実際の演算に対してオーバヘッドとなる。そのため、演算に使用する2つのデータをメモリ4から直接読み出して乗算を行い、既演算結果との加算処理を行うメモリ間積和演算命令を実行可能とした。   As shown in FIG. 22, in the DSP operation, the data for each pixel stored in the memory 4 is read out to the register for each operation and the operation is repeated. Become. For this reason, it is possible to execute an inter-memory product-sum operation instruction that directly reads two data used for the calculation from the memory 4 and performs multiplication, and performs addition processing with the already calculated result.

また、レジスタに格納済みのデータに対しても同様に積和演算を行うレジスタ間積和演算命令を実行可能とした。   In addition, it is possible to execute an inter-register product-sum operation instruction that similarly performs a product-sum operation on data stored in a register.

メモリ間積和演算命令によりメモリ4に格納された多数のデータを使用した積和演算において、メモリ4からレジスタへデータ転送をする時間を削減することが可能となり演算器の処理効率が向上し、メモリ4からレジスタへデータ転送する転送命令が不要になるため、コード効率が向上する。また、レジスタ間積和演算命令によりレジスタに格納済みのデータを使用した積和演算を高速に実行可能となり、演算器の処理効率が向上する。   In the product-sum operation using a large number of data stored in the memory 4 by the inter-memory product-sum operation instruction, it is possible to reduce the time for data transfer from the memory 4 to the register, and the processing efficiency of the arithmetic unit is improved. Since a transfer instruction for transferring data from the memory 4 to the register becomes unnecessary, the code efficiency is improved. Further, the product-sum operation using the data stored in the register by the inter-register product-sum operation instruction can be executed at high speed, and the processing efficiency of the arithmetic unit is improved.

また、座標演算等では、浮動小数点演算を繰返し実行することも必要となる。図23に記載の通り、浮動小数点演算器では汎用レジスタとは別の専用データレジスタを有し、専用データレジスタを用いて演算を行う。斯かる演算では、汎用レジスタに格納されたデータを専用レジスタに転送する処理がオーバヘッドとなる。そのため、汎用レジスタに格納されたデータを浮動小数点演算器が直接アクセスして演算可能に構成する。かかる構成により、汎用レジスタから専用レジスタへのデータ転送処理を削減することが可能となり演算器の処理効率が向上し、汎用レジスタから専用レジスタへデータ転送する転送命令が不要となるため、コード効率が向上する。   Further, in coordinate calculation or the like, it is necessary to repeatedly execute floating point calculation. As shown in FIG. 23, the floating point arithmetic unit has a dedicated data register different from the general-purpose register, and performs an operation using the dedicated data register. In such an operation, the process of transferring the data stored in the general-purpose register to the dedicated register is an overhead. For this reason, the data stored in the general-purpose register is configured so that the floating-point arithmetic unit can directly access and perform the calculation. With this configuration, it is possible to reduce the data transfer processing from the general-purpose register to the dedicated register, improve the processing efficiency of the arithmetic unit, and eliminate the need for a transfer instruction to transfer data from the general-purpose register to the dedicated register. improves.

図24は、積和演算器と浮動小数点演算器とを用いた他の演算例を示す。   FIG. 24 shows another example of calculation using a product-sum calculator and a floating-point calculator.

外部のセンサ等のアナログ信号をA/D変換器によりデジタル変換してメモリ4に格納した後、メモリ4に格納されたデジタル変換されたセンサ情報とメモリ4に格納されているフィルタ演算係数とを用いてメモリ間積和演算命令によるフィルタ演算を行い、デジタル変換されたセンサ情報に含まれるノイズの除去を行うことが可能となる。   An analog signal from an external sensor or the like is digitally converted by an A / D converter and stored in the memory 4, and then the digitally converted sensor information stored in the memory 4 and the filter operation coefficient stored in the memory 4 are used. It is possible to perform a filter operation using an inter-memory product-sum operation instruction to remove noise included in the digitally converted sensor information.

モータにPWM(Pulse Wave Modulation)波形を供給して回転制御を行うモータ制御において、モータの各位相(U/V/W相)から出力されるモータ電流をA/D変換器によりデジタル変換してレジスタに格納した後、レジスタ間積和演算命令による座標変換を行う。汎用レジスタに格納されている積和演算結果を浮動小数点演算器でPID(比例/積分/微分)制御演算を行った後、汎用レジスタの制御演算結果をレジスタ間積和演算命令により再度座標変換を行い、モータ制御信号としてPWM波形をモータに供給する。斯かる演算により、汎用レジスタを用いた演算を繰返すことが可能となり、専用レジスタを用いた演算に比べて短時間間隔でのモータ制御が可能となる。   In motor control that performs rotation control by supplying a PWM (Pulse Wave Modulation) waveform to the motor, the motor current output from each phase (U / V / W phase) of the motor is digitally converted by an A / D converter. After storing in the register, coordinate conversion is performed by an inter-register product-sum operation instruction. The product-sum operation result stored in the general-purpose register is subjected to PID (proportional / integral / derivative) control operation using a floating-point arithmetic unit, and then the coordinate operation is performed again using the inter-register product-sum operation instruction. The PWM waveform is supplied to the motor as a motor control signal. Such a calculation makes it possible to repeat a calculation using a general-purpose register, and enables motor control at a short time interval as compared with a calculation using a dedicated register.

図25は、ユーザのアプリケーションで出現頻度の高い命令を分析したものである。頻出命令について命令サイズを小さくすることにより、ユーザアプリケーションの実行プログラムサイズを小さくすることが可能となり、コード効率の向上を図ることが可能となる。また、出現頻度の高い命令をユーザにとってより使い易い命令とすることは、ユーザビリティの向上に繋がることとなる。   FIG. 25 shows an analysis of a command having a high appearance frequency in the user application. By reducing the instruction size for frequent instructions, it is possible to reduce the execution program size of the user application and to improve the code efficiency. In addition, making a command with a high appearance frequency a command that is easier to use for the user leads to an improvement in usability.

図26は、出現頻度が高く命令サイズを小さくした命令の一例である。   FIG. 26 shows an example of an instruction having a high appearance frequency and a reduced instruction size.

プログラム中のループ処理や変数の持つ値に応じての多方向分岐で、ループ条件の成立/非成立や変数の値に応じて分岐を行う際に用いられる分岐命令として、相対アドレスで分岐先アドレスを指定するBEQ(条件成立分岐)、BNE(条件非成立分岐)、BRA(無条件成立分岐)がある。   Branch destination address as a relative instruction as a branch instruction used when a loop condition in a program or a multi-directional branch according to the value of a variable establishes or does not satisfy a loop condition or branches according to the value of a variable There are BEQ (conditionally satisfied branch), BNE (condition not satisfied branch), and BRA (unconditional satisfied branch).

これらの命令の動作では、分岐するメモリ4内のアドレス距離は比較的短いものもあり、分岐距離が8バイト以内、256バイト以内、65434バイト以内の夫々にあわせて、分岐命令のコードサイズとして、1バイト、2バイト、3バイトの命令を採用可能とした。これにより、分岐距離に応じてのユーザの選択自由度が高くなり、コード効率の向上を図ることができる。   In the operation of these instructions, the address distance in the branching memory 4 is relatively short, and the code size of the branch instruction is set so that the branch distance is within 8 bytes, within 256 bytes, and within 65434 bytes, respectively. 1-byte, 2-byte, and 3-byte instructions can be used. As a result, the degree of freedom of selection by the user according to the branch distance is increased, and the code efficiency can be improved.

レジスタに格納したアドレス値を基準として相対変位値を指定するレジスタ間接アドレッシングでの転送命令、即値(イミディエイト値)とレジスタとの間で演算を行う比較命令や加算命令において、レジスタ格納値を基準とする相対変位値及び即値として指定できる値の範囲にあわせて、命令のコードサイズを2バイト〜8バイトを選択可能としている。若しくは、レジスタ格納値のうちの演算に使用するデータ幅を指定可能な演算命令において、当該データ幅として指定できる値の範囲にあわせて乗算命令においてコードサイズを2バイト〜6バイトを選択可能とし、または、除算命令においてコードサイズを3バイト〜7バイトを選択可能としている。   Transfer instruction in register indirect addressing that specifies relative displacement value with reference to address value stored in register, comparison instruction or addition instruction that performs operation between immediate value (immediate value) and register, using register stored value as reference The code size of the instruction can be selected from 2 bytes to 8 bytes according to the range of values that can be designated as relative displacement values and immediate values. Alternatively, in an operation instruction that can specify the data width used for the operation of the register stored value, the code size can be selected from 2 bytes to 6 bytes in the multiplication instruction in accordance with the range of values that can be specified as the data width. Alternatively, the code size can be selected from 3 bytes to 7 bytes in the division instruction.

また、サブルーチン分岐命令において、プログラムカウンタ格納値+レジスタ格納値演算による分岐先アドレスを求めるようにすることで、命令のコードサイズを2〜4バイトで選択可能としている。   Further, in the subroutine branch instruction, the instruction code size can be selected from 2 to 4 bytes by obtaining the branch destination address by calculation of the program counter stored value + register stored value.

図27は、インデックス付レジスタ間接アドレッシングの例を示す。   FIG. 27 shows an example of indexed register indirect addressing.

インデックス付レジスタ間接アドレッシングでは、ベースアドレスを格納したレジスタとオフセットアドレスを格納したレジスタとの加算を行い、求まったアドレスに対してデータ転送等を行う。この場合、バイトサイズ指定がある場合には、オフセットアドレスはそのままでベースアドレスとの加算を行い、ロングワードサイズ指定がある場合には、オフセットアドレスを4倍した値とベースアドレスとの加算を行う。斯かるアドレッシング指定を採用することにより、バイトサイズ指定においてはオフセットアドレスとベースアドレスとの加算命令、ロングワードサイズ指定ではオフセットアドレスの4倍化演算(2ビット左シフト演算)命令とオフセットアドレスとベースアドレスとの加算命令との削減を図ることが可能となり、コード効率が向上する。   In the indexed register indirect addressing, the register storing the base address and the register storing the offset address are added, and data transfer or the like is performed on the obtained address. In this case, when the byte size is specified, the offset address is added as it is and the base address is added. When the long word size is specified, the offset address is multiplied by 4 and the base address is added. . By adopting such an addressing specification, an instruction for adding an offset address and a base address is specified for a byte size specification, and a quadruple operation (2-bit left shift operation) for an offset address is specified for a longword size specification, an offset address and a base. It is possible to reduce the addition instruction with the address, and the code efficiency is improved.

図28は、ポストインクリメント/プリデクリメント機能付きのレジスタ間接アドレッシングの例を示す。   FIG. 28 shows an example of register indirect addressing with a post-increment / pre-decrement function.

ポストインクリメント/プリデクリメントは、所定数のエントリを有するテーブルに格納された値に対して演算を行う場合に主に用いられる。ポストインクリメントとプリデクリメントのどちらを使用するかは、テーブルの低位側アドレスから演算を行う場合はポストインクリメント、テーブルの高位側アドレスから演算を行う場合はプリデクリメントを用いる。テーブルの低位側アドレスから演算を行う場合、最初のテーブルエントリに格納された値に対して演算を行った後、次のテーブルエントリの値を参照するアドレスの加算を行う必要がある。ポストインクリメント/プリデクリメント機能によりテーブルエントリを参照するアドレスの加算/減算を、当該テーブルエントリに格納された値に対する演算を行う演算命令で行うことが可能となり、参照アドレスの加算/減算を行う命令の削減を図ることが可能となり、コード効率が向上する。   Post-increment / pre-decrement is mainly used when an operation is performed on a value stored in a table having a predetermined number of entries. Whether to use post-increment or pre-decrement, post-increment is used when calculation is performed from the lower address of the table, and pre-decrement is used when calculation is performed from the higher address of the table. When performing an operation from the lower address of the table, it is necessary to perform an operation on the value stored in the first table entry and then add an address referring to the value of the next table entry. Addition / subtraction of an address referring to a table entry by the post-increment / pre-decrement function can be performed by an operation instruction that performs an operation on a value stored in the table entry. Reduction can be achieved and code efficiency is improved.

図29は、3オペランド指定可能な演算の例を示す。   FIG. 29 shows an example of an operation that can specify three operands.

オペランドとして2つのレジスタ等を指定した加算命令を実行する場合、加算値と被加算値とをそれぞれのレジスタに格納しておき、加算結果を、被加算値を格納していたレジスタに格納する。斯かる演算動作では、被加算値を別の演算でも利用する場合は、別のレジスタ又はメモリ4に格納しておき、演算の毎に被加算値を被加算値格納レジスタに転送する必要がある。   When an addition instruction specifying two registers as operands is executed, the addition value and the addition value are stored in the respective registers, and the addition result is stored in the register in which the addition value was stored. In such a calculation operation, when the added value is used in another calculation, it is necessary to store the added value in another register or the memory 4 and to transfer the added value to the added value storage register for each calculation. .

レジスタ等で3オペランドを指定可能とすることにより、演算結果を被加算値格納レジスタとは別のレジスタに格納するように指定可能となり、被加算値格納レジスタへ演算の毎に被加算値を転送する命令の削減を図ることが可能となり、コード効率が向上する。   By making it possible to specify 3 operands in the register, etc., it becomes possible to specify that the operation result is stored in a register different from the added value storage register, and the added value is transferred to the added value storage register for each operation. It is possible to reduce the number of instructions to be executed, and the code efficiency is improved.

図23は、マイクロコンピュータMCUでのレジスタ構成の例を示す。マイクロコンピュータMCUは、演算に主に用いられる汎用レジスタと、マイクロコンピュータMCUの動作制御に用いられるコントロールレジスタとを有する。   FIG. 23 shows an example of a register configuration in the microcomputer MCU. The microcomputer MCU has a general-purpose register mainly used for calculation and a control register used for operation control of the microcomputer MCU.

汎用レジスタは基本となるサイズ(32bit)に対して、8bitデータや16bitデータでの演算に用いる8bitレジスタや16bitレジスタとして使用できるように分割されることもある。しかしながら、本実施の形態に係るマイクロコンピュータMCUでは、このようなレジスタの分割は行わず、全てのレジスタを基本となる32bitでのみ使用するようにしている。   The general-purpose register may be divided so that it can be used as an 8-bit register or a 16-bit register used for operations with 8-bit data or 16-bit data with respect to the basic size (32 bits). However, in the microcomputer MCU according to the present embodiment, such register division is not performed, and all registers are used only in the basic 32 bits.

レジスタを分割した場合、演算対象となる部分レジスタと演算対象とならない部分レジスタとのアクセス制御が必要となるため、レジスタ制御回路が複雑になり、レジスタアクセスの時間的オーバヘッドと消費電力の増大とを招くことになる。汎用レジスタは、命令実行においてアクセスされることが非常に多く、レジスタアクセスでの時間的オーバヘッドと消費電力の増大とが1回あたりでは夫々微小であったとしてもプログラム実行全体では時間的オーバヘッドと消費電力とは大きなものとなる。   When the registers are divided, access control between the partial registers to be operated and the partial registers that are not to be operated is required, which complicates the register control circuit, and increases the time overhead and power consumption of register access. Will be invited. General-purpose registers are accessed frequently during instruction execution, and even if the time overhead and power consumption increase during register access are small at a time, the time overhead and consumption of the entire program execution are small. Electricity is big.

レジスタ分割を採用しないことにより、レジスタアクセスの時間的オーバヘッドと消費電力の低減とを図ることができる。また、汎用レジスタのサイズが統一されているため、コンパイラで高級言語からアセンブリ言語へのコンパイル処理において使用できるレジスタの自由度が高くなり、汎用レジスタの使用効率が向上することから、メモリ4へのアクセス頻度を低減することが可能になる。斯かる点においても、命令実行におけるメモリアクセスオーバヘッド及び消費電力の低減化を図ることができる。   By not using the register division, it is possible to reduce the temporal overhead of register access and the power consumption. In addition, since the size of the general-purpose register is unified, the degree of freedom of the register that can be used in the compiler from the high-level language to the assembly language is increased, and the use efficiency of the general-purpose register is improved. Access frequency can be reduced. Also in this respect, it is possible to reduce the memory access overhead and power consumption in executing instructions.

コントロールレジスタには、割込み処理やサブルーチン処理でのスタックポインタ(ISP,USP)、割込みテーブルの配置アドレスを示す割込みテーブルレジスタ(INTB)、実行中の命令アドレスを示すプログラムカウンタ(PC)と命令実行での状態を示すプロセッサステータスワード(PSW)、浮動小数点演算器およびその他のコプロセッサの実行状態を示す浮動小数点ステータスワード(FPSW,CPEN)を有する。更に高速割込み処理を行うための専用レジスタとして、PSWとPCをバックアップするバックアップPSW(BPSW)とバックアップPC(BPC)、高速割込み処理での高速割込みベクタアドレス(FINTV)を有する。   The control register includes a stack pointer (ISP, USP) in interrupt processing and subroutine processing, an interrupt table register (INTB) indicating the allocation address of the interrupt table, a program counter (PC) indicating the instruction address being executed, and instruction execution And a floating point status word (FPSW, CPEN) indicating the execution state of the floating point arithmetic unit and other coprocessors. Further, as dedicated registers for performing high-speed interrupt processing, a backup PSW (BPSW) and backup PC (BPC) for backing up PSW and PC, and a high-speed interrupt vector address (FINTV) for high-speed interrupt processing are provided.

図31、図32及び図33は、割込み処理の高速化の場合を示す。   31, FIG. 32 and FIG. 33 show the case of high-speed interrupt processing.

図31は、高速割込み処理のシーケンスを示す。通常の割込み処理では、割込みコントローラINTCからの割込み通知に応じて、PSWとPCを夫々スタック領域に退避し、割り込み要因に応じたベクタテーブルの読み出しを行い割込み処理ルーチンのアドレスを取得して当該割込み処理ルーチンに分岐をする。また、割込み通知が複数通知され又は既に割込み処理を行っている状態での別の割込み通知がされた場合には、割込み処理の処理優先順位を判定し、優先処理する割込み処理に応じて割込みマスク等のフラグ設定処理を行う。これらの処理のうち、スタック領域と割込みベクタテーブルとはメモリ4に割り当てられるため、PSWとPCのスタック領域への退避とベクタテーブル読み出しでは、メモリアクセスの時間が必要となる。   FIG. 31 shows a sequence of high-speed interrupt processing. In normal interrupt processing, in response to an interrupt notification from the interrupt controller INTC, the PSW and PC are saved in the stack area, the vector table is read according to the interrupt cause, the address of the interrupt processing routine is obtained, and the interrupt Branch to the processing routine. Also, when multiple interrupt notifications are notified or another interrupt notification is already made when interrupt processing is already in progress, the processing priority of interrupt processing is determined, and an interrupt mask is set according to the interrupt processing to be prioritized. Etc. Flag setting processing is performed. Among these processes, since the stack area and the interrupt vector table are allocated to the memory 4, memory access time is required for saving the PSW and PC to the stack area and reading the vector table.

高速割込み処理では、PSWとPCをスタック領域に退避し割込みベクタテーブルへアクセスするのではなく、コントロールレジスタとして準備されるバックアップPSWとバックアップBPCとに夫々退避し、高速割込みベクタアドレスに格納されている割込み処理ルーチンへ分岐する。斯かる処理により、高速割込み処理ではメモリアクセスを削減することが可能となり、割込み処理への分岐を高速化することが可能となる。   In high-speed interrupt processing, the PSW and PC are not saved in the stack area and accessed to the interrupt vector table, but are saved in the backup PSW and backup BPC prepared as control registers, respectively, and stored in the high-speed interrupt vector address. Branches to the interrupt processing routine. With such processing, memory access can be reduced in high-speed interrupt processing, and branching to interrupt processing can be speeded up.

図32は、割込み処理における汎用レジスタの割り当てを示す。通常の割込み処理では、割込み処理に分岐する前にアプリケーションで使用していた汎用レジスタに格納されているデータが割込み処理中に書き換えられてしまい、割込み処理から復帰した後でのアプリケーションの継続実行において不都合が生じないように、汎用レジスタに格納されているデータをスタック領域に退避し又は割込み処理に分岐する際に使用するレジスタバンクを異なるバンクに切り替えることが行われる。このスタック領域への退避はメモリアクセスを発生し、また、レジスタバンクの切り替えでも実態としてはメモリ4の領域へレジスタに格納しているデータを退避することで実現している。   FIG. 32 shows general-purpose register allocation in interrupt processing. In normal interrupt processing, the data stored in the general-purpose register used by the application before branching to interrupt processing is rewritten during interrupt processing, and the application continues execution after returning from interrupt processing. In order not to cause inconvenience, data stored in the general-purpose register is saved in the stack area, or the register bank used when branching to the interrupt processing is switched to a different bank. This saving to the stack area is realized by generating a memory access, and in actuality even by switching the register bank, the data stored in the register is saved to the area of the memory 4.

割込み処理への分岐を高速化するために、汎用レジスタをアプリケーション用レジスタと割込み用レジスタとに夫々割り当て、アプリケーション実行中はアプリケーション用に割り当てられたレジスタを使用し、割込み処理の実行中は割り込み用レジスタを使用するように制御する。アプリケーション用レジスタと割込み処理用レジスタとはプログラムで割り当て設定可能とすることでレジスタの割り当ての自由度が高まり、また、汎用レジスタの退避が不要となるため、割込み処理の実行開始を高速化することが可能となる。   In order to speed up branching to interrupt processing, general-purpose registers are assigned to application registers and interrupt registers, respectively. Registers used for applications are used during application execution, and interrupts are executed during interrupt processing. Control to use registers. Application registers and interrupt processing registers can be assigned and set by a program, increasing the degree of freedom of register assignments, and eliminating the need to save general-purpose registers, speeding up the start of interrupt processing execution Is possible.

図33に示すとおり、PSWとPCの退避および割込みベクタアドレス取得でのメモリアクセスの削減(高速割込み処理)と、アプリケーション用レジスタから割り込み用レジスタへの汎用レジスタの切り替え(汎用レジスタ割り当て)により、割込み通知がされた後 当該割込み通知に対応した割込み処理の開始までの時間を短縮し、マイクロコンピュータMCUのプログラム実行効率を向上することが可能となる。   As shown in FIG. 33, interrupts can be achieved by reducing memory access (saving high-speed interrupt processing) by saving PSW and PC and acquiring interrupt vector addresses, and switching general-purpose registers from application registers to interrupt-use registers (general-purpose register allocation). It is possible to shorten the time until the start of the interrupt processing corresponding to the interrupt notification after the notification is made, and to improve the program execution efficiency of the microcomputer MCU.

図34は、メモリプロテクションを示す。アプリケーションAとアプリケーションBとが夫々アプリケーションA用メモリ領域とアプリケーションB用メモリ領域とを割り当てられている場合に、アプリケーションAが誤ってアプリケーションB用メモリ領域にアクセスしてアプリケーションBで使用するデータを書換え、又は、アプリケーションAからアプリケーションBに誤って分岐する、等が生じた場合、アプリケーションBの実行動作が不安定となり、マイクロコンピュータMCU全体としての動作も不安定となる。   FIG. 34 shows memory protection. When application A and application B are assigned a memory area for application A and a memory area for application B, respectively, application A erroneously accesses the memory area for application B and rewrites data used by application B Or, if an accidental branch from the application A to the application B occurs, the execution operation of the application B becomes unstable, and the operation of the microcomputer MCU as a whole becomes unstable.

斯かる事態の発生を防止するために、メモリプロテクションユニットを有し、アプリケーションAがアプリケーションB用のメモリ領域へアクセスし、または、アプリケーションAからアプリケーションBへ分岐する、等を防止する。これにより、アプリケーションBの実行動作が不安定になることが防止され、マイクロコンピュータMCU全体としての動作も安定化させることが可能となる。   In order to prevent the occurrence of such a situation, a memory protection unit is provided to prevent the application A from accessing the memory area for the application B or branching from the application A to the application B. As a result, the execution operation of the application B is prevented from becoming unstable, and the operation of the microcomputer MCU as a whole can be stabilized.

図35は、エンディアン変換命令の例を示す。   FIG. 35 shows an example of the endian conversion instruction.

実施の形態3及び実施の形態4としてデータのバイエンディアン処理について記載したが、リトルエンディアンとしてデータ処理されるメモリ領域に格納されているデータを汎用レジスタに読出し所定の演算を行った後、ビッグエンディアンとしてデータ処理されるメモリ領域又はビッグエンディアン用周辺I/O装置へデータの転送をすることも生じる。斯かる場合、アライナ11への制御信号CNT1又はアライナ13への制御信号CNT2を設定することにより、アライナ11又はアライナ13でデータの並びを変更することも可能である。ある程度連続してデータの変換を行う場合には、アライナ11又はアライナ13により、データの並びを変更することが有効である。   The bi-endian processing of data has been described as the third and fourth embodiments. However, after the data stored in the memory area to be processed as little endian is read into a general-purpose register and subjected to a predetermined operation, the big endian processing is performed. As a result, data may be transferred to a memory area where data processing is performed or a peripheral I / O device for big endian. In such a case, by setting the control signal CNT1 to the aligner 11 or the control signal CNT2 to the aligner 13, it is possible to change the arrangement of data in the aligner 11 or the aligner 13. When data conversion is performed continuously to some extent, it is effective to change the data arrangement by the aligner 11 or the aligner 13.

一方で、データをリトルエンディアンとビッグエンディアンとに交互に変換してメモリ領域に格納するような場合では、アライナ11又はアライナ13を交互にエンディアン変換するように設定する必要がある。そのような場合には、エンディアン変換命令によりレジスタ内でデータのエンディアンを変換し、アライナ11及びアライナ13の設定は変更しないほうが、アライナ11又はアライナ13の設定変更に係る消費電力を低減することが可能となる場合もある。   On the other hand, in the case where data is alternately converted into little endian and big endian and stored in the memory area, it is necessary to set the aligner 11 or aligner 13 to perform endian conversion alternately. In such a case, it is possible to reduce the power consumption related to the setting change of the aligner 11 or the aligner 13 by converting the endian of the data in the register by the endian conversion instruction and not changing the settings of the aligner 11 and the aligner 13. It may be possible.

図36、図37及び図38は、マイクロコンピュータMCUの低消費電力化のための設計方法についての例を示す。   36, 37 and 38 show an example of a design method for reducing the power consumption of the microcomputer MCU.

フリップフロップなどのクロック同期動作をする論理素子やクロック供給経路に配置されるクロックドライバはクロックが供給されている限り電流を流すため、使用しない回路に対してクロックの供給を停止することが必要である。そのため、図36に示すように、マイクロコンピュータMCUの論理合成を行う時点でクロックゲーティング回路を挿入し、クロック供給を停止できるようにする。   Since logic elements such as flip-flops and clock drivers placed in the clock supply path flow current as long as the clock is supplied, it is necessary to stop supplying the clock to unused circuits. is there. Therefore, as shown in FIG. 36, a clock gating circuit is inserted when logic synthesis of the microcomputer MCU is performed so that the clock supply can be stopped.

次に、クロック同期設計において、クロック同期動作をするフリップフロップに挟むようにクロック非同期動作をする論理素子を配置した場合、フリップフロップ間でタイミングバイオレーションを起こした経路(クリティカルパス)が生じ、斯かるタイミングバイオレーションを解消する必要がある。図37に示すように、最初に低速の高しきい値電圧/低リーク電流の論理素子を用いてクロック同期設計を行い、クリティカルパスに対してのみ、低しきい値電圧/高リーク電流の高速の論理素子を使用し、タイミングバイオレーションの解消を図る。斯かるクロック同期設計を行うことにより、マイクロコンピュータMCUを構成する多数の論理素子は低消費電力の論理素子となり、低消費電力論理素子では、タイミングバイオレーションを生じる経路はより高い消費電力でより高速の論理素子を用い、全体として低消費電力となるマイクロコンピュータMCUのクロック同期設計が可能となる。   Next, in the clock synchronous design, when a logic element that performs clock asynchronous operation is arranged so as to be sandwiched between flip-flops that perform clock synchronous operation, a path (critical path) that causes timing violation occurs between the flip-flops. It is necessary to eliminate such timing violation. As shown in FIG. 37, first, clock synchronous design is performed using a low-speed high threshold voltage / low leakage current logic element, and a low threshold voltage / high leakage current is high speed only for the critical path. To eliminate timing violation. By performing such a clock synchronous design, a large number of logic elements constituting the microcomputer MCU become low-power consumption logic elements, and in the low-power consumption logic elements, the path for generating timing violation is faster with higher power consumption. This makes it possible to design a clock synchronization of the microcomputer MCU that consumes less power as a whole.

また、図38に示すように、マイクロコンピュータMCUの内部を複数の電源ドメインに分割し、動作していない電源ドメインに対する電源供給を停止するよう、複数の低消費電力モードを持たせる。この場合、マイクロコンピュータMCU内部の内蔵レギュレータは電源ドメイン夫々に電源を供給し、内蔵レギュレータから電源ドメインの間に当該電源ドメインへ電源供給し又は停止するスイッチ回路を配置する。   Further, as shown in FIG. 38, the inside of the microcomputer MCU is divided into a plurality of power supply domains, and a plurality of low power consumption modes are provided so as to stop the power supply to the non-operating power supply domains. In this case, the built-in regulator inside the microcomputer MCU supplies power to each power domain, and a switch circuit that supplies power to the power domain or stops is arranged between the built-in regulator and the power domain.

図39は、プログラムを格納するROMとしてFlashメモリを使用した場合の、FlashメモリのアクセススピードがマイクロコンピュータMCUの処理性能に与える影響を示す図である。30MHzで読み出し動作可能なFlashメモリをマイクロコンピュータMCUに使用した場合、マイクロコンピュータMCUを100MHzのクロックで動作させたとしても命令フェッチの毎に複数クロックサイクルのウェイト動作が必要となり、プログラムの実効的な実行性能は100MHzから大幅に低下することとなる。   FIG. 39 is a diagram showing the influence of the access speed of the flash memory on the processing performance of the microcomputer MCU when the flash memory is used as the ROM for storing the program. When a flash memory that can be read at 30 MHz is used for the microcomputer MCU, even if the microcomputer MCU is operated with a clock of 100 MHz, a wait operation of a plurality of clock cycles is required every time an instruction is fetched. Execution performance will drop significantly from 100 MHz.

斯かる実行性能の低下を回避するために、FlashメモリとCPU1との間に命令キャッシュメモリを配置することが考えられる。命令キャッシュメモリを配置することで、CPU1が命令キャッシュメモリに格納されている命令をフェッチする場合(キャッシュヒット)は1クロックサイクルでの命令フェッチが可能であるが、命令が命令キャッシュメモリに格納されていない場合(キャッシュミスヒット)は複数クロックサイクルでのウェイト動作が必要となり、また、命令キャッシュメモリの占める面積が必要となる。   In order to avoid such a decrease in execution performance, it is conceivable to arrange an instruction cache memory between the flash memory and the CPU 1. By arranging the instruction cache memory, when the CPU 1 fetches an instruction stored in the instruction cache memory (cache hit), the instruction can be fetched in one clock cycle, but the instruction is stored in the instruction cache memory. If not (cache miss hit), a wait operation in a plurality of clock cycles is required, and the area occupied by the instruction cache memory is required.

Flashメモリのメモリアレイ構成、アドレスデコーダ等の周辺論理回路の高速化によりFlashメモリは100MHzで動作可能となるようになり、CPU1は命令キャッシュメモリを有さずに毎クロックサイクル動作が可能となる。また、マイクロコンピュータMCUの動作クロックがより高速化した場合でも、キャッシュミスヒットを生じた場合のウェイトするクロックサイクル数を削減することが可能となる。   The flash memory can be operated at 100 MHz by increasing the memory array configuration of the flash memory and the speed of peripheral logic circuits such as an address decoder, and the CPU 1 can operate every clock cycle without having an instruction cache memory. In addition, even when the operation clock of the microcomputer MCU is further increased, it is possible to reduce the number of clock cycles to wait when a cache miss hit occurs.

実施の形態6で記載されるマイクロコンピュータMCUやCPU1の構成、機能、動作等は、実施の形態1〜4のマイクロコンピュータMCUやCPU1に適用できることはいうまでもない。   It goes without saying that the configuration, function, operation, and the like of the microcomputer MCU and CPU 1 described in the sixth embodiment can be applied to the microcomputer MCU and CPU 1 of the first to fourth embodiments.

以上、本発明の実施の形態を詳細に開示し記述したが、以上の記述は本発明の適用可能な局面を例示したものであって、本発明はこれに限定されるものではない。即ち、記述した局面に対する様々な修正や変形例を、この発明の範囲から逸脱することの無い範囲内で考えることが可能である。   While the embodiments of the present invention have been disclosed and described in detail above, the above description exemplifies aspects to which the present invention can be applied, and the present invention is not limited thereto. In other words, various modifications and variations to the described aspects can be considered without departing from the scope of the present invention.

1 CPU、2 アドレスバス、3 データバス、4 メモリ、5 命令バス、9 レジスタ、11,13 アライナ、14 ビッグエンディアン用周辺データバス、17 リトルエンディアン用周辺データバス、BSC バスコントローラ、INTC 割込みコントローラ、PC プログラムカウンタ、IR 命令レジスタ、iDec 命令デコーダ 1 CPU, 2 address bus, 3 data bus, 4 memory, 5 instruction bus, 9 registers, 11, 13 aligner, 14 big endian peripheral data bus, 17 little endian peripheral data bus, BSC bus controller, INTC interrupt controller, PC program counter, IR instruction register, iDec instruction decoder

Claims (8)

レジスタを有するCPUと、
バスと、
割込み制御部と、
メモリとを備え、
CPUは前記バスを介して前記メモリから命令を取得し当該命令に応じた動作制御を行い、前記割込み制御部からの割込み通知に応じて当該割込み通知に応じた処理を行うために割込み処理プログラムの格納アドレスを取得し、
前記メモリは第1プログラムと前記第1プログラムでの処理に用いられる第1データを格納する第1領域と、第2プログラムと前記第2プログラムでの処理に用いられる第2データを格納する第2領域と、前記割込み処理プログラムを格納する第3領域と、前記割込み処理プログラムの格納アドレスを格納する第4領域とに分割され、
前記第1プログラムと前記第2プログラムとは夫々の処理におけるデータのエンディアンが異なり、
前記第1プログラムの実行中であるか前記第2プログラムの実行中であるかに係りなく、前記メモリから前記割込み処理プログラムの格納アドレスを取得するためのデータ転送において、前記メモリから前記バスに出力されたデータのバイト単位での順序を変更することなく取得可能とされる半導体集積回路装置。
A CPU having a register;
With bus,
An interrupt controller;
With memory,
The CPU acquires an instruction from the memory via the bus, performs operation control according to the instruction, and executes an interrupt processing program in order to perform processing according to the interrupt notification according to the interrupt notification from the interrupt control unit. Get the storage address,
The memory stores a first area for storing first data used for processing in the first program and the first program, and a second area for storing second data used for processing in the second program and the second program. Divided into an area, a third area for storing the interrupt processing program, and a fourth area for storing a storage address of the interrupt processing program;
The first program and the second program have different endian data in each processing,
Regardless of whether the first program is being executed or the second program is being executed, in the data transfer for obtaining the storage address of the interrupt processing program from the memory, output from the memory to the bus A semiconductor integrated circuit device that can be obtained without changing the order of the data in byte units.
前記割込み処理プログラムの格納アドレスは、前記バスを介して一度のデータ転送において転送可能なデータサイズであり、前記割込み処理プログラムの格納アドレスは一度のデータ転送により前記CPUへ転送される請求項1の半導体集積回路装置。   The storage address of the interrupt processing program has a data size that can be transferred in one data transfer via the bus, and the storage address of the interrupt processing program is transferred to the CPU by one data transfer. Semiconductor integrated circuit device. 前記第1プログラムの実行中において前記第1データを前記割込み処理プログラムの格納アドレスと同じデータサイズで一度のデータ転送により取得する場合と、前記第2プログラムの実行中において前記第2データを前記割込み処理プログラムの格納アドレスと同じデータサイズで一度のデータ転送により取得する場合とにおいて、前記メモリから前記バスに出力されたデータのバイト単位での順序を変更することなく前記レジスタへ転送し処理可能であり、
前記第1プログラムの実行中において前記第1データを前記割込み処理プログラムの格納アドレスと異なるデータサイズで一度のデータ転送により取得する場合と、前記第2プログラムの実行中において前記第2データを前記割込み処理プログラムの格納アドレスと異なるデータサイズで一度のデータ転送により取得する場合とにおいて、前記メモリから前記バスに出力されたデータのバイト単位での順序を変更して前記レジスタへ転送することにより処理可能である請求項1の半導体集積回路装置。
When the first data is acquired by a single data transfer with the same data size as the storage address of the interrupt processing program during execution of the first program, and the second data is acquired by the interrupt during execution of the second program In the case of acquiring by one-time data transfer with the same data size as the storage address of the processing program, it can be transferred and processed to the register without changing the order of data output from the memory to the bus in byte units. Yes,
When the first data is acquired by a single data transfer with a data size different from the storage address of the interrupt processing program during execution of the first program, and the second data is acquired by the interrupt during execution of the second program Processing can be performed by changing the order of data output from the memory to the bus in byte units and transferring it to the register when the data is acquired at a single data size different from the storage address of the processing program The semiconductor integrated circuit device according to claim 1.
前記バスは、前記命令を取得するために用いられる命令バスと前記第1データ又は前記第2データのデータ転送に用いられるデータバスとを有し、
前記割込み通知に応じての前記割り込み処理プログラムの格納アドレスの取得は前記データバスを用いて行われる請求項1の半導体集積回路装置。
The bus has an instruction bus used for acquiring the instruction and a data bus used for data transfer of the first data or the second data;
2. The semiconductor integrated circuit device according to claim 1, wherein acquisition of a storage address of the interrupt processing program in response to the interrupt notification is performed using the data bus.
前記バスは、メモリとの間でのデータ転送においてデータのバイト単位での順序を変更するためのアライナに接続される請求項1の半導体集積回路装置。   2. The semiconductor integrated circuit device according to claim 1, wherein the bus is connected to an aligner for changing the order of data in units of bytes in data transfer with the memory. 前記アライナは、前記第1データの取得であるか前記第2データの取得であるかの識別情報とデータ転送サイズを示す情報とから生成される制御信号を供給され、データのバイト単位での順序の変更を制御する請求項5の半導体集積回路装置。   The aligner is supplied with a control signal generated from identification information indicating whether the acquisition of the first data or the acquisition of the second data and information indicating the data transfer size, and the order of the data in byte units 6. The semiconductor integrated circuit device according to claim 5, wherein the change of the control is controlled. 前記バスは第2アライナに接続され、
前記第2アライナは第1周辺バスを介して第1周辺回路に接続され、第2周辺バスを介して第2周辺回路に接続され、
前記第1周辺回路と前記第2周辺回路とは夫々での処理におけるデータのエンディアンが異なり、
前記第2アライナは前記第1周辺回路又は前記第2周辺回路と前記レジスタ若しくは前記メモリとの間でのデータ転送において、前記割込み処理プログラムの格納アドレスを取得するためのデータ転送サイズでのデータ転送では前記第1周辺バスまたは前記第2周辺バスに出力されたデータのバイト単位での順序を変更しないデータ転送の制御を行い、前記割込み処理プログラムの格納アドレスを取得するためのデータ転送サイズと異なる転送サイズでのデータ転送では前記第1周辺バスまたは前記第2周辺バスのいずれか一方に出力されたデータのバイト単位での順序を変更するデータ転送の制御を行う請求項1の半導体集積回路装置。
The bus is connected to a second aligner;
The second aligner is connected to the first peripheral circuit via the first peripheral bus, and is connected to the second peripheral circuit via the second peripheral bus;
The first peripheral circuit and the second peripheral circuit have different endian data in the processing in each,
In the data transfer between the first peripheral circuit or the second peripheral circuit and the register or the memory, the second aligner performs data transfer with a data transfer size for acquiring a storage address of the interrupt processing program. Is different from the data transfer size for controlling the data transfer without changing the byte order of the data output to the first peripheral bus or the second peripheral bus and obtaining the storage address of the interrupt processing program. 2. The semiconductor integrated circuit device according to claim 1, wherein in data transfer at a transfer size, control of data transfer is performed to change the order of data output to either the first peripheral bus or the second peripheral bus in byte units. .
前記第1周辺回路は前記第1プログラムにより制御され、前記第2周辺回路は前記第2プログラムにより制御される請求項7の半導体集積回路装置。   8. The semiconductor integrated circuit device according to claim 7, wherein the first peripheral circuit is controlled by the first program, and the second peripheral circuit is controlled by the second program.
JP2014078466A 2008-09-12 2014-04-07 Semiconductor integrated circuit device Active JP5802791B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014078466A JP5802791B2 (en) 2008-09-12 2014-04-07 Semiconductor integrated circuit device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2008234768 2008-09-12
JP2008234768 2008-09-12
JP2014078466A JP5802791B2 (en) 2008-09-12 2014-04-07 Semiconductor integrated circuit device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013121448A Division JP5521092B2 (en) 2008-09-12 2013-06-10 Data processing device

Publications (2)

Publication Number Publication Date
JP2014179107A true JP2014179107A (en) 2014-09-25
JP5802791B2 JP5802791B2 (en) 2015-11-04

Family

ID=42005057

Family Applications (3)

Application Number Title Priority Date Filing Date
JP2010528678A Active JP5292406B2 (en) 2008-09-12 2009-05-28 Semiconductor integrated circuit device
JP2013121448A Active JP5521092B2 (en) 2008-09-12 2013-06-10 Data processing device
JP2014078466A Active JP5802791B2 (en) 2008-09-12 2014-04-07 Semiconductor integrated circuit device

Family Applications Before (2)

Application Number Title Priority Date Filing Date
JP2010528678A Active JP5292406B2 (en) 2008-09-12 2009-05-28 Semiconductor integrated circuit device
JP2013121448A Active JP5521092B2 (en) 2008-09-12 2013-06-10 Data processing device

Country Status (5)

Country Link
US (1) US9524237B2 (en)
JP (3) JP5292406B2 (en)
CN (2) CN102150139A (en)
TW (2) TWI476597B (en)
WO (1) WO2010029794A1 (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4437464B2 (en) 2005-06-01 2010-03-24 株式会社ルネサステクノロジ Semiconductor device and data processing system
JP5622429B2 (en) * 2010-04-20 2014-11-12 ルネサスエレクトロニクス株式会社 Microcomputer
US8578340B1 (en) 2010-09-24 2013-11-05 Ca, Inc. Recording and replaying computer program execution with recorded execution event breakpoints
US9762246B2 (en) * 2011-05-20 2017-09-12 Semiconductor Energy Laboratory Co., Ltd. Semiconductor device with a storage circuit having an oxide semiconductor
FR2977371B1 (en) * 2011-06-30 2013-08-02 Trixell PIXEL MATRIX WITH PROGRAMMABLE GROUPS
CN103576739A (en) * 2012-08-02 2014-02-12 中兴通讯股份有限公司 Digital chip, device provided with digital chip and little-endian big-endian mode configuration method
CN102968330B (en) * 2012-11-27 2015-08-19 武汉大学 A kind of disposal route of firmware code dis-assembling middle-end pattern differentials
US10120682B2 (en) * 2014-02-28 2018-11-06 International Business Machines Corporation Virtualization in a bi-endian-mode processor architecture
US9507595B2 (en) * 2014-02-28 2016-11-29 International Business Machines Corporation Execution of multi-byte memory access instruction specifying endian mode that overrides current global endian mode
US9619214B2 (en) 2014-08-13 2017-04-11 International Business Machines Corporation Compiler optimizations for vector instructions
JP6372250B2 (en) * 2014-08-25 2018-08-15 サンケン電気株式会社 Arithmetic processing unit
US9588746B2 (en) 2014-12-19 2017-03-07 International Business Machines Corporation Compiler method for generating instructions for vector operations on a multi-endian processor
US10169014B2 (en) 2014-12-19 2019-01-01 International Business Machines Corporation Compiler method for generating instructions for vector operations in a multi-endian instruction set
US9880821B2 (en) 2015-08-17 2018-01-30 International Business Machines Corporation Compiler optimizations for vector operations that are reformatting-resistant
US9594668B1 (en) 2015-09-04 2017-03-14 International Business Machines Corporation Debugger display of vector register contents after compiler optimizations for vector instructions
CN105404496B (en) * 2015-11-06 2018-11-16 深圳国微技术有限公司 The control method and control device of data transmission and the microprocessor with it
US10079067B1 (en) * 2017-09-07 2018-09-18 Winbond Electronics Corp. Data read method and a non-volatile memory apparatus using the same
CN109977061B (en) * 2017-12-28 2023-04-11 中兴通讯股份有限公司 Interrupt processing method and interrupt processing device
CN110647355B (en) * 2018-06-27 2021-11-26 上海寒武纪信息科技有限公司 Data processor and data processing method
TWI749724B (en) * 2020-08-21 2021-12-11 和碩聯合科技股份有限公司 Electronic circuit system
JP2023044909A (en) * 2021-09-21 2023-04-03 株式会社日立製作所 Processor and endian conversion method

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63211019A (en) * 1987-02-27 1988-09-01 Hitachi Ltd Data transfer circuit
JPH0336643A (en) * 1989-07-03 1991-02-18 Nec Corp Data processing method
JPH06124201A (en) * 1990-08-09 1994-05-06 Mips Computer Syst Inc Method and device for byte-order switching in computer
JPH0863425A (en) * 1994-08-02 1996-03-08 Motorola Inc Interbus buffer
JPH08278918A (en) * 1995-02-24 1996-10-22 Internatl Business Mach Corp <Ibm> System and method for execution of endian task
JPH08314733A (en) * 1995-02-24 1996-11-29 Internatl Business Mach Corp <Ibm> Computer system and method for support of two endians
JPH0997211A (en) * 1995-09-29 1997-04-08 Matsushita Electric Ind Co Ltd Bus controller and information processor provided with the same
US5734910A (en) * 1995-12-22 1998-03-31 International Business Machines Corporation Integrating multi-modal synchronous interrupt handlers for computer system
US5961640A (en) * 1997-04-22 1999-10-05 Vlsi Technology, Inc. Virtual contiguous FIFO having the provision of packet-driven automatic endian conversion
JP2000003304A (en) * 1998-06-12 2000-01-07 Nec Corp Data processor and data aligner
JP2000082009A (en) * 1998-09-04 2000-03-21 Hitachi Ltd Data processor
JP2000235503A (en) * 1999-02-16 2000-08-29 Hitachi Ltd Operating system and computer
JP2005174296A (en) * 2003-12-09 2005-06-30 Arm Ltd Endian compensation in simd data processing system
JP2008500635A (en) * 2004-05-26 2008-01-10 フリースケール セミコンダクター インコーポレイテッド Endianness control method and apparatus in data processing system
JP2008033722A (en) * 2006-07-31 2008-02-14 Matsushita Electric Ind Co Ltd Data transfer control device with endian conversion circuit
US20080114969A1 (en) * 2006-11-01 2008-05-15 Gonion Jeffry E Instructions for efficiently accessing unaligned partial vectors

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4446373B2 (en) * 2003-03-19 2010-04-07 パナソニック株式会社 Processor, data sharing device
US6993619B2 (en) * 2003-03-28 2006-01-31 International Business Machines Corporation Single request data transfer regardless of size and alignment
US20080040576A1 (en) * 2006-08-09 2008-02-14 Brian Michael Stempel Associate Cached Branch Information with the Last Granularity of Branch instruction in Variable Length instruction Set

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63211019A (en) * 1987-02-27 1988-09-01 Hitachi Ltd Data transfer circuit
JPH0336643A (en) * 1989-07-03 1991-02-18 Nec Corp Data processing method
JPH06124201A (en) * 1990-08-09 1994-05-06 Mips Computer Syst Inc Method and device for byte-order switching in computer
JPH0863425A (en) * 1994-08-02 1996-03-08 Motorola Inc Interbus buffer
JPH08278918A (en) * 1995-02-24 1996-10-22 Internatl Business Mach Corp <Ibm> System and method for execution of endian task
JPH08314733A (en) * 1995-02-24 1996-11-29 Internatl Business Mach Corp <Ibm> Computer system and method for support of two endians
JPH0997211A (en) * 1995-09-29 1997-04-08 Matsushita Electric Ind Co Ltd Bus controller and information processor provided with the same
US5734910A (en) * 1995-12-22 1998-03-31 International Business Machines Corporation Integrating multi-modal synchronous interrupt handlers for computer system
US5961640A (en) * 1997-04-22 1999-10-05 Vlsi Technology, Inc. Virtual contiguous FIFO having the provision of packet-driven automatic endian conversion
JP2000003304A (en) * 1998-06-12 2000-01-07 Nec Corp Data processor and data aligner
JP2000082009A (en) * 1998-09-04 2000-03-21 Hitachi Ltd Data processor
JP2000235503A (en) * 1999-02-16 2000-08-29 Hitachi Ltd Operating system and computer
JP2005174296A (en) * 2003-12-09 2005-06-30 Arm Ltd Endian compensation in simd data processing system
JP2008500635A (en) * 2004-05-26 2008-01-10 フリースケール セミコンダクター インコーポレイテッド Endianness control method and apparatus in data processing system
JP2008033722A (en) * 2006-07-31 2008-02-14 Matsushita Electric Ind Co Ltd Data transfer control device with endian conversion circuit
US20080114969A1 (en) * 2006-11-01 2008-05-15 Gonion Jeffry E Instructions for efficiently accessing unaligned partial vectors

Also Published As

Publication number Publication date
US9524237B2 (en) 2016-12-20
JP5521092B2 (en) 2014-06-11
CN105893270A (en) 2016-08-24
TW201530320A (en) 2015-08-01
TW201020795A (en) 2010-06-01
JP5802791B2 (en) 2015-11-04
JPWO2010029794A1 (en) 2012-02-02
JP5292406B2 (en) 2013-09-18
TWI476597B (en) 2015-03-11
WO2010029794A1 (en) 2010-03-18
TWI541658B (en) 2016-07-11
CN102150139A (en) 2011-08-10
US20110191569A1 (en) 2011-08-04
JP2013229039A (en) 2013-11-07

Similar Documents

Publication Publication Date Title
JP5802791B2 (en) Semiconductor integrated circuit device
JP2834837B2 (en) Programmable controller
US8521989B2 (en) Programmable and scalable microcontroller architecture
US6539467B1 (en) Microprocessor with non-aligned memory access
JP2816248B2 (en) Data processor
JP2009223897A (en) Eight-bit microcontroller having risc architecture
JPH0766324B2 (en) Data processing device
JP2001092662A (en) Processor core and processor using the same
JPH0810428B2 (en) Data processing device
JPH03216776A (en) Integrated circuit device and microprocessor consisting of this circuit device
JP2006313561A (en) Data processor
US6012138A (en) Dynamically variable length CPU pipeline for efficiently executing two instruction sets
JP2004086837A (en) Data processor
JP4073721B2 (en) Data processing device
JP2504235B2 (en) Data processing device
JPH0922379A (en) Microcomputer
JP3839835B2 (en) Data processing apparatus and microcomputer
JP3760093B2 (en) Microcomputer
JP3740321B2 (en) Data processing device
JP3539914B2 (en) Microcomputer
JP3147884B2 (en) Storage device and information processing device
JP3539951B2 (en) Data processing device
JP2696578B2 (en) Data processing device
JP4382076B2 (en) Data processing device
JPH08263290A (en) Data processor

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150526

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150723

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150804

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150831

R150 Certificate of patent or registration of utility model

Ref document number: 5802791

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150