WO1998044410A1 - Microcomputer and electronic equipment - Google Patents

Microcomputer and electronic equipment Download PDF

Info

Publication number
WO1998044410A1
WO1998044410A1 PCT/JP1998/001515 JP9801515W WO9844410A1 WO 1998044410 A1 WO1998044410 A1 WO 1998044410A1 JP 9801515 W JP9801515 W JP 9801515W WO 9844410 A1 WO9844410 A1 WO 9844410A1
Authority
WO
WIPO (PCT)
Prior art keywords
extension
data
processing
processing data
information processing
Prior art date
Application number
PCT/JP1998/001515
Other languages
French (fr)
Japanese (ja)
Inventor
Makoto Kudo
Yoshiyuki Miyayama
Satoshi Kubota
Original Assignee
Seiko Epson Corporation
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 Seiko Epson Corporation filed Critical Seiko Epson Corporation
Publication of WO1998044410A1 publication Critical patent/WO1998044410A1/en

Links

Classifications

    • 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/3004Arrangements for executing specific machine instructions to perform operations on memory
    • G06F9/30043LOAD or STORE instructions; Clear instruction

Definitions

  • the present invention relates to a microcomputer and an electronic device. [Background technology]
  • Such a data extension process is not so problematic for ordinary data.
  • a one-byte data representing a number for calculation is read as a signed data for subtraction, and this is extended to a signed 32-bit data, an expensive barrel shifter or the like is used.
  • the present invention has been made in view of such problems, and an object of the present invention is to provide a microcomputer capable of easily and quickly expanding signed data and an electronic device using the same. Is to do.
  • the microcomputer of the present invention performs at least one of zero extension and sign extension on the processing data according to the data size, and performs a given processing.
  • An information processing unit including an instruction decoding unit that decodes a load instruction to be transferred to a register, and outputs a control signal corresponding to a size of the processing data and a format of the extended processing;
  • An extension unit connected to the information processing unit, performing at least one of an extension process of zero extension and a sine extension on the processing data to a predetermined number of processing bits according to the control signal, and outputting the processed data to the information processing unit
  • microcomputer of the present invention is:
  • Information processing means for decoding an object code of the load instruction, outputting a data read address signal, and outputting an extension control signal corresponding to the size and extension format of the processing data;
  • the processing data read from the processing data storage means based on the data read address signal is connected to the information processing means, and the processing data read from the processing data storage means is zero-extended and signed to a predetermined processing bit number in accordance with the extension control signal
  • An extension unit that performs at least one extension process of the extension and outputs the information to the information processing unit;
  • microcomputer is characterized by including.
  • the microcomputer is
  • First storage means in which various object codes including the object code are stored
  • a second storage unit serving as the processing data storage unit, wherein the processing data is stored in association with a data read address
  • Command reading means provided in the information processing means for controlling reading of an object code from the first storage means
  • first and second storage means are connected to the information processing means via a bus line
  • the instruction decoding means includes
  • the extension means includes:
  • the processing data read from the second storage unit based on the data read address signal is subjected to at least one of zero extension and sign extension to a predetermined number of processing bits according to the extension control signal and output. It is preferable to form it.
  • microcomputer of the present invention comprises:
  • a load instruction for transferring processing data stored in a first register inside the information processing means to a second registry inside the information processing means, and specifying a size of the processing data A microcomputer for interpreting and executing the object code of the load instruction, the data including a data for performing an extension process and a data for specifying an extension format for sign extension.
  • Instruction decoding means for decoding an object code of the load instruction, reading and outputting processed data from the first register, and outputting an extended control signal corresponding to the data size and extended format.
  • Information processing means, and processing data connected to the information processing means and read from the first registry.
  • Extension means for performing at least one of zero extension and sign extension up to a predetermined number of processing bits according to the extension control signal in the evening, and outputting the result to the information processing means;
  • the information processing means includes:
  • the extended data is written in a second register.
  • the microcomputer is
  • First storage means for storing various object codes including the object code
  • Command reading means provided in the information processing means for controlling reading of an object code from the first storage means
  • the first storage means is formed so as to be connected to the information processing means via a bus line.
  • a dedicated load instruction for reading processing data, signing or zero-extending the processing data and loading the data at a given register, and a dedicated extension for executing the extension processing are provided.
  • zero extension and sign extension of the processing data can be performed at high speed.
  • Decoding of a dedicated instruction for signing or zero-extending the processing data is performed by an instruction decoding means provided inside the information processing means, and expansion of the processing data based on the decoding result is formed separately from the information processing means. It employs a configuration that performs it within one instruction cycle using the extended means. Therefore, since it is not necessary to provide the extension means inside the information processing means, for example, inside the CPU of the microcomputer, the CPU itself can be made small and inexpensive.
  • First storage means for storing various object codes including the object codes
  • a second storage unit as the processing data storage unit, wherein the processing data is stored in association with a data read address
  • Information processing means connected to the first and second storage means via a bus line;
  • An expansion unit connected to the information processing unit via a bus line, performing expansion processing on the processing data, and outputting the processed data to the information processing unit;
  • the information processing means includes:
  • Command reading means for controlling reading of an object code from the first storage means
  • Instruction decoding means for decoding the read first and second object codes; and a plurality of registers functioning as the first and second register codes;
  • the instruction decoding means includes
  • the extension means includes:
  • Processing data read from the second storage means based on the overnight read address signal is subjected to at least one of zero extension and sign extension to a predetermined number of processing bits in accordance with the extension control signal. And output to the information processing means.
  • the processing data read from the first register is subjected to at least one of extension processing of zero extension and sign extension up to a predetermined number of processing bits in accordance with the extension control signal.
  • the information processing means includes:
  • the data that has been extended according to the second command is written in a second register.
  • the first load instruction for zero-extending and sign-extending the processing data stored in the processing data storage means and transferring it to a given register and the first load instruction inside the information processing means
  • the processing of expanding the processing data is information. This can be performed by using a common extension means provided outside the processing means.
  • the information processing means for example, the microcomputer itself can be made small and inexpensive, and the processing data inside the CPU and expansion of the external processing data can be expanded at high speed in accordance with the load instruction. It is possible to do.
  • the expanding means includes:
  • Zero extension means for performing zero extension on the read processing data and sign extension means for performing sign extension for each of the data sizes; And selecting means for selecting and outputting the output of each of the extension means in accordance with the extension control signal.
  • a zero extension means for zero-extending the processing data and a sign extension means for sign extension are provided for each data size.
  • the processing data is output by performing zero extension or sign extension using the extension means of the bit size selected according to the extension control signal.
  • the sign extension means includes means for outputting the processing data as it is, and means for outputting all higher-order extended bit data of the processing data as a signed signal. It is preferable to configure.
  • the zero extension means includes means for outputting the processing data as it is, and means for outputting the extension bit data higher than the processing data as a signal corresponding to all zeros.
  • the microcomputer has a bus control unit that controls the normal bus line. Therefore, it is preferable that the extension means is configured as a part of the circuit of the path control unit in order to increase the integration degree of the entire circuit.
  • microcomputer of the present invention be formed as a RISC system.
  • RISC microcomputers are designed to reduce the size of hardware and increase the speed. For this reason, many general-purpose registers are provided, and the number of instructions can be reduced by narrowing the instruction set to those with high versatility. It is preferable that the microcomputer of the present invention is formed so as to decode a fixed-length instruction and execute an execution process based on the instruction. The use of fixed-length instructions can reduce the time required to decode the instructions and reduce the circuit size of the microcomputer compared to the case of using variable-length instructions. In order to prevent the formation of redundant parts and to use the memory efficiently, it is preferable that the number of bits required for each instruction has little variation and is as short as possible.
  • the electronic device of the present invention is preferably formed so as to include the above-described microcombination of the present invention.
  • an inexpensive and high-performance electronic device can be provided because the microcomputer incorporates a high-speed and inexpensive microcomputer.
  • FIG. 1 is a functional block diagram illustrating a preferred embodiment of a microcomputer to which the present invention is applied.
  • 2A to 2F are explanatory diagrams of a specific configuration of an extension circuit built in the microcomputer.
  • FIG. 3A is an explanatory diagram of a multiplexer for selecting outputs of a plurality of extension circuits
  • FIG. 3B is a functional block diagram of another embodiment.
  • 4A to 4E are explanatory diagrams showing a spoken instruction in a 21-monic format.
  • Figure 5 is an explanatory diagram for sign extension and zero extension of 8-bit processed data.
  • FIG. 6 is an explanatory diagram in the case of sign extension and zero extension of 8-bit processing data.
  • FIG. 7 is a specific functional block diagram of the microcomputer according to the present embodiment.
  • FIG. 8 is an explanatory diagram of a spoken command used in another embodiment of the present embodiment.
  • FIG. 1 shows an electronic circuit according to the present embodiment.
  • This electronic circuit includes a microphone computer 10 and external ROMs 12 and RAMs 14, which are connected via an external address bus 16 and an external data bus 18.
  • the microcomputer 10 includes a CPU 20, an internal ROM 22 in which various instructions are stored as object codes, an internal RAM 24 in which various processing data are stored, and a bus control unit 26. Be composed.
  • the microcomputer 10 has a 32-bit instruction address bus 30, a 16-bit instruction data bus 32, a 32-bit data address bus 34, and a 32-bit two-bit write bus. Buses 36a and 36b for connection and reading, and these buses 30 to 36 connect between the CPU 20 and the bus control unit 26.
  • the microcomputer 10 has two sets of a 32-bit instruction address bus 84, a 16-bit instruction data bus 86, a 32-bit data address bus 80, and a 32-bit data bus. It includes write and read data buses 82a and 82b, and these buses 80 to 86 connect between the RAM 24 and the bus control unit 26.
  • the bus control unit 26 inputs / outputs data from / to the ROM 22 and the RAM 24 based on various request signals (signals output to the bus, etc.) output from the CPU 20, and controls an external address bus 16, This external circuit via external bus 18, for example ROM 12, 18 ⁇ 114. ? Controls the input and output of data between 1120.
  • the CPU 20 includes an instruction reading unit 42 that outputs an address signal for reading various instructions as object codes from the ROM 22, and an instruction that decodes the object codes read from the ROM 22 and outputs various control signals. It comprises a decryption unit 40 and a general-purpose registry group 4 for storing various addresses and processing data.
  • the instruction reading unit 42 includes a program counter and the like.
  • the microcomputer 10 of the present embodiment especially its CPU 20 It is formed as a RISC system that can handle all nighttime data.
  • the CPU 20 of the present embodiment executes almost all instructions in one cycle by a pipeline and a load / store type architecture. All the instructions are described in a fixed length of 16 bits, and the instructions processed by the CPU 20 are configured to have an extremely small object code size.
  • all instructions are described as 16-bit fixed-length object codes.
  • Each object code is specified by a 32-bit address signal output from the instruction reading unit 42 via the instruction address bus 30.
  • the 16-bit object code thus read out is decoded by the instruction decoding unit 40 of the CPU 20 via the instruction data bus 32, and various arithmetic processes according to the decoding result are executed inside the CPU 20.
  • the object code decoded by the instruction decoding unit 40 in this way includes a command for transferring the processing data stored in the internal RAM 24 to a given register 44. Often.
  • the processing data stored in the internal RAM 24 can be divided into three types, one byte (8 bits), 16 bytes, and 32 bytes, depending on the contents of the data. There is.
  • the CPU 20 is configured to process a 32-bit data, and the register group 44 inside the CPU 20 also has a 32-bit storage capacity.
  • an extension unit 50 for extending 1-byte and 16-bit data read from the RAM 24 to 32-bit and outputting the data.
  • FIG. 2 shows a specific configuration of the extension unit 50 of the present embodiment.
  • the expansion unit 50 stores the processing data read out from the RAM 24 via the data bus 82b as shown in FIG. 2A on the lines DIN0, DIN1, and '31. Entered via.
  • the extension unit 50 of the present embodiment includes a first zero extension route 50-1 for one-byte processing shown in FIG. 2A and a one-byte processing shown in FIG. 2C.
  • the non-expansion circuit 50-5 outputs the data as output data of D0 and D1 to D31 as it is when the processing data read from the RAM 24 is 32 bits data. .
  • a 32-bit input data is output as it is as a 32-bit data.
  • the first zero extension circuit 50-1 shown in FIG. 2B converts the 8-bit processing data input via the input lines DIN0 to DIN7 to the 8-bit output lines D0 and D as they are. It is formed to output through 1 to D7. Further, the first port expansion circuit 50-1 cuts off the data input through the remaining input lines DIN8 to DIN31, and forcibly connects these input lines DIN8 to DIN31. Input a zero extension signal of “0”. Then, the zero extension signal is directly extended to the output data of the output colors D8-D31 and output.
  • the 8-bit processed data of DIN0 to DIN7 is output as it is as 8-bit output data D0 and -D7, and the remaining upper bits of the 24 bits D8D31 are "8". It will be expanded to the value of "0" and output.
  • the first sine expansion circuit 50-2 shown in FIG. 2C converts the 8-bit processing data input via the input lines DIN0 to DI7 into the 8-bit output lines D0 and D1 as they are. It is formed to output through D7. Further, the first sine extension circuit 50-2 cuts off the data input through the remaining input lines DIN8 to DIN31 and forcibly connects the input lines DIN8 to DIN31. Input D IN7, which is the sign bit of the 8-bit data. Then, the data of the sine signal of DIN7 is directly extended to the output data of the output lines D8 to D31 and output. In other words, the 8-bit processing data of DIN0 to DIN7 is the same as the 8-bit output data D0,. ) 7 is output, and the remaining 24-bit high-order digits D831 are sign-extended to the value of DIN 7 and output.
  • the first zero extension circuit 50-1 and the first sine extension circuit 50-2 of the present embodiment reduce the input 8-bit processing data to 32-bit data. It can be output with zero extension or sign extension.
  • the second zero extension circuit 50-3 and the second sine extension circuit 50-4 shown in Figs. 2D and 2E perform zero extension or sine extension of 16-bit input data to 32 bits. Is basically the same as the first zero extension circuit 50-1 and the first sign extension circuit 50-2. That is, it is formed such that the 16-bit processed data input via the input lines DIN0 to DIN15 are output as they are via the 16-bit output lines D0 and D1 to D15. Further, the second zero extension circuit 50-3 and the second sine extension circuit 50-4 block the data input through the remaining input lines DIN16 to DIN31, and Forcibly input a zero extension signal of "0" or a sine extension signal of DIN 15 to DIN 16 to DIN 31. Then, the data of the extension signal is directly extended to the output data of the output lines D16 to D31 and output.
  • the 16-bit processed data of DIN0 to DIN15 is output as it is as a 16-bit output data D0, -D15, and the upper digits D16 to D31 of the remaining 16 bits are output. Output will be expanded to "0" or DIN 15 value.
  • the outputs of these circuits 50-1 to 50-5 are selectively output as a 32-bit processing data through the multiplexer 60 as shown in FIG. Then, the 32-bit processing data output through the multiplexer 60 is output to the CPU 20 via the data bus 36b.
  • the selection operation by the multiplexer 60 is performed based on a selection command output from the instruction decoding unit 40.
  • FIGS. 4A to 4E show specific examples of various load instructions stored in the ROM 22.
  • various load instructions, mnemonics Although represented as codes, each of these load instructions is actually stored in the ROM 22 as a 32-bit object code.
  • [% reg 1] represents a register evening to load the processing data that is expanded and output to 32 bits by the extension unit 50. This means that 32-bit processing data is stored in the register.
  • [% reg2] described at the end represents a register storing an address for reading out the processing data from the RAM 24.
  • the register stored in reg2 of the register group 44 is 32. This means that processing data is read from RAM 24 based on the bit address data.
  • the object code of the mouth instruction shown in FIG. 4A is read from the ROM 22 by the instruction of the instruction reading unit 42, this object code is decoded by the instruction decoding unit 40 of the CPU 20. Is done.
  • the instruction decoding unit 40 reads out the 32-bit address data stored in the register reg 2 and sends the address data and data size via the data bus 34 to the bus control unit 26. Output b.
  • the bus control unit 26 processes the data of the size specified by the data size b from the area specified by the address data from the RAM 24, and in this case, processes one byte. The data is read and input to the extension unit 50.
  • the instruction decoding unit 40 sends the first signal to the multiplexer 60 included in the extension unit 50 based on the data size “b I” included in the load instruction shown in FIG. Output a control signal so as to select the output of the pin extension circuit 50-2.
  • this one-byte data read from the RAM 24 at this time is the one shown in FIGS. 5 and 6, this one-byte data is stored in the first sign extension.
  • the signal is input to the CPU 20 with the sign extended to 32 bits by the circuit 50-2, and this 32 bits extended data is loaded into the register regl specified by the load instruction. Will be done.
  • the sign extension and the zero extension have the same value.
  • the sign bit of DIN7 is '1' as in the case of the 8-bit data in Fig. 6, the sign extension and the zero extension have different values.
  • the extension unit 5 Except for outputting a control signal to select the output of the second zero extension circuit 50-3 or the output of the second sine extension circuit 50-14 toward the multiplexer 60 of 0, The same operation as in the embodiment is performed.
  • the instruction decoding unit 40 sends a control signal to the multiplexer 60 of the extension unit 5 ⁇ to select the output of the non-extension circuit 50-5.
  • the operation is the same as that of the above-mentioned closed instruction except that is output.
  • the processing of 1 byte and 16 bits read from the RAM 24 can be reduced to 32 bits by a simple circuit configuration. Sign extension or zero extension can be performed easily and quickly in a day.
  • by executing such processing data expansion in one instruction cycle it is possible to perform processing at the same processing speed as when the expansion unit 50 is provided in the CPU 20.
  • the above-described data reading and extension processing can be performed.
  • the microcomputer 10 of the present embodiment transmits, for example, 1-byte or 16-bit data out of the 32-bit data stored in the register 44 in the CPU 20 to the bus control unit. It is characterized in that it is subjected to zero-bit or sign-expansion to 32 bits by using the extension section 50 of the block 26 and stored in a desired register.
  • FIG. 3B shows a specific configuration of the extension unit 50 for this purpose.
  • the extension section 50 of the present embodiment is connected to the data bus 82 b of the RAM 24 via the data bus 82 and the data bus 36.
  • the data sent from the rice pad 110 is selectively input via the multiplexer 62.
  • the selection instruction to the multiplexer 62 is output from the instruction decoding unit 40.
  • the instruction decoding unit 40 controls the multiplexer 62 to select the data bus 82b from the RAM 24 when a read instruction of the type shown in FIG. 4 is read from the ROM 22. Otherwise, the operation is the same as in the first embodiment.
  • the instruction decoding unit 40 interprets the load instruction and stores it in a predetermined register in the register group 44. Executes an instruction to load 8-bit or 16-bit data out of the 32 bits stored in other registers as 0 or sign extension. The details are described below.
  • the instruction decoding unit 40 reads the processing data from the read target register rs included in the load instruction shown in FIG. 8, and outputs the processed data to the extension unit 50 via the data bus 36a.
  • the multiplexer 62 selects and outputs the processing data from the data bus 36a, and the multiplexer 60 outputs the processing data size and A circuit adapted to the format of the extension 5 0 — 1 to 5 0 — Selects the extension data from 5 to 5 and outputs the data to the CPU 20 via the bus 36 b. Output selection command toward 0.
  • FIG. 8 shows a specific example of the above-mentioned spoken command.
  • various load instructions are represented as mnemonic codes to facilitate understanding.
  • Each of these mouth instructions is actually stored in ROM 22 as a 32-bit object code.
  • “ld” described first indicates that the instruction is a spoken instruction.
  • “B”, “ub”, “h”, and “uh” described next are the size of the processing data read from the register rs, and whether the data is sign-extended or zero-extended. This is data for specifying the format. That is, “b” and “h” indicate that the size of the read processing data is 1 byte (8 bits), 16 bytes, and 32 bytes, respectively. Also, “u” indicates that the processing data is zero-extended, and a load instruction without “u” indicates that the processing data is sign-extended.
  • % Rd indicates a register for loading the processing data output to the expansion unit 50 after being expanded to 32 bits. Here, it is shown that 32 bits of processing data are stored in the rd register evening from the resist evening group 44.
  • % R s described at the end indicates the register where the processed data is stored. Here, it means reading out the processing data stored in the Regis evening r s in the Regis evening group 4 4.
  • the instruction decoding unit 40 reads out the processing data from the register rs to be read included in the data of the load instruction and sends it to the extension unit 50 via the data bus 36a. Output to
  • the instruction decoding unit 40 controls the multiplexer 62 to select an input from the data bus 36a.
  • the processing data read from the register rs is input to each of the circuits 50-1 to 50-5.
  • the instruction decoding unit 40 outputs a selection instruction to the multiplexer 60 based on the size of the processing data included in the decoded load instruction and the type data of the sign extension or the zero extension. Since this selection command is the same as in the first embodiment, the description is omitted here.
  • the processing data read from the RAM 24 using the circuit external to the CPU 20, specifically, the extension unit 50 provided in the bus control unit 26 is used. Not only can be zero-extended or sign-extended to 32 bits, but also the 8-bit or 16-bit processed data stored in the register in the CPU 20 can be zero-extended or 32-bit processed as necessary.
  • the sign can be extended and stored at the desired register evening.
  • the processing speed is the same as when the expansion unit 50 is provided in the CPU 20.
  • the above-described data reading and extension processing can be performed.
  • the code size can be reduced as compared with the related art. : ROM22 can be used effectively.
  • FIG. 7 shows a specific functional block diagram of microcomputer 10 of the present embodiment.
  • the microcomputer 10 is a 32-bit microcontroller, including a CPU 20, a ROM 22, a RAM 24, a high-frequency transmission circuit 910, a low-frequency transmission circuit 920, a reset circuit 930, a prescaler 940, and a 16-bit microcomputer.
  • the CPU 20 has an SP that is a stack pointer dedicated register, and decodes and executes the various stack pointer dedicated instructions described above.
  • the CPU 20 has the above-described configuration, and functions as an instruction decoding unit, an instruction reading unit, and a unit for executing various instructions.
  • the microcomputer of the present invention is applicable to various types of electronic devices such as personal computer peripheral devices such as a pudding device and portable devices.
  • personal computer peripheral devices such as a pudding device and portable devices.
  • an information processing circuit that can perform high-speed processing with a simple configuration can be built in, so that an inexpensive and highly functional electronic device can be provided.
  • the present invention is applied to a risk type CPU has been described as an example.
  • the present invention can be widely applied to other types of CPUs, for example, a sysk type CPU.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Record Information Processing For Printing (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

A microcomputer which enables simple and high-speed extension of signed processing data. The microcomputer (10) has a CPU (20) for interpreting and executing a loading instruction for transferring processing data stored in a RAM (24) to a predetermined register. The CPU (20) includes an operation decoder (40) for interpreting the loading instruction so as to output a data read address signal and output an extension control signal conforming to the size and extension format of the processing data. An extending section (50) connected with the CPU (20) through a bus line carries out at least one of zero extension and sign extension of the processing data read from the RAM (24) up to a predetermined number of processing bits in accordance with the extension control signal on the basis of the data read address signal, and outputs the extended data to the CPU (20).

Description

明 細 書 マイクロコンピュータ及び電子機器  Description Microcomputer and electronic equipment
[技術分野] [Technical field]
本発明は、 マイクロコンピュータ及び電子機器に関する。 [背景技術]  The present invention relates to a microcomputer and an electronic device. [Background technology]
3 2ビットのデ一夕を処理できる R I S C方式のマイクロコンピュー夕では、 所定ビッ ト幅の固定長命令が用いられていた。 その理由は、 固定長命令を用いる と、 可変長命令を用いる場合に比べ、 命令のデコードに要する時間を短縮でき、 また、 マイクロコンビユー夕の回路規模を小さくすることが出来るからである。 ところが、 3 2ビッ トのマイクロコンピュータにおいても、 記憶装置に記憶さ れる処理デ一夕は常に 3 2ビッ トであるとは限らない。 全てのデ一夕を 3 2ビッ トで記述すると、 データに冗長な部分が生じる命令が多くなり、 メモリーの使用 効率が悪くなるからである。  In RISC type microcomputers that can process 32 bits of data, fixed-length instructions with a predetermined bit width were used. The reason is that the use of fixed-length instructions can reduce the time required to decode the instructions and can reduce the circuit size of the microcombiner, compared to the case of using variable-length instructions. However, even with a 32-bit microcomputer, the processing data stored in the storage device is not always 32 bits. If all data is described in 32 bits, the number of instructions that cause data to be redundant will increase, and the efficiency of memory usage will decrease.
従って、 記憶装置から例えば 1バイ ト形式の処理デ一夕を読み出し、 3 2ビッ トの C P Uで処理を行う場合には、 1バイ トデ一夕を 3 2ビッ トデータに拡張し てやる必要がある。  Therefore, if, for example, a 1-byte data is read from a storage device and processed by a 32-bit CPU, it is necessary to extend the 1-byte data to 32-bit data. .
このようなデ一夕拡張処理は、 通常のデータを対象とする場合にはさほど問題 はない。 しかし、 例えば計算用の数字を表す 1バイ トデ一夕を減算用にサイン付 きのデ一夕として読み出し、 これを、 サイン付きの 3 2ビッ トデータに拡張する 場合には、 高価なバレルシフタ等を用い、 第 1に 1バイ トデータを左へ 2 4ビッ トシフトさせる命令を実行し、 次に前記 1バイ トデ一夕を右方向へ 2 4ビッ ト算 術シフトする命令を実行する必要があった。  Such a data extension process is not so problematic for ordinary data. However, if, for example, a one-byte data representing a number for calculation is read as a signed data for subtraction, and this is extended to a signed 32-bit data, an expensive barrel shifter or the like is used. First, it was necessary to execute an instruction to shift 1-byte data to the left by 24 bits, and then to execute an instruction to arithmetically shift the 1-byte data to the right by 24 bits.
このように従来の技術では、 サイン付きのデータの拡張処理に、 2つの命令を 実行する必要があるため、 処理に時間がかかるとともに、 高価なバレルシフタを 用いるため、 ハ一ドウエアが高価になるという問題があった。 本発明は、 このような課題に鑑みなされたものであり、 その目的は、 サイン付 きの処理データの拡張を簡単かつ高速で行うことができるマイクロコンピュー夕 およびこれを用いた電子機器を提供することにある。 As described above, in the conventional technology, it is necessary to execute two instructions to extend the signed data, so that it takes a long time to perform the processing, and the expensive barrel shifter is used, so that the hardware becomes expensive. There was a problem. The present invention has been made in view of such problems, and an object of the present invention is to provide a microcomputer capable of easily and quickly expanding signed data and an electronic device using the same. Is to do.
[発明の開示] [Disclosure of the Invention]
( 1 ) 前記目的を達成するため、 本発明のマイクロコンピュー夕は、 処理デ一夕に対し、 そのデ一夕サイズに合わせてゼロ拡張およびサイン拡張の 少なくとも一方の拡張処理を行い所与のレジス夕に転送するためのロード命令を 解読して、 前記処理データのサイズおよび前記拡張処理の形式に対応した制御信 号を出力する命令解読手段を備えた情報処理手段と、  (1) In order to achieve the above object, the microcomputer of the present invention performs at least one of zero extension and sign extension on the processing data according to the data size, and performs a given processing. An information processing unit including an instruction decoding unit that decodes a load instruction to be transferred to a register, and outputs a control signal corresponding to a size of the processing data and a format of the extended processing;
前記情報処理手段と接続され、 前記処理データに対し前記制御信号に従って所 定の処理ビッ ト数までゼロ拡張およびサイン拡張の少なくとも 1方の拡張処理を 行い、 前記情報処理手段に向け出力する拡張手段と、  An extension unit connected to the information processing unit, performing at least one of an extension process of zero extension and a sine extension on the processing data to a predetermined number of processing bits according to the control signal, and outputting the processed data to the information processing unit When,
を含むことを特徴とする。  It is characterized by including.
また、 本発明のマイクロコンピュー夕は、  Also, the microcomputer of the present invention is:
処理データ記憶手段に記憶された処理データを所与のレジス夕に転送するため のロード命令であって、 転送する処理デ一夕およびそのサイズを特定するための データと、 処理デ一夕をゼロ拡張、 サイン拡張するための拡張形式を特定するた めのデータとを含む前記口一ド命令のオブジェク トコ一ドを解釈し実行するマイ クロコンピュー夕において、  A load instruction for transferring the processing data stored in the processing data storage means to a given register, wherein the data for specifying the processing data to be transferred and its size, and the processing data are zero. A microcomputer that interprets and executes the object code of the above-mentioned instruction including an extension and data for specifying an extension format for sign extension.
前記ロード命令のオブジェク トコードを解読して、 データ読み出しアドレス信 号を出力するとともに、 前記処理データのサイズおよび拡張形式に対応した拡張 制御信号を出力する命令解読手段を備えた情報処理手段と、  Information processing means for decoding an object code of the load instruction, outputting a data read address signal, and outputting an extension control signal corresponding to the size and extension format of the processing data;
前記情報処理手段と接続され、 前記データ読み出しァドレス信号に基づき前記 処理デ一夕記憶手段から読み出された処理データに対し、 前記拡張制御信号に従 つて所定の処理ビッ ト数までゼロ拡張およびサイン拡張の少なくとも 1方の拡張 処理を行い、 前記情報処理手段に向け出力する拡張手段と、  The processing data read from the processing data storage means based on the data read address signal is connected to the information processing means, and the processing data read from the processing data storage means is zero-extended and signed to a predetermined processing bit number in accordance with the extension control signal An extension unit that performs at least one extension process of the extension and outputs the information to the information processing unit;
を含むことを特徴とする。 ここにおいて、 前記マイクロコンピュー夕は、 It is characterized by including. Here, the microcomputer is
前記オブジェク トコードを含む各種のオブジェク トコ一ドが記憶された第 1の 記憶手段と、  First storage means in which various object codes including the object code are stored;
前記処理データがデ一夕読み出しアドレスに対応付けて記憶された、 前記処理 データ記憶手段としての第 2の記憶手段と、  A second storage unit serving as the processing data storage unit, wherein the processing data is stored in association with a data read address;
前記情報処理手段に設けられ、 前記第 1の記憶手段からのオブジェク トコード の読み出しを制御する命令読出手段と、  Command reading means provided in the information processing means for controlling reading of an object code from the first storage means;
を含み、 前記第 1および第 2の記憶手段は、 前記情報処理手段とバスラインを 介して接続され、  Wherein the first and second storage means are connected to the information processing means via a bus line,
前記命令解読手段は、  The instruction decoding means,
前記第 1の記憶手段から読み出されたオブジェク トコ一ドを解読して、 前記第 2の記憶手段のデ タ読み出しァドレス信号を出力するとともに、 前記拡張手段 に向け前記拡張制御信号を出力し、  Decoding the object code read from the first storage means, outputting a data read address signal of the second storage means, and outputting the extension control signal to the extension means;
前記拡張手段は、  The extension means includes:
前記データ読み出しァドレス信号に基づき前記第 2の記憶手段から読み出され た処理データを、 前記拡張制御信号に従って所定の処理ビッ ト数までゼロ拡張お よびサイン拡張の少なくとも 1方の拡張処理を行い出力するように形成すること が好ましい。  The processing data read from the second storage unit based on the data read address signal is subjected to at least one of zero extension and sign extension to a predetermined number of processing bits according to the extension control signal and output. It is preferable to form it.
また、 本発明のマイクロコンピュータは、  Further, the microcomputer of the present invention comprises:
情報処理手段内部の第 1のレジス夕に記憶された処理データを情報処理手段内 部の第 2のレジス夕に転送するためのロード命令であって、 前記処理デ一夕のサ ィズを特定するためのデータと、 処理デ一夕をゼロ拡張、 サイン拡張するための 拡張形式を特定するためのデータとを含む前記ロード命令のオブジェクトコ一ド を解釈し実行するマイクロコンピュー夕において、  A load instruction for transferring processing data stored in a first register inside the information processing means to a second registry inside the information processing means, and specifying a size of the processing data A microcomputer for interpreting and executing the object code of the load instruction, the data including a data for performing an extension process and a data for specifying an extension format for sign extension.
前記ロード命令のォブジヱク トコ一ドを解読して、 前記第 1のレジス夕から処 理データを読み出して出力するとともに、 前記データのサイズおよび拡張形式に 対応した拡張制御信号を出力する命令解読手段を備えた情報処理手段と、 前記情報処理手段と接続され、 前記第 1のレジス夕から読み出された処理デー 夕に対し、 前記拡張制御信号に従って所定の処理ビッ ト数までゼロ拡張およびサ ィン拡張の少なくとも 1方の拡張処理を行い、 前記情報処理手段に向け出力する 拡張手段と、 Instruction decoding means for decoding an object code of the load instruction, reading and outputting processed data from the first register, and outputting an extended control signal corresponding to the data size and extended format. Information processing means, and processing data connected to the information processing means and read from the first registry. Extension means for performing at least one of zero extension and sign extension up to a predetermined number of processing bits according to the extension control signal in the evening, and outputting the result to the information processing means;
を含み、  Including
前記情報処理手段は、  The information processing means includes:
拡張処理された前記データを第 2のレジス夕に書き込むことを特徴とする。 ここにおいて、 前記マイクロコンピュータは、  The extended data is written in a second register. Here, the microcomputer is
前記オブジェク トコ一ドを含む各種のオブジェクトコ一ドが記憶された第 1の 記憶手段と、  First storage means for storing various object codes including the object code;
前記情報処理手段に設けられ、 前記第 1の記憶手段からのオブジェク トコ一ド の読み出しを制御する命令読出手段と、  Command reading means provided in the information processing means for controlling reading of an object code from the first storage means;
を含み、 前記第 1の記憶手段は、 前記情報処理手段とバスラインを介して接続 されるように形成することが好ましい。  Preferably, the first storage means is formed so as to be connected to the information processing means via a bus line.
本発明のマイクロコンピュータによれば、 処理データを読み出し、 この処理デ 一夕をサインまたはゼロ拡張し所与のレジス夕にロードするための専用のロード 命令と、 前記拡張処理を実行する専用の拡張手段とを用いて、 処理デ一夕のゼロ 拡張、 サイン拡張を高速で行うことができる。  According to the microcomputer of the present invention, a dedicated load instruction for reading processing data, signing or zero-extending the processing data and loading the data at a given register, and a dedicated extension for executing the extension processing are provided. By means of this, zero extension and sign extension of the processing data can be performed at high speed.
しかもこの拡張処理に、 従来のように高価でかつ大型なバレルシフ夕を用いる 必要がないため、 回路全体の構成を簡単かつ安価なものとすることが可能となる c 特に、 本発明によれば、 処理データをサインまたはゼロ拡張するための専用の 命令の解読を情報処理手段内部に設けられた命令解読手段で行い、 この解読結果 に基づく処理データの拡張は、 前記情報処理手段とは別に形成された拡張手段を 用いて 1命令サイクル内で行う構成を採用している。 従って、 情報処理手段の内 部、 例えばマイクロコンピュータの C P Uの内部に、 前記拡張手段を設ける必要 がないため、 C P U自体を小型かつ安価なものとすることができる。 しかも、 前 記処理を 1命令サイクルで実行することにより、 あたかも拡張手段を情報処理手 段内に設けた場合と同様な処理スピ一ドで、 前記処理データの読み出しと拡張と を高速に行うことが可能となる。 ( 2 ) また、 本発明のマイクロコンピュ一夕は、 Moreover this extension process, it is not necessary to use a conventional expensive and large-sized barrel shifter evening as, in particular c becomes possible to make the overall circuit configuration as simple and inexpensive, according to the present invention, Decoding of a dedicated instruction for signing or zero-extending the processing data is performed by an instruction decoding means provided inside the information processing means, and expansion of the processing data based on the decoding result is formed separately from the information processing means. It employs a configuration that performs it within one instruction cycle using the extended means. Therefore, since it is not necessary to provide the extension means inside the information processing means, for example, inside the CPU of the microcomputer, the CPU itself can be made small and inexpensive. In addition, by executing the above-described processing in one instruction cycle, it is possible to read and expand the processing data at a high speed in the same processing speed as when an expansion unit is provided in the information processing means. Becomes possible. (2) Also, the micro computer of the present invention
処理デ一夕記憶手段に記憶された処理データを所与のレジス夕に転送するため の第 1の口一ド命令であって、 転送する処理デ一夕およびそのサイズを特定する ためのデ一夕と、 処理データをゼロ拡張、 サイン拡張するための拡張形式を特定 するためのデータとを含む前記第 1のロード命令の第 1のオブジェク トコードを 解釈し実行するとともに、  A first command for transferring the processing data stored in the processing data storage means to a given register, and a data command for specifying the processing data to be transferred and its size. Evening, interpreting and executing the first object code of the first load instruction including data for specifying an extension format for zero extension and sign extension of the processing data,
情報処理手段内部の第 1のレジス夕に記憶された処理データを情報処理手段内 部の第 2のレジス夕に転送するための第 2の口一ド命令であって、 前記処理デー 夕のサイズを特定するためのデータと、 処理データをゼロ拡張、 サイン拡張する ための拡張形式を特定するためのデータとを含む前記第 2のロード命令の第 2の オブジェク トコ一ドを解釈し実行するマイクロコンピュー夕において、  A second command for transferring the processing data stored in the first registry inside the information processing means to the second registry inside the information processing means, the size of the processing data being A micro-processor for interpreting and executing the second object code of the second load instruction including data for specifying an extension format and data for specifying an extension format for performing zero extension and sign extension of the processing data. In the computer evening,
前記各ォブジェクトコードを含む各種のォブジェク トコードが記憶された第 1 の記憶手段と、  First storage means for storing various object codes including the object codes,
前記処理デ一夕がデータ読み出しァドレスに対応付けて記憶された、 前記処理 データ記憶手段としての第 2の記憶手段と、  A second storage unit as the processing data storage unit, wherein the processing data is stored in association with a data read address;
前記第 1および第 2の記憶手段とバスラインを介して接続された情報処理手段 と、  Information processing means connected to the first and second storage means via a bus line;
前記情報処理手段とバスラインを介して接続され、 前記処理データに対する拡 張処理を行い、 前記情報処理手段に向け出力する拡張手段と、  An expansion unit connected to the information processing unit via a bus line, performing expansion processing on the processing data, and outputting the processed data to the information processing unit;
を含み、  Including
前記情報処理手段は、  The information processing means includes:
前記第 1の記憶手段からのオブジェク トコードの読み出しを制御する命令読出 手段と、  Command reading means for controlling reading of an object code from the first storage means;
読み出された前記第 1、 第 2のオブジェク トコードを解読する命令解読手段と、 前記第 1および第 2のレジス夕として機能する複数のレジス夕と、  Instruction decoding means for decoding the read first and second object codes; and a plurality of registers functioning as the first and second register codes;
を含み、  Including
前記命令解読手段は、  The instruction decoding means,
前記第 1の口一ド命令の第 1のオブジェク トコードを解読して、 前記第 2の記 憶手段のデータ読み出しァドレス信号を出力するとともに、 前記処理データのサ ィズおよび拡張形式に対応した拡張制御信号を出力し、 Decoding the first object code of the first opened instruction, And outputting an extended control signal corresponding to the size and the extended format of the processing data,
前記第 2のロード命令の第 2のォブジヱク トコ一ドを解読して、 前記第 1のレ ジス夕から処理データを読み出すとともに、 前記デ一夕のサイズおよび拡張形式 に対応した拡張制御信号を出力し、  Decoding the second object code of the second load instruction, reading processing data from the first register, and outputting an extension control signal corresponding to the size and extension format of the data And
前記拡張手段は、  The extension means includes:
前記デ一夕読み出しァドレス信号に基づき第 2の記憶手段から読み出された処 理データに対し、 前記拡張制御信号に従って所定の処理ビッ ト数までゼロ拡張お よびサイン拡張の少なくとも 1方の拡張処理を行い、 前記情報処理手段に向け出 力するとともに、  Processing data read from the second storage means based on the overnight read address signal is subjected to at least one of zero extension and sign extension to a predetermined number of processing bits in accordance with the extension control signal. And output to the information processing means.
前記第 1のレジス夕から読み出された処理データに対し、 前記拡張制御信号に 従って所定の処理ビッ ト数までゼロ拡張およびサイン拡張の少なくとも 1方の拡 張処理を行い、 前記情報処理手段に向け出力し、  The processing data read from the first register is subjected to at least one of extension processing of zero extension and sign extension up to a predetermined number of processing bits in accordance with the extension control signal. Output for
前記情報処理手段は、  The information processing means includes:
前記第 2の口一ド命令に従い拡張処理された前記デ一夕を第 2のレジス夕に書 き込むことを特徴とする。  The data that has been extended according to the second command is written in a second register.
これにより、 処理データ記憶手段に記憶された処理デ一夕をゼロ拡張、 サイン 拡張し所与のレジス夕に転送するための第 1のロード命令と、 情報処理手段内部 の第 1のレジス夕に記憶された処理データをゼロ拡張、 サイン拡張し情報処理手 段内部の第 2のレジス夕に転送するための第 2の口一ド命令とを実行する際に、 前記処理データの拡張処理を情報処理手段の外部に設けられた共通の拡張手段を 用いて行うことができる。  Thereby, the first load instruction for zero-extending and sign-extending the processing data stored in the processing data storage means and transferring it to a given register, and the first load instruction inside the information processing means, When executing the second process instruction for zero-extending and sign-extending the stored processing data and transferring it to the second register inside the information processing means, the processing of expanding the processing data is information. This can be performed by using a common extension means provided outside the processing means.
従って、 情報処理手段、 例えばマイクロコンピュータの C P U自体を小型かつ 安価なものとすることができ、 しかも、 C P U内部の処理デ一夕および外部の処 理データの拡張を、 ロード命令に合わせて高速に行うことが可能となる。  Therefore, the information processing means, for example, the microcomputer itself can be made small and inexpensive, and the processing data inside the CPU and expansion of the external processing data can be expanded at high speed in accordance with the load instruction. It is possible to do.
( 3 ) 本発明において、 前記拡張手段は、  (3) In the present invention, the expanding means includes:
前記デ一夕のサイズ毎に、 読み出された処理データをゼロ拡張するゼロ拡張手 段およびサイン拡張するサイン拡張手段と、 前記拡張制御信号に従って、 前記各拡張手段の出力を選択出力する選択手段と、 を含むように形成することが好ましい。 Zero extension means for performing zero extension on the read processing data and sign extension means for performing sign extension for each of the data sizes; And selecting means for selecting and outputting the output of each of the extension means in accordance with the extension control signal.
本発明によれば、 デ一夕のサイズ毎に、 処理デ一夕をゼロ拡張するゼロ拡張手 段およびサイン拡張するサイン拡張手段が設けられている。 例えば、 3 2ビッ ト のデータを処理する情報処理装置において、 処理デ一夕のサイズが 8ビット、 1 6ビッ トの 2種類のある場合には、 8ビッ ト用のゼロ拡張手段およびサイン拡張 手段と、 1 6ビッ ト用のゼロ拡張手段およびサイン拡張手段とが用意されている。 そして、 処理デ一夕は、 前記拡張制御信号に従って選択されたビットサイズの 拡張手段を用いてゼロ拡張またはサイン拡張して出力される。  According to the present invention, a zero extension means for zero-extending the processing data and a sign extension means for sign extension are provided for each data size. For example, in an information processing device that processes 32 bits of data, if there are two types of processing data, 8 bits and 16 bits, zero extension means and sine extension for 8 bits Means and zero extension means and sign extension means for 16 bits are provided. Then, the processing data is output by performing zero extension or sign extension using the extension means of the bit size selected according to the extension control signal.
このようにすることにより、 より簡単な回路構成で、 処理データの拡張処理を 行うことができる。  By doing so, it is possible to extend the processing data with a simpler circuit configuration.
( 4 ) 本発明において、 前記サイン拡張手段は、 処理デ一夕をそのまま出力す る手段と、 処理データの上位の拡張ビッ トデータを、 全てサイン付きの信号とし て出力する手段とを含むように構成することが好ましい。  (4) In the present invention, the sign extension means includes means for outputting the processing data as it is, and means for outputting all higher-order extended bit data of the processing data as a signed signal. It is preferable to configure.
また前記ゼロ拡張手段は、 処理データをそのまま出力する手段と、 処理デ一夕 の上位の拡張ビッ トデ一夕を、 全て 0に対応した信号として出力する手段とを含 むように構成することが好ましい。  It is preferable that the zero extension means includes means for outputting the processing data as it is, and means for outputting the extension bit data higher than the processing data as a signal corresponding to all zeros.
また、 マイクロコンピュー夕には、 通常バスラインのコントロールを行うバス コントロールユニッ トが設けられている。 従って、 前記拡張手段は、 前記パスコ ントロールュニッ 卜の一部の回路として構成することが、 回路全体の集積度を高 める上で好ましい。  In addition, the microcomputer has a bus control unit that controls the normal bus line. Therefore, it is preferable that the extension means is configured as a part of the circuit of the path control unit in order to increase the integration degree of the entire circuit.
また、 本発明のマイクロコンピュー夕は R I S C方式のものとして形成するこ とが好ましい。  Further, it is preferable that the microcomputer of the present invention be formed as a RISC system.
R I S C方式のマイクロコンピュー夕は、 ハードウエアを小型化して高速化を 図ることを目的として設計されている。 このため汎用レジスタを多く有しており、 命令セッ トを汎用性の高いものに絞ることで命令数の削減を図ることができる。 本発明のマイクロコンビュ一夕は、 固定長の命令を解読し、 該命令に基づき実 行処理を行うように形成することが好ましい。 固定長命令を用いると可変長命令を用いる場合に比べ、 命令のデコ一ドに要す る時間を短縮でき、 マイクロコンピュータの回路規模を小さくすることが出来る 固定長命令を採用する場合、 命令に冗長な部分が出来るのを防ぎメモリを効率よ く使用するためには、 各命令に必要なビッ ト数はばらつきが少なく、 出来るだけ 短いほうが好ましい。 RISC microcomputers are designed to reduce the size of hardware and increase the speed. For this reason, many general-purpose registers are provided, and the number of instructions can be reduced by narrowing the instruction set to those with high versatility. It is preferable that the microcomputer of the present invention is formed so as to decode a fixed-length instruction and execute an execution process based on the instruction. The use of fixed-length instructions can reduce the time required to decode the instructions and reduce the circuit size of the microcomputer compared to the case of using variable-length instructions. In order to prevent the formation of redundant parts and to use the memory efficiently, it is preferable that the number of bits required for each instruction has little variation and is as short as possible.
本発明の電子機器は、 前述した本発明のマイクロコンビユー夕を含むように形 成することが好ましい。  The electronic device of the present invention is preferably formed so as to include the above-described microcombination of the present invention.
本発明によれば、 処理速度が速く安価なマイクロコンビュ一夕を内蔵している ため、 安価で高機能な電子機器を提供することが出来る。  According to the present invention, an inexpensive and high-performance electronic device can be provided because the microcomputer incorporates a high-speed and inexpensive microcomputer.
[図面の簡単な説明] [Brief description of drawings]
図 1は、 本発明が適用されたマイクロコンピュー夕の好適な実施の形態を説明 する機能プロック図である。  FIG. 1 is a functional block diagram illustrating a preferred embodiment of a microcomputer to which the present invention is applied.
図 2 A〜図 2 Fは、 前記マイクロコンピュー夕に内蔵された拡張回路の具体的 な構成の説明図である。  2A to 2F are explanatory diagrams of a specific configuration of an extension circuit built in the microcomputer.
図 3 Aは、 複数の拡張回路の出力を選択するためのマルチプレクサの説明図で あり、 図 3 Bは他の実施の形態の機能プロック図である。  FIG. 3A is an explanatory diagram of a multiplexer for selecting outputs of a plurality of extension circuits, and FIG. 3B is a functional block diagram of another embodiment.
図 4 A〜図 4 Eは、 口一ド命令を二一モニック形式で表した説明図である。 図 5は、 8ビッ トの処理データをサイン拡張、 ゼロ拡張する場合の説明図であ o  4A to 4E are explanatory diagrams showing a spoken instruction in a 21-monic format. Figure 5 is an explanatory diagram for sign extension and zero extension of 8-bit processed data.
図 6は、 8ビッ トの処理データをサイン拡張、 ゼロ拡張する場合の説明図であ る。  FIG. 6 is an explanatory diagram in the case of sign extension and zero extension of 8-bit processing data.
図 7は、 本実施の形態のマイクロコンピュー夕の具体的な機能ブロック図であ る。  FIG. 7 is a specific functional block diagram of the microcomputer according to the present embodiment.
図 8は、 本実施の他の実施の形態に用いられる口一ド命令の説明図である。  FIG. 8 is an explanatory diagram of a spoken command used in another embodiment of the present embodiment.
[発明を実施するための最良の形態]  [Best Mode for Carrying Out the Invention]
次に、 本発明の好適な実施の形態を図面に基づき詳細に説明する。  Next, a preferred embodiment of the present invention will be described in detail with reference to the drawings.
第 1の実施の形態 図 1には、 本実施の形態の電子回路が示されている。 この電子回路は、 マイク 口コンピュータ 10と、 外部の ROM 1 2および RAM 14とを含んで構成され、 これらは外部ァドレスバス 16および外部データバス 18を介して接続されてい る。 First embodiment FIG. 1 shows an electronic circuit according to the present embodiment. This electronic circuit includes a microphone computer 10 and external ROMs 12 and RAMs 14, which are connected via an external address bus 16 and an external data bus 18.
前記マイクロコンピュー夕 10は、 CPU20と、 各種の命令がオブジェクト コードとして記憶された内部 ROM 22と、 各種処理デ一夕が記憶された内部 R AM24と、 バスコントロ一ルュニヅ ト 26とを含んで構成される。  The microcomputer 10 includes a CPU 20, an internal ROM 22 in which various instructions are stored as object codes, an internal RAM 24 in which various processing data are stored, and a bus control unit 26. Be composed.
前記マイクロコンピュ一夕 10は、 32ビッ トの命令アドレスバス 30と、 1 6ビッ トの命令データバス 32と、 32ビッ トのデ一夕アドレスバス 34と、 3 2ビッ トの 2組の書込、 読み出し用デ一夕バス 36 a、 36 bとを含み、 これら 各バス 30〜36は CPU 20とバスコントロールュニッ ト 26との間を接続し ている。  The microcomputer 10 has a 32-bit instruction address bus 30, a 16-bit instruction data bus 32, a 32-bit data address bus 34, and a 32-bit two-bit write bus. Buses 36a and 36b for connection and reading, and these buses 30 to 36 connect between the CPU 20 and the bus control unit 26.
さらに前記マイクロコンピュー夕 10は、 32ビヅ トの命令ァドレスバス 84 と、 16ビッ トの命令デ一夕バス 86と、 32ビッ トのデ一夕アドレスバス 80 と、 32ビッ トの 2組の書込、 読み出し用デ一夕バス 82 a、 82 bとを含み、 これら各バス 80〜86は^〇1^22 , RAM24とバスコントロ一ルュニット 26との間を接続している。  Further, the microcomputer 10 has two sets of a 32-bit instruction address bus 84, a 16-bit instruction data bus 86, a 32-bit data address bus 80, and a 32-bit data bus. It includes write and read data buses 82a and 82b, and these buses 80 to 86 connect between the RAM 24 and the bus control unit 26.
バスコントロールュニッ ト 26は、 C P U 20から出力される各種リクエス ト 信号 (前記バスに出力された信号等) に基づき、 ROM22、 RAM24との間 のデータの入出力や、 外部アドレスバス 1 6、 外部デ一夕バス 18を介してこの 外部の回路、 例えば ROM 12、 1 八^114と。?1120との間のデータの入出 力を制御する。  The bus control unit 26 inputs / outputs data from / to the ROM 22 and the RAM 24 based on various request signals (signals output to the bus, etc.) output from the CPU 20, and controls an external address bus 16, This external circuit via external bus 18, for example ROM 12, 18 ^ 114. ? Controls the input and output of data between 1120.
前記 CPU 20は、 ROM 22から、 各種命令をオブジェク トコードとして読 み出すためのァドレス信号を出力する命令読出部 42と、 ROM 22から読み出 されたオブジェク トコードを解読し各種制御信号を出力する命令解読部 40と、 各種ァドレスや処理デ一夕を記憶する汎用のレジス夕群 4 とを含んで構成され る。 前記命令読出部 42は、 プログラムカウン夕等を含んで構成される。  The CPU 20 includes an instruction reading unit 42 that outputs an address signal for reading various instructions as object codes from the ROM 22, and an instruction that decodes the object codes read from the ROM 22 and outputs various control signals. It comprises a decryption unit 40 and a general-purpose registry group 4 for storing various addresses and processing data. The instruction reading unit 42 includes a program counter and the like.
本実施の形態のマイクロコンビュ一夕 10、 特にその CPU 20は、 32ビッ トのデ一夕を処理できる R I S C方式のものとして形成されている。 The microcomputer 10 of the present embodiment, especially its CPU 20 It is formed as a RISC system that can handle all nighttime data.
さらに、 本実施の形態の CPU 20は、 パイプラインとロード、 ストア型のァ —キテクチヤ一によって、 ほとんどすべての命令を一サイクルで実行する。 すべ ての命令は 16ビット固定長で記述されており、 前記 CPU 20の処理する命令 は極めて小さいオブジェク トコ一ドサイズとなるように構成されている。  Further, the CPU 20 of the present embodiment executes almost all instructions in one cycle by a pipeline and a load / store type architecture. All the instructions are described in a fixed length of 16 bits, and the instructions processed by the CPU 20 are configured to have an extremely small object code size.
すなわち、 前記内部 ROM 22には、 すべての命令が 16ビッ ト固定長のォブ ジェクトコ一ドとして記述されている。 そして、 各オブジェク トコードは、 命令 読出部 42から命令ァドレスバス 30を介して出力される 32ビッ トのアドレス 信号により指定される。 これにより読み出された 16ビッ トのォブジェクトコ一 ドは、 命令デ一夕バス 32を介して CPU20の命令解読部 40で解読され、 そ の解読結果に応じた各種演算処理が C P U 20内部で行われる。  That is, in the internal ROM 22, all instructions are described as 16-bit fixed-length object codes. Each object code is specified by a 32-bit address signal output from the instruction reading unit 42 via the instruction address bus 30. The 16-bit object code thus read out is decoded by the instruction decoding unit 40 of the CPU 20 via the instruction data bus 32, and various arithmetic processes according to the decoding result are executed inside the CPU 20. Will be
ところで、 このようにして命令解読部 40で解読されるォブジェクトコ一ドの 中には、 内部 RAM24内に記憶された処理データを所与のレジス夕 44に転送 するための口一ド命令が含まれることも多い。  By the way, the object code decoded by the instruction decoding unit 40 in this way includes a command for transferring the processing data stored in the internal RAM 24 to a given register 44. Often.
前記内部 RAM 24内に記憶される処理データは、 そのデータの内容によって、 1バイ ト (8ビッ ト) のデ一夕、 16バイ トのデ一夕、 32バイ トのデ一夕の 3 種類がある。  The processing data stored in the internal RAM 24 can be divided into three types, one byte (8 bits), 16 bytes, and 32 bytes, depending on the contents of the data. There is.
これに対し、 CPU 20は、 32ビッ トデ一夕を処理するように構成されてお り、 その内部のレジス夕群 44も 32ビッ トの記憶容量を有している。  On the other hand, the CPU 20 is configured to process a 32-bit data, and the register group 44 inside the CPU 20 also has a 32-bit storage capacity.
このため、 前記バスコントロールユニッ ト 26内には、 RAM 24から読み出 された 1バイ ト、 16ビッ 卜のデータを 32ビッ トに拡張して出力するための拡 張部 50が設けられている。  For this reason, in the bus control unit 26, there is provided an extension unit 50 for extending 1-byte and 16-bit data read from the RAM 24 to 32-bit and outputting the data. .
図 2には、 本実施の形態の拡張部 50の具体的な構成が示されている。  FIG. 2 shows a specific configuration of the extension unit 50 of the present embodiment.
前記拡張部 50には、 RAM 24からデ一夕バス 82 bを介し読み出された処 理デ一夕が図 2 Aに示すように D I N0、 D IN 1、 ·'·ϋ ΙΝ31の各ラインを 介して入力される。  The expansion unit 50 stores the processing data read out from the RAM 24 via the data bus 82b as shown in FIG. 2A on the lines DIN0, DIN1, and '31. Entered via.
本実施の形態の拡張部 50は、 図 2 Βに示す 1バイ ト処理デ一夕を対象とする 第 1のゼロ拡張向路 50— 1と、 図 2 Cに示す 1バイ ト処理デ一夕を対象とする 第 1のサイン拡張回路 50— 2と、 図 2 Dに示すように 16ビッ ト処理デ一夕を 対象とする第 2のゼロ拡張回路 50— 3と、 図 2 Eに示すように 16ビッ トの処 理データを対象とする第 2のサイン拡張回路 50— 4と、 32ビッ 卜の処理デー 夕を対象とする非拡張回路 50一 5とを含んで構成され、 これら各回路 50 - 1 〜50— 5には、 図 2 Aに示すように RAM 24から読み出された処理デ一夕が それそれ入力されている。 The extension unit 50 of the present embodiment includes a first zero extension route 50-1 for one-byte processing shown in FIG. 2A and a one-byte processing shown in FIG. 2C. Target A first sine extension circuit 50-2, a second zero extension circuit 50-3 for 16-bit processing data as shown in Figure 2D, and a 16-bit circuit as shown in Figure 2E And a non-extended circuit 50-15 for processing 32-bit processed data. Each of these circuits 50-1 to 50-4 At 50-5, the processing data read from the RAM 24 is input as shown in FIG. 2A.
前記非拡張回路 50— 5は、 RAM24から読み出された処理データが 32ビ ットデ一夕である場合に、 これをそのまま D0, D 1〜D 31の出力デ一夕とし て出力するものである。 すなわち 32ビッ トの入力デ一夕を、 そのまま 32ビッ トデ一夕として出力するものである。  The non-expansion circuit 50-5 outputs the data as output data of D0 and D1 to D31 as it is when the processing data read from the RAM 24 is 32 bits data. . In other words, a 32-bit input data is output as it is as a 32-bit data.
図 2 Bに示す第 1のゼロ拡張回路 50— 1は、 入力ライン D I N 0〜D I N 7 を介して入力される 8ビッ トの処理デ一夕を、 そのまま 8ビッ トの出力ライン D 0、 D 1〜D 7を介して出力するように形成されている。 さらに、 この第 1のゼ 口拡張回路 50— 1は、 残りの入力ライン D I N 8〜D I N 31を介して入力さ れるデ一夕を遮断し、 これらの入力ライン D IN8—D IN31に強制的に 「0」 のゼロ拡張用信号を入力する。 そして、 このゼロ拡張用信号を、 そのまま出カラ ィン D 8—D 31の出力データに拡張して出力する。  The first zero extension circuit 50-1 shown in FIG. 2B converts the 8-bit processing data input via the input lines DIN0 to DIN7 to the 8-bit output lines D0 and D as they are. It is formed to output through 1 to D7. Further, the first port expansion circuit 50-1 cuts off the data input through the remaining input lines DIN8 to DIN31, and forcibly connects these input lines DIN8 to DIN31. Input a zero extension signal of “0”. Then, the zero extension signal is directly extended to the output data of the output colors D8-D31 and output.
すなわち、 D IN0〜D IN7の 8ビッ トの処理データはそのまま 8ビヅ 卜の 出力デ一夕 D 0、 -D 7として出力され、 残りの 24ビッ トの上位桁 D 8 D 3 1は 「0」 の値に拡張されて出力されることになる。  That is, the 8-bit processed data of DIN0 to DIN7 is output as it is as 8-bit output data D0 and -D7, and the remaining upper bits of the 24 bits D8D31 are "8". It will be expanded to the value of "0" and output.
図 2 Cに示す第 1のサイン拡張回路 50— 2は、 入力ライン D I N 0〜D I 7を介して入力される 8ビッ トの処理デ一夕を、 そのまま 8ビッ トの出力ライン D0、 D 1 D 7を介して出力するように形成されている。 さらに、 この第 1の サイン拡張回路 50— 2は、 残りの入力ライン D IN8〜D IN31を介して入 力されるデ一夕を遮断し、 これらの入力ライン D I N 8〜D I N 31に強制的に 8ビットデ一夕のサインビッ トである D IN7を入力する。 そして、 この D IN 7のサイン信号のデータを、 そのまま出力ライン D 8〜D 31の出力データに拡 張して出力する。 すなわち、 D IN0〜D IN7の 8ビッ トの処理デ一夕はそのまま 8ビヅ トの 出力デ一夕 D0、 ···!) 7として出力され、 残りの 24ビッ トの上位桁 D 8 3 1は D I N 7の値にサイン拡張されて出力されることになる。 The first sine expansion circuit 50-2 shown in FIG. 2C converts the 8-bit processing data input via the input lines DIN0 to DI7 into the 8-bit output lines D0 and D1 as they are. It is formed to output through D7. Further, the first sine extension circuit 50-2 cuts off the data input through the remaining input lines DIN8 to DIN31 and forcibly connects the input lines DIN8 to DIN31. Input D IN7, which is the sign bit of the 8-bit data. Then, the data of the sine signal of DIN7 is directly extended to the output data of the output lines D8 to D31 and output. In other words, the 8-bit processing data of DIN0 to DIN7 is the same as the 8-bit output data D0,. ) 7 is output, and the remaining 24-bit high-order digits D831 are sign-extended to the value of DIN 7 and output.
このようにして、 本実施の形態の第 1のゼロ拡張回路 50— 1、 第 1のサイン 拡張回路 50— 2は、 入力される 8ビッ トの処理デ一夕を、 32ビッ トデ一夕に ゼロ拡張又はサイン拡張して出力することができる。  In this manner, the first zero extension circuit 50-1 and the first sine extension circuit 50-2 of the present embodiment reduce the input 8-bit processing data to 32-bit data. It can be output with zero extension or sign extension.
図 2D、 Eに示す第 2のゼロ拡張回路 50— 3、 第 2のサイン拡張回路 50— 4は、 16ビッ トの入力データを 32ビッ 卜にゼロ拡張またはサイン拡張するも のであり、 その原理は基本的には前記第 1のゼロ拡張回路 50— 1、 第 1のサイ ン拡張回路 50— 2と同じである。 すなわち、 入力ライン D I N 0〜D I N 15 を介して入力される 16ビットの処理データを、 そのまま 16ビッ トの出力ライ ン D 0、 D 1〜D 15を介して出力するように形成されている。 さらに、 この第 2のゼロ拡張回路 50— 3、 第 2のサイン拡張回路 50— 4は、 残りの入力ライ ン D I N 16〜D I N 31を介して入力されるデータを遮断し、 これらの入カラ イン D I N 16〜D I N 31に強制的に 「0」 のゼロ拡張用信号又は D I N 15 のサイン拡張用信号を入力する。 そして、 この拡張用の信号のデータを、 そのま ま出力ライン D 16〜D 31の出力データに拡張して出力する。  The second zero extension circuit 50-3 and the second sine extension circuit 50-4 shown in Figs. 2D and 2E perform zero extension or sine extension of 16-bit input data to 32 bits. Is basically the same as the first zero extension circuit 50-1 and the first sign extension circuit 50-2. That is, it is formed such that the 16-bit processed data input via the input lines DIN0 to DIN15 are output as they are via the 16-bit output lines D0 and D1 to D15. Further, the second zero extension circuit 50-3 and the second sine extension circuit 50-4 block the data input through the remaining input lines DIN16 to DIN31, and Forcibly input a zero extension signal of "0" or a sine extension signal of DIN 15 to DIN 16 to DIN 31. Then, the data of the extension signal is directly extended to the output data of the output lines D16 to D31 and output.
すなわち、 D I N0〜D IN 15の 16ビッ 卜の処理データはそのまま 16ビ ットの出力デ一夕 D 0、 -D 15として出力され、 残りの 16ビッ 卜の上位桁 D 16〜D 31は 「0」 または D I N 15の値に拡張して出力されることになる。 そして、 これら各回路 50— 1〜 50— 5の出力は、 図 3に示すようにマルチ プレクサ 60を介して 32ビヅ ト処理デ一夕として選択的に出力される。 そして、 マルチプレクサ 60を介して出力された 32ビッ トの処理デ一タは、 データバス 36bを介して CPU20へ向け出力されることになる。  In other words, the 16-bit processed data of DIN0 to DIN15 is output as it is as a 16-bit output data D0, -D15, and the upper digits D16 to D31 of the remaining 16 bits are output. Output will be expanded to "0" or DIN 15 value. The outputs of these circuits 50-1 to 50-5 are selectively output as a 32-bit processing data through the multiplexer 60 as shown in FIG. Then, the 32-bit processing data output through the multiplexer 60 is output to the CPU 20 via the data bus 36b.
このマルチプレクサ 60による選択動作は、 命令解読部 40から出力される選 択指令に基づき行われる。  The selection operation by the multiplexer 60 is performed based on a selection command output from the instruction decoding unit 40.
図 4 A〜Eには、 ROM 22内に記憶された各種ロード命令の具体例が示され ている。 ここでは、 理解を容易にするために、 各種ロード命令を、 ニーモニック コードとして表しているが、 これら各ロード命令は、 実際は 32ビッ トのォブジ ェク トコ一ドとして ROM22内に記憶されている。 4A to 4E show specific examples of various load instructions stored in the ROM 22. Here, to make it easier to understand, various load instructions, mnemonics Although represented as codes, each of these load instructions is actually stored in the ROM 22 as a 32-bit object code.
これら各ロード命令において、 最初に記述された 「ld」 は命令がロード命令 であることを表し、 次に記述される 「b」 、 「ub」 、 「h」 、 「uh」 、 「w」 は RAM24から読み出される処理データのサイズと、 デ一夕をサイン拡張また はゼロ拡張するかの拡張形式を特定するためのデータである。 すなわち、 「b」 「h」 「w」 は、 読み出される処理デ一夕のサイズがそれそれ 1バイ ト (8ビヅ ト) 、 16バイ ト、 32バイ トであることを表す。 また 「ii」 は、 処理データを ゼロ拡張することを表し、 「u」 の付いてないロード命令は、 処理デ一夕をサイ ン拡張することを表す。  In each of these load instructions, "ld" described first indicates that the instruction is a load instruction, and "b", "ub", "h", "uh", and "w" described next are It is data for specifying the size of the processing data read from the RAM 24 and the extension format of sign extension or zero extension of the data. That is, “b”, “h”, and “w” indicate that the size of the processing data to be read is 1 byte (8 bytes), 16 bytes, or 32 bytes, respectively. Also, “ii” indicates that the processing data is zero-extended, and a load instruction without “u” indicates that the processing data is sign-extended.
また、 [%r e g 1 ] は、 拡張部 50で 32ビッ トに拡張されて出力される処 理デ一夕をロードするレジス夕を表し、 ここではレジス夕群 44の中から、 re g 1のレジス夕に 32ビッ ト処理データを記憶することを表している。  Also, [% reg 1] represents a register evening to load the processing data that is expanded and output to 32 bits by the extension unit 50. This means that 32-bit processing data is stored in the register.
また、 最後に記述された [%re g2] は、 処理デ一夕を RAM24から読み 出すためのァドレスが記憶されたレジス夕を表し、 ここではレジスタ群 44の中 の r e g 2に記憶された 32ビッ トァドレスデータに基づき R AM 24から処理 デ一夕を読み出すことを意味している。  Also, [% reg2] described at the end represents a register storing an address for reading out the processing data from the RAM 24. In this case, the register stored in reg2 of the register group 44 is 32. This means that processing data is read from RAM 24 based on the bit address data.
例えば命令読出部 42の指令により ROM 22から図 4 Aに示す口一ド命令の オブジェクトコ一ドが読み出された場合を想定すると、 このオブジェク トコ一ド は CPU 20の命令解読部 40で解読される。  For example, assuming that the object code of the mouth instruction shown in FIG. 4A is read from the ROM 22 by the instruction of the instruction reading unit 42, this object code is decoded by the instruction decoding unit 40 of the CPU 20. Is done.
そして、 この命令解読部 40は、 レジス夕 r e g 2に記憶された 32ビッ トの ァドレスデ一夕を読み出し、 バスコントロールュニッ ト 26へ向けデータバス 3 4を介してこのァドレスデータおよびデ一夕サイズ bを出力する。 これにより、 バスコントロールュニッ ト 26は、 RAM 24から当該ァドレスデータで指定さ れた領域から、 前記デ一夕サイズ bで指定された大きさの処理デ一夕、 ここでは 1バイ トの処理データを読み出し、 拡張部 50へ入力する。  Then, the instruction decoding unit 40 reads out the 32-bit address data stored in the register reg 2 and sends the address data and data size via the data bus 34 to the bus control unit 26. Output b. As a result, the bus control unit 26 processes the data of the size specified by the data size b from the area specified by the address data from the RAM 24, and in this case, processes one byte. The data is read and input to the extension unit 50.
このとき、 命令解読部 40は、 図 4 Aに示すロード命令に含まれるデ一夕サイ ズ 「b I に基づき、 拡張部 50に含まれるマルチプレクサ 60へ向け、 第 1のサ ィン拡張回路 5 0— 2の出力を選択するように制御信号を出力する。 At this time, the instruction decoding unit 40 sends the first signal to the multiplexer 60 included in the extension unit 50 based on the data size “b I” included in the load instruction shown in FIG. Output a control signal so as to select the output of the pin extension circuit 50-2.
従って、 例えばこのとき R A M 2 4から読み出される 1バイ トのデ一夕が図 5、 図 6に示すようなデ一夕である場合には、 この 1バイ トデ一夕は第 1のサイン拡 張回路 5 0— 2によって同図に示すように 3 2ビッ トデ一夕にサイン拡張された 状態で C P U 2 0へ入力され、 この 3 2ビッ ト拡張データはロード命令で指定さ れるレジスタ r e g lへロードされることになる。  Therefore, for example, if the one-byte data read from the RAM 24 at this time is the one shown in FIGS. 5 and 6, this one-byte data is stored in the first sign extension. As shown in the same figure, the signal is input to the CPU 20 with the sign extended to 32 bits by the circuit 50-2, and this 32 bits extended data is loaded into the register regl specified by the load instruction. Will be done.
また、 R O M 2 2から図 4 Bに示すように、 1バイ トの処理デ一夕をゼロ拡張 して口一ドする命令が読み出された場合には、 前述した口一ド命令と同様に r e g 2に記憶されたァドレス命令に基づき R A M 2 4から 1バイ トの処理デ一夕を 読み出し、 拡張部 5 0において 3 2ビッ トデ一夕にゼロ拡張する。 このとき、 読 み出された処理データが図 5に示す 1バイ トデ一夕である場合には、 第 1のゼロ 拡張回路 5 0一 1を用いてこの処理データは同図に示すように 3 2ビッ トにゼロ 拡張された後、 レジス夕 r e g 1へ口一ドされることになる。  In addition, as shown in FIG. 4B, when an instruction to perform one-byte processing is extended from ROM 22 to zero and read, a similar instruction to the above-described one is performed. Based on the address instruction stored in reg 2, one byte of processing data is read from RAM 24, and the extension unit 50 zero-extends the data to 32 bits. At this time, if the read processing data is one-byte data shown in FIG. 5, the processing data is read out by using the first zero extension circuit 501 as shown in FIG. After being zero-extended to two bits, it will be spoken to the reg1.
図 5の 8ビヅ トデ一夕では、 D I N 7のサインビッ トが ' 0 ' なのでサイン拡 張とゼロ拡張は同じ値になる。 しかし、 図 6の 8ビッ トデータのように、 D I N 7のサインビッ トが ' 1, の場合はサイン拡張とゼロ拡張は違った値になる。 図 4 D , Cに示すロード命令を用いて、 1 6ビッ トの処理データを 3 2ビッ ト に 0またはサイン拡張してレジスタ 1にロードする場合には、 命令解読部 4 0は 拡張部 5 0のマルチプレクサ 6 0へ向け、 第 2のゼロ拡張回路 5 0— 3又は第 2 のサイン拡張回路 5 0一 4の出力を選択する旨の制御信号を出力する点を除いて は、 前記第 1実施例と同様な動作を行う。  In the 8-bit data of FIG. 5, since the sign bit of DIN 7 is “0”, the sign extension and the zero extension have the same value. However, when the sign bit of DIN7 is '1' as in the case of the 8-bit data in Fig. 6, the sign extension and the zero extension have different values. When using the load instructions shown in Fig. 4D and C to load 16 bits of processing data into 32 bits by registering 0 or sign extension into 32 bits, and load the register 1 with the instruction decoding unit 40, the extension unit 5 Except for outputting a control signal to select the output of the second zero extension circuit 50-3 or the output of the second sine extension circuit 50-14 toward the multiplexer 60 of 0, The same operation as in the embodiment is performed.
また、 図 4 Eに示すロード命令を実行する場合には、 命令解読部 4 0は拡張部 5◦のマルチプレクサ 6 0へ向け、 非拡張回路 5 0— 5の出力を選択する旨の制 御信号を出力する以外は、 前述した口一ド命令と同様に動作を行う。  When the load instruction shown in FIG. 4E is executed, the instruction decoding unit 40 sends a control signal to the multiplexer 60 of the extension unit 5◦ to select the output of the non-extension circuit 50-5. The operation is the same as that of the above-mentioned closed instruction except that is output.
このようにして、 本実施の形態のマイクロコンピュータ 1 0によれば、 簡単な 回路構成で、 R A M 2 4から読み出される 1バイ ト、 1 6ビッ トの処理デ一夕を、 3 2ビッ トのデ一夕に簡単にかつ迅速にサイン拡張またはゼロ拡張することがで きる。 特に、 本実施の形態によれば、 このような処理データの拡張を、 1命令サイク ルで実行することにより、 あたかも拡張部 5 0を C P U 2 0内に設けた場合と同 様な処理スピードで、 前述したデータの読み出しと拡張処理とを実行することが できる。 In this way, according to the microcomputer 10 of the present embodiment, the processing of 1 byte and 16 bits read from the RAM 24 can be reduced to 32 bits by a simple circuit configuration. Sign extension or zero extension can be performed easily and quickly in a day. In particular, according to the present embodiment, by executing such processing data expansion in one instruction cycle, it is possible to perform processing at the same processing speed as when the expansion unit 50 is provided in the CPU 20. Thus, the above-described data reading and extension processing can be performed.
第 2の実施の形態  Second embodiment
次に本発明の好適な第 2の実施の形態を説明する。  Next, a second preferred embodiment of the present invention will be described.
本実施の形態のマイクロコンピュータ 1 0は、 C P U 2 0内のレジスタ 4 4内 に格納されている 3 2ビッ トデータの内、 例えば 1バイ ト、 または 1 6ビッ トの データを、 バスコントロールュニッ ト 2 6の拡張部 5 0を用いて 3 2ビッ トにゼ 口拡張またはサイン拡張して、 所望のレジス夕へ格納することを特徴とする。 図 3 Bには、 このための拡張部 5 0の具体的な構成が示されている。 本実施の 形態の拡張部 5 0は、 R A M 2 4のデータバス 8 2 bからのデ一夕と、 デ一夕バ ス 3 6を介して。卩11 2 0から送られてくるデ一夕とがマルチプレクサ 6 2を介 して選択的に入力されるように構成されている。 このマルチプレクサ 6 2への選 択指令は、 命令解読部 4 0から出力される。  The microcomputer 10 of the present embodiment transmits, for example, 1-byte or 16-bit data out of the 32-bit data stored in the register 44 in the CPU 20 to the bus control unit. It is characterized in that it is subjected to zero-bit or sign-expansion to 32 bits by using the extension section 50 of the block 26 and stored in a desired register. FIG. 3B shows a specific configuration of the extension unit 50 for this purpose. The extension section 50 of the present embodiment is connected to the data bus 82 b of the RAM 24 via the data bus 82 and the data bus 36. The data sent from the rice pad 110 is selectively input via the multiplexer 62. The selection instruction to the multiplexer 62 is output from the instruction decoding unit 40.
命令解読部 4 0は、 R O M 2 2から図 4に示すタイプの口一ド命令が読み出さ れた場合に、 R A M 2 4からのデータバス 8 2 bを選択するようにマルチプレク サ 6 2を制御すること以外は、 前記第 1の実施の形態と同様に動作する。  The instruction decoding unit 40 controls the multiplexer 62 to select the data bus 82b from the RAM 24 when a read instruction of the type shown in FIG. 4 is read from the ROM 22. Otherwise, the operation is the same as in the first embodiment.
また、 命令解読部 4 0は、 R O M 2 2から図 8に示すタイプのロード命令が読 み出された場合に、 このロード命令を解釈し、 レジス夕群 4 4内の所定レジス夕 に記憶されている 3 2ビッ トデ一夕の内、 8ビッ ト、 または 1 6ビッ トのデータ を 0またはサイン拡張として他のレジス夕へロードするという命令を実行する。 以下に、 その詳細を説明する。  When a load instruction of the type shown in FIG. 8 is read from the ROM 22, the instruction decoding unit 40 interprets the load instruction and stores it in a predetermined register in the register group 44. Executes an instruction to load 8-bit or 16-bit data out of the 32 bits stored in other registers as 0 or sign extension. The details are described below.
命令解読部 4 0は、 図 8に示すロード命令に含まれる読み出し対象のレジスタ r sから処理データを読み出し、 これをデ一夕バス 3 6 aを介して拡張部 5 0へ 向け出力する。  The instruction decoding unit 40 reads the processing data from the read target register rs included in the load instruction shown in FIG. 8, and outputs the processed data to the extension unit 50 via the data bus 36a.
これと同時に、 命令解読部 4 0は、 マルチプレクサ 6 2がデ一夕バス 3 6 aか らの処理デ一夕を選択出力し、 マルチプレクサ 6 0が処理デ一夕のサイズおよび 拡張の形式適合した回路 5 0— 1〜5 0— 5からの拡張デ一夕を選択し、 デ一夕 バス 3 6 bを介し C P U 2 0へ向け出力するように、 各マルチプレクサ 6 2、 6 0に向け選択指令を出力する。 At the same time, in the instruction decoding unit 40, the multiplexer 62 selects and outputs the processing data from the data bus 36a, and the multiplexer 60 outputs the processing data size and A circuit adapted to the format of the extension 5 0 — 1 to 5 0 — Selects the extension data from 5 to 5 and outputs the data to the CPU 20 via the bus 36 b. Output selection command toward 0.
図 8には、 前記口一ド命令の具体例が示されている。 ここでは、 理解を容易に するために、 各種ロード命令を、 ニーモニックコードとして表している。 これら 各口一ド命令は、 実際は 3 2 ビヅ トのォブジェク トコードとして R O M 2 2内に 記憶されている。  FIG. 8 shows a specific example of the above-mentioned spoken command. Here, various load instructions are represented as mnemonic codes to facilitate understanding. Each of these mouth instructions is actually stored in ROM 22 as a 32-bit object code.
これら各ロード命令において、 最初に記述された 「 l d」 は、 命令が口一ド命 令であることを表す。 次に記述される 「b」 、 「u b」 、 「h」 、 「u h」 は、 レジス夕 r sから読み出される処理デ一夕のサイズと、 デ一夕をサイン拡張また はゼロ拡張するかの拡張形式を特定するためのデータである。 すなわち、 「b」 「h」 は、 読み出される処理デ一夕のサイズがそれそれ 1バイ ト (8ビッ ト) 、 1 6バイ ト、 3 2バイ トであることを表す。 また 「u」 は、 処理データをゼロ拡 張することを表し、 「u」 の付いてないロード命令は、 処理デ一夕をサイン拡張 することを表す。  In each of these load instructions, “ld” described first indicates that the instruction is a spoken instruction. "B", "ub", "h", and "uh" described next are the size of the processing data read from the register rs, and whether the data is sign-extended or zero-extended. This is data for specifying the format. That is, “b” and “h” indicate that the size of the read processing data is 1 byte (8 bits), 16 bytes, and 32 bytes, respectively. Also, “u” indicates that the processing data is zero-extended, and a load instruction without “u” indicates that the processing data is sign-extended.
また、 「%r d」 は、 拡張部 5 0で 3 2ビッ トに拡張されて出力される処理デ 一夕をロードするレジス夕を表す。 ここではレジス夕群 4 4の中から、 r dのレ ジス夕に 3 2ビッ ト処理データを記憶することを表している。  “% Rd” indicates a register for loading the processing data output to the expansion unit 50 after being expanded to 32 bits. Here, it is shown that 32 bits of processing data are stored in the rd register evening from the resist evening group 44.
また、 最後に記述された 「%r s」 は、 処理データが記憶されたレジス夕を表 す。 ここではレジス夕群 4 4の中のレジス夕 r sに記憶された処理デ一夕を読み 出すことを意味している。  “% R s” described at the end indicates the register where the processed data is stored. Here, it means reading out the processing data stored in the Regis evening r s in the Regis evening group 4 4.
次に、 前記ロード命令を実行する場合の具体例を説明する。  Next, a specific example when the load instruction is executed will be described.
この場合には、 命令解読部 4 0は、 ロード命令のデータに含まれる読み出し対 象のレジス夕 r sから、 処理デ一夕を読み出し、 これをデータバス 3 6 aを介し て拡張部 5 0へ向け出力する。  In this case, the instruction decoding unit 40 reads out the processing data from the register rs to be read included in the data of the load instruction and sends it to the extension unit 50 via the data bus 36a. Output to
このとき命令解読部 4 0は、 データバス 3 6 aからの入力を選択するようマル チプレクサ 6 2を制御する。 これにより、 レジスタ r sから読み出された処理デ —夕は、 各回路 5 0— 1〜 5 0— 5へ入力される。 また、 命令解読部 40は、 解読したロード命令に含まれる処理データのサイズ および、 サイン拡張またはゼロ拡張の拡張の種別データ等に基づき、 マルチプレ クサ 60へ向け選択指令を出力する。 この選択指令は、 前記第 1の実施の形態と 同様であるので、 ここではその説明は省略する。 At this time, the instruction decoding unit 40 controls the multiplexer 62 to select an input from the data bus 36a. As a result, the processing data read from the register rs is input to each of the circuits 50-1 to 50-5. The instruction decoding unit 40 outputs a selection instruction to the multiplexer 60 based on the size of the processing data included in the decoded load instruction and the type data of the sign extension or the zero extension. Since this selection command is the same as in the first embodiment, the description is omitted here.
このようにして、 マルチプレクサ 60から 32ビヅ トデ一夕にサイン拡張また はゼロ拡張して出力される処理デ一夕は、 デ一夕バス 36 bを介して所望のレジ ス夕 r dに書き込み制御される。  In this way, the processing data that is sign-extended or zero-extended from the multiplexer 60 to the 32-bit data and output is written to the desired register rd via the data bus 36b. Is done.
以上説明したように、 本実施の形態によれば、 CPU20の外部の回路、 具体 的にはバスコントロールュニッ ト 26内に設けられた拡張部 50を用い、 RAM 24から読み出された処理データを 32ビッ トにゼロ拡張またはサイン拡張でき るばかりでなく、 CPU 20内のレジス夕に記憶された 8ビヅ トまたは 16ビッ 卜の処理データを、 必要に応じて 32ビッ トにゼロ拡張またはサイン拡張して所 望のレジス夕に格納することができる。  As described above, according to the present embodiment, the processing data read from the RAM 24 using the circuit external to the CPU 20, specifically, the extension unit 50 provided in the bus control unit 26 is used. Not only can be zero-extended or sign-extended to 32 bits, but also the 8-bit or 16-bit processed data stored in the register in the CPU 20 can be zero-extended or 32-bit processed as necessary. The sign can be extended and stored at the desired register evening.
特に、 本実施の形態によれば、 このような処理データの拡張を、 1命令サイク ルで実行することにより、 あたかも拡張部 50を CPU20内に設けた場合と同 様な処理スビ一ドで、 前述したデータの読み出しと拡張処理とを実行することが できる。  In particular, according to the present embodiment, by executing such processing data expansion in one instruction cycle, the processing speed is the same as when the expansion unit 50 is provided in the CPU 20. The above-described data reading and extension processing can be performed.
さらに、 前記第 1および第 2の実施の形態によれば、 このような処理デ一夕の 拡張を、 1命令サイクルで実行することにより、 従来よりコードサイズを縮小で きるので、 例えばオンチップ上の: ROM22を有効に使うことができる。  Further, according to the first and second embodiments, by executing such an extension of the processing data in one instruction cycle, the code size can be reduced as compared with the related art. : ROM22 can be used effectively.
図 7には、 本実施の形態のマイクロコンピュータ 10の具体的な機能ブロッ ク図が示されている。  FIG. 7 shows a specific functional block diagram of microcomputer 10 of the present embodiment.
該マイクロコンピュータ 10は、 32ビッ トマイクロコントローラであり、 C PU 20とROM22とRAM24、 高周波発信回路 9 1 0、 低周波発信回路 9 20、 リセッ ト回路 930、 プリスケ一ラ 940、 1 6ビッ トプログラマブル夕 イマ 950、 8ビッ トプログラマブル夕イマ 960、 クロック夕イマ 970、 ィ ンテリジェント DMA 980、 高速 DMA 990、 割り込みコントローラ 800、 シリアルインターフェース 8 1 0、 バスコントロールュニッ ト (B CU) 60、 A/D変換器 830、 D/A変換器 840、 入力ポ一ト 850、 出力ポート 86 0、 IZOポート 870、 及びそれらを接続する各種バス 92、 94、 96、 9 8、 各種ピン 890等を含む。 The microcomputer 10 is a 32-bit microcontroller, including a CPU 20, a ROM 22, a RAM 24, a high-frequency transmission circuit 910, a low-frequency transmission circuit 920, a reset circuit 930, a prescaler 940, and a 16-bit microcomputer. Programmable timer 950, 8-bit programmable timer 960, clock timer 970, intelligent DMA 980, high-speed DMA 990, interrupt controller 800, serial interface 810, bus control unit (BCU) 60, A / D converter 830, D / A converter 840, input port 850, output port 860, IZO port 870, and various buses 92, 94, 96, 98, and various pins 890 to connect them Including.
前記 CPU20は、 スタックポインタ専用レジスタである SPを有し、 前述し た各種のスタックポインタ専用命令の解読、 実行を行う。 該 CPU 20は、 前述 した構成を有しており、 命令解読手段、 命令読出手段、 及び各種命令の実行手段 として機能する。  The CPU 20 has an SP that is a stack pointer dedicated register, and decodes and executes the various stack pointer dedicated instructions described above. The CPU 20 has the above-described configuration, and functions as an instruction decoding unit, an instruction reading unit, and a unit for executing various instructions.
本発明のマイクロコンピュー夕は例えばプリン夕一等のパソコン周辺機器や、 携帯機器等の各種の電子機器に適用可能である。 この様にすると、 簡単な構成で 高速に処理の行える情報処理回路を内蔵することができるため、 安価で高機能な 電子機器を提供することが出来る。  The microcomputer of the present invention is applicable to various types of electronic devices such as personal computer peripheral devices such as a pudding device and portable devices. With this configuration, an information processing circuit that can perform high-speed processing with a simple configuration can be built in, so that an inexpensive and highly functional electronic device can be provided.
なお本発明は、 上記実施例で説明したものに限らず、 種々の変形実施が可能で ある。  The present invention is not limited to those described in the above embodiments, and various modifications can be made.
例えば、 前記実施の形態では、 本発明をリスクタイプの CPUに適用する場合 を例に取り説明したが、 これ以外のタイプの CPU、 例えばシスクタイプの CP U等に幅広く適用することができる。  For example, in the above embodiment, the case where the present invention is applied to a risk type CPU has been described as an example. However, the present invention can be widely applied to other types of CPUs, for example, a sysk type CPU.

Claims

請 求 の 範 囲 The scope of the claims
1 . 処理データに対し、 そのデータサイズに合わせてゼロ拡張およびサイン 拡張の少なくとも一方の拡張処理を行い所与のレジス夕に転送するためのロード 命令を解読して、 前記処理データのサイズおよび前記拡張処理の形式に対応した 制御信号を出力する命令解読手段を備えた情報処理手段と、  1. The processing data is subjected to at least one of zero extension and sign extension according to the data size, and a load instruction for transferring to a given register is decoded. An information processing means having an instruction decoding means for outputting a control signal corresponding to the format of the extended processing;
前記情報処理手段と接続され、 前記処理データに対し前記制御信号に従って所 定の処理ビッ ト数までゼロ拡張およびサイン拡張の少なくとも 1方の拡張処理を 行い、 前記情報処理手段に向け出力する拡張手段と、  An extension unit connected to the information processing unit, performing at least one of an extension process of zero extension and a sine extension on the processing data to a predetermined number of processing bits according to the control signal, and outputting the processed data to the information processing unit When,
を含むことを特徴とするマイクロコンピュータ。  A microcomputer comprising:
2 . 処理データ記憶手段に記憶された処理データを所与のレジス夕に転送す るためのロード命令であって、 転送する処理デ一夕およびそのサイズを特定する ためのデ一夕と、 処理データをゼロ拡張、 サイン拡張するための拡張形式を特定 するためのデ一夕とを含む前記ロード命令のオブジェクトコ一ドを解釈し実行す るマイクロコンピュ一夕において、  2. A load instruction for transferring the processing data stored in the processing data storage means to a given register, including a processing data to be transferred and a data specifying the size thereof; A microcomputer for interpreting and executing the object code of the load instruction, including zero extension of data, and data for specifying an extension format for sign extension;
前記ロード命令のオブジェク トコ一ドを解読して、 データ読み出しァドレス信 号を出力するとともに、 前記処理データのサイズおよび拡張形式に対応した拡張 制御信号を出力する命令解読手段を備えた情報処理手段と、  Information processing means for decoding an object code of the load instruction, outputting a data read address signal, and outputting an extension control signal corresponding to the size and extension format of the processing data; ,
前記情報処理手段と接続され、 前記データ読み出しァドレス信号に基づき前記 処理データ記憶手段から読み出された処理データに対し、 前記拡張制御信号に従 つて所定の処理ビッ ト数までゼロ拡張およびサイン拡張の少なくとも 1方の拡張 処理を行い、 前記情報処理手段に向け出力する拡張手段と、  The processing data read from the processing data storage means based on the data read address signal is connected to the information processing means. Zero extension and sign extension are performed to a predetermined number of processing bits in accordance with the extension control signal. An extension unit that performs at least one extension process and outputs the information to the information processing unit;
を含むことを特徴とするマイクロコンピュー夕。  A microcomputer comprising:
3 . 請求項 2において、  3. In Claim 2,
前記オブジェク トコ一ドを含む各種のォブジヱク トコ一ドが記憶された第 1の 記憶手段と、  First storage means for storing various object codes including the object code;
前記処理デ一夕がデ一夕読み出しアドレスに対応付けて記憶された、 前記処理 デー夕記憶手段としての第 2の記憶手段と、  Second processing means as the processing data storage means, wherein the processing data is stored in association with a data reading address;
前記情報処理手段に設けられ、 前記第 1の記憶手段からのオブジェク トコード の読み出しを制御する命令読出手段と、 An object code provided in the information processing means, the object code being provided from the first storage means; Command reading means for controlling reading of
を含み、 前記第 1および第 2の記憶手段は、 前記情報処理手段とパスラインを 介して接続され、  Wherein the first and second storage means are connected to the information processing means via a pass line,
前記命令解読手段は、  The instruction decoding means,
前記第 1の記憶手段から読み出されたオブジェクトコ一ドを解読して、 前記第 2の記憶手段のデ一夕読み出しァドレス信号を出力するとともに、 前記拡張手段 に向け前記拡張制御信号を出力し、  It decodes the object code read from the first storage means, outputs a data read address signal of the second storage means, and outputs the extension control signal to the extension means. ,
前記拡張手段は、  The extension means includes:
前記データ読み出しァドレス信号に基づき前記第 2の記憶手段から読み出され た処理データを、 前記拡張制御信号に従って所定の処理ビット数までゼロ拡張お よびサイン拡張の少なくとも 1方の拡張処理を行い出力することを特徴とするマ ィクロコンピュー夕。  The processing data read from the second storage means based on the data read address signal is subjected to at least one of a zero extension and a sign extension to a predetermined number of processing bits according to the extension control signal and output. Microcomputing features.
4 . 情報処理手段内部の第 1のレジスタに記憶された処理データを情報処理 手段内部の第 2のレジス夕に転送するための口一ド命令であって、 前記処理デ一 夕のサイズを特定するためのデータと、 処理デ一夕をゼロ拡張、 サイン拡張する ための拡張形式を特定するためのデ一夕とを含む前記口一ド命令のオブジェクト コードを解釈し実行するマイクロコンピュ一夕において、  4. A command to transfer the processing data stored in the first register inside the information processing means to the second register inside the information processing means, and to specify the size of the processing data And a microcomputer for interpreting and executing the object code of the above-mentioned instruction, which includes data for performing the process and zero-extension of the processing data and data for specifying an extension format for sign-extending. ,
前記ロード命令のォブジヱクトコ一ドを解読して、 前記第 1のレジスタから処 理デ一夕を読み出して出力するとともに、 前記データのサイズおよび拡張形式に 対応した拡張制御信号を出力する命令解読手段を備えた情報処理手段と、 前記情報処理手段と接続され、 前記第 1のレジス夕から読み出された処理デー 夕に対し、 前記拡張制御信号に従って所定の処理ビット数までゼロ拡張およびサ イン拡張の少なくとも 1方の拡張処理を行い、 前記情報処理手段に向け出力する 拡張手段と、  Instruction decoding means for decoding the object code of the load instruction, reading and outputting the processing data from the first register, and outputting an extension control signal corresponding to the data size and extension format. Information processing means, connected to the information processing means, and for processing data read from the first register, zero extension and sign extension to a predetermined number of processing bits in accordance with the extension control signal. An extension unit that performs at least one extension process and outputs the information to the information processing unit;
を含み、  Including
前記情報処理手段は、  The information processing means includes:
拡張処理された前記デ一夕を第 2のレジス夕に書き込むことを特徴とするマイ クロコンピュー夕。 A micro computer, wherein the extended data is written in a second register.
5 . 請求項 4において、 5. In Claim 4,
前記オブジェクトコ一ドを含む各種のオブジェク トコ一ドが記憶された第 1の 記憶手段と、  First storage means for storing various object codes including the object code;
前記情報処理手段に設けられ、 前記第 1の記憶手段からのオブジェク トコード の読み出しを制御する命令読出手段と、  Command reading means provided in the information processing means for controlling reading of an object code from the first storage means;
を含み、 前記第 1の記憶手段は、 前記情報処理手段とバスラインを介して接続 されたことを特徴とするマイクロコンピュー夕。  A microcomputer, wherein the first storage means is connected to the information processing means via a bus line.
6 . 処理データ記憶手段に記憶された処理デ一夕を所与のレジス夕に転送す るための第 1のロード命令であって、 転送する処理データおよびそのサイズを特 定するためのデータと、 処理デ一夕をゼロ拡張、 サイン拡張するための拡張形式 を特定するためのデータとを含む前記第 1のロード命令の第 1のォブジェク トコ 6. A first load instruction for transferring the processing data stored in the processing data storage means to a given register, which is processing data to be transferred and data for specifying its size. A first object code of the first load instruction, including data for specifying an extension format for zero-extending the processing data and a sign extension.
―ドを解釈し実行するとともに、 -While interpreting and executing
情報処理手段内部の第 1のレジス夕に記憶された処理デ一夕を情報処理手段内 部の第 2のレジス夕に転送するための第 2のロード命令であって、 前記処理デー 夕のサイズを特定するためのデータと、 処理データをゼロ拡張、 サイン拡張する ための拡張形式を特定するためのデータとを含む前記第 2のロード命令の第 2の オブジェク トコ一ドを解釈し実行するマイクロコンピュー夕において、  A second load instruction for transferring a processing data stored in a first register inside the information processing means to a second registry inside the information processing means, the size of the processing data being A micro-processor for interpreting and executing the second object code of the second load instruction including data for specifying an extension format and data for specifying an extension format for performing zero extension and sign extension of the processing data. In the computer evening,
前記各ォブジェク トコ一ドを含む各種のオブジェク トコ一ドが記憶された第 1 の記憶手段と、  First storage means in which various object codes including the object codes are stored;
前記処理データがデータ読み出しァドレスに対応付けて記憶された、 前記処理 データ記憶手段としての第 2の記憶手段と、  A second storage unit serving as the processing data storage unit, wherein the processing data is stored in association with a data read address;
前記第 1および第 2の記憶手段とバスラインを介して接続された情報処理手段 と、  Information processing means connected to the first and second storage means via a bus line;
前記情報処理手段とバスラインを介して接続され、 前記処理デ一夕に対する拡 張処理を行い、 前記情報処理手段に向け出力する拡張手段と、  An extension unit connected to the information processing unit via a bus line, performing an extension process on the processing data, and outputting the extension to the information processing unit;
を含み、  Including
前記情報処理手段は、  The information processing means includes:
前記第 1の記憶手段からのオブジェク トコードの読み出しを制御する命令読出 手段と、 Instruction reading for controlling reading of an object code from the first storage means Means,
読み出された前記第 1、 第 2のォブジェク トコ一ドを解読する命令解読手段と、 前記第 1および第 2のレジス夕として機能する複数のレジス夕と、  Instruction decoding means for decoding the read first and second object codes; and a plurality of registry functions functioning as the first and second registry codes;
を含み、  Including
前記命令解読手段は、  The instruction decoding means,
前記第 1のロード命令の第 1のォブジェク トコードを解読して、 前記第 2の記 憶手段のデータ読み出しァドレス信号を出力するとともに、 前記処理データのサ ィズおよび拡張形式に対応した拡張制御信号を出力し、  A first object code of the first load instruction is decoded, a data read address signal of the second storage unit is output, and an extension control signal corresponding to the size and extension format of the processing data And output
前記第 2のロード命令の第 2のォブジェク トコードを解読して、 前記第 1のレ ジス夕から処理デ一夕を読み出すとともに、 前記デ一夕のサイズおよび拡張形式 に対応した拡張制御信号を出力し、  Decoding the second object code of the second load instruction, reading out the processing data from the first register, and outputting an extended control signal corresponding to the size and expansion format of the data And
前記拡張手段は、  The extension means includes:
前記データ読み出しァドレス信号に基づき第 2の記憶手段から読み出された処 理データに対し、 前記拡張制御信号に従って所定の処理ビッ ト数までゼロ拡張お よびサイン拡張の少なくとも 1方の拡張処理を行い、 前記情報処理手段に向け出 力するとともに、  The processing data read from the second storage means based on the data read address signal is subjected to at least one of zero extension and sign extension to a predetermined number of processing bits according to the extension control signal. Output to the information processing means,
前記第 1のレジス夕から読み出された処理データに対し、 前記拡張制御信号に 従って所定の処理ビッ ト数までゼロ拡張およびサイン拡張の少なくとも 1方の拡 張処理を行い、 前記情報処理手段に向け出力し、  The processing data read from the first register is subjected to at least one of extension processing of zero extension and sign extension up to a predetermined number of processing bits in accordance with the extension control signal. Output for
前記情報処理手段は、  The information processing means includes:
前記第 2の口一ド命令に従い拡張処理された前記デ一夕を第 2のレジス夕に書 き込むことを特徴とするマイクロコンピュータ。  A microcomputer which writes the extended data processed in accordance with the second command to a second register.
7 . 請求項 1〜 6のいずれかにおいて、  7. In any one of claims 1 to 6,
前記拡張手段は、  The extension means includes:
前記デ一夕のサイズ毎に、 読み出された処理データをゼロ拡張するゼロ拡張手 段およびサイン拡張するサイン拡張手段と、  Zero extension means for performing zero extension on the read processing data and sign extension means for performing sign extension for each of the data sizes;
前記拡張制御信号に従って、 前記各拡張手段の出力を選択出力する選択手段と、 を含むことを特徴とするマイクロコンピュータ。 A selection unit for selecting and outputting an output of each of the extension units according to the extension control signal.
8 . 請求項 1〜 7のいずれかにおいて、 8. In any one of claims 1 to 7,
R I S C方式であることを特徴とするマイクロコンピュータ。  A microcomputer characterized by the RISC method.
9 . 請求項 1〜8のいずれかにおいて、  9. In any one of claims 1 to 8,
固定長の命令を解読し、 該命令に基づき実行処理を行うことを特徴とするマイ クロコンピュ一夕。  A microcomputer for decoding fixed-length instructions and performing execution processing based on the instructions.
1 0 . 請求項 1〜 9のいずれかのマイクロコンビュ一夕を含むことを特徴と する電子機器。  10. An electronic device comprising the microcombiner according to any one of claims 1 to 9.
PCT/JP1998/001515 1997-04-03 1998-04-02 Microcomputer and electronic equipment WO1998044410A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP10104997 1997-04-03
JP9/101049 1997-04-03

Publications (1)

Publication Number Publication Date
WO1998044410A1 true WO1998044410A1 (en) 1998-10-08

Family

ID=14290276

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1998/001515 WO1998044410A1 (en) 1997-04-03 1998-04-02 Microcomputer and electronic equipment

Country Status (2)

Country Link
TW (1) TW541496B (en)
WO (1) WO1998044410A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100349153C (en) * 2005-08-17 2007-11-14 杭州华三通信技术有限公司 Method for realizing output control and device for controlling interface card by mainboard
JP2013025673A (en) * 2011-07-25 2013-02-04 Felica Networks Inc Information processing apparatus and method, and program
JP5853177B2 (en) * 2011-04-08 2016-02-09 パナソニックIpマネジメント株式会社 Data processing apparatus and data processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04219840A (en) * 1990-12-20 1992-08-10 Fuji Electric Co Ltd Data reading/writing method in programmable controller
JPH06242945A (en) * 1993-02-12 1994-09-02 Toshiba Corp Data processor
JPH06337792A (en) * 1993-05-27 1994-12-06 Matsushita Electric Ind Co Ltd Program converting device and processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04219840A (en) * 1990-12-20 1992-08-10 Fuji Electric Co Ltd Data reading/writing method in programmable controller
JPH06242945A (en) * 1993-02-12 1994-09-02 Toshiba Corp Data processor
JPH06337792A (en) * 1993-05-27 1994-12-06 Matsushita Electric Ind Co Ltd Program converting device and processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100349153C (en) * 2005-08-17 2007-11-14 杭州华三通信技术有限公司 Method for realizing output control and device for controlling interface card by mainboard
JP5853177B2 (en) * 2011-04-08 2016-02-09 パナソニックIpマネジメント株式会社 Data processing apparatus and data processing method
JP2013025673A (en) * 2011-07-25 2013-02-04 Felica Networks Inc Information processing apparatus and method, and program

Also Published As

Publication number Publication date
TW541496B (en) 2003-07-11

Similar Documents

Publication Publication Date Title
EP0741358B1 (en) Microcomputer
EP0809180A2 (en) Data processing circuit, microcomputer, and electronic equipment
US6986029B2 (en) Micro-controller for reading out compressed instruction code and program memory for compressing instruction code and storing therein
JP3619939B2 (en) Central processing unit
JPH0766324B2 (en) Data processing device
JPH04233640A (en) Microcontroller having pseudo-linear bank which switches memory expanding scheme
JPH01119828A (en) Microprocessor
JPH03216776A (en) Integrated circuit device and microprocessor consisting of this circuit device
JP3789583B2 (en) Data processing device
US5966514A (en) Microprocessor for supporting reduction of program codes in size
WO1998044410A1 (en) Microcomputer and electronic equipment
JP3727395B2 (en) Microcomputer
JPH02186487A (en) Microcomputer apparatus
JP3760093B2 (en) Microcomputer
JP2000039995A (en) Flexible accumulate register file to be used in high performance microprocessor
JP3332606B2 (en) Microprocessor
JP2006134347A (en) Microcomputer
WO2001042903A1 (en) Data processing apparatus and data processing system
JP2000029686A (en) Data processor and instruction format
JP2004005738A (en) Data processor, and instruction set expansion method
JP3199603B2 (en) Code size reduction microprocessor
JP3154542B2 (en) Data processing device
JPS62107339A (en) Instruction constituting method for microcomputer
TW201643692A (en) Apparatus and method for performing a spin-loop jump
JP2004005738A5 (en)

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP KR US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase