WO1998044409A1 - Microcomputer, electronic apparatus and information processing method - Google Patents

Microcomputer, electronic apparatus and information processing method Download PDF

Info

Publication number
WO1998044409A1
WO1998044409A1 PCT/JP1998/001392 JP9801392W WO9844409A1 WO 1998044409 A1 WO1998044409 A1 WO 1998044409A1 JP 9801392 W JP9801392 W JP 9801392W WO 9844409 A1 WO9844409 A1 WO 9844409A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit
instruction
moving
mirror
data
Prior art date
Application number
PCT/JP1998/001392
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 WO1998044409A1 publication Critical patent/WO1998044409A1/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/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/30032Movement instructions, e.g. MOVE, SHIFT, ROTATE, SHUFFLE

Definitions

  • the present invention relates to a micro combination, an electronic device, and an information processing method. [Background technology]
  • microcomputers that can be installed in electronic devices such as home game machines, power navigation systems, printers, and portable information terminals, and that can realize advanced information processing.
  • microcomputers are required. It is necessary to reduce the size of the hardware in the evening.
  • the present invention has been made in view of the above technical problems, and an object of the present invention is to provide a micro computer capable of realizing various high-performance processes on a small hardware scale.
  • An object of the present invention is to provide an electronic device and an information processing method.
  • a microcomputer receives an instruction, A control circuit that analyzes the instruction and performs control for executing the instruction; an arithmetic circuit that executes arithmetic processing corresponding to the instruction under the control of the control circuit; Instruction issuing means for issuing, to the control circuit, an instruction having first data having first to N-th bit strings as operands, wherein the instruction issuing means stores the first bit in the first bit.
  • a Tomira instruction is issued, a bit moving process corresponding to the instruction is performed.
  • the first bit of the first bit string is at the eighth bit position
  • the second bit is at the seventh bit position
  • the seventh bit is at the second bit position.
  • the eighth bit moves to the first bit position.
  • the same bit movement is performed on the second, third, and fourth bit strings.
  • the instruction issuing means may move the first bit string to the position of the N-th bit string, and may shift the second bit string to the (N ⁇ 1) -th bit string.
  • the process of moving the (N-1) th bit sequence to the position of the second bit sequence, and the process of moving the Nth bit sequence to the position of the first bit sequence Issue a swap instruction to be applied to the first data, and when the swap instruction is issued, the arithmetic circuit performs a bit string movement process corresponding to the instruction.
  • the instruction issuing means issues a swap instruction.
  • the first bit string is at the fourth bit string position
  • the second bit string is at the third bit string position
  • the third bit string is at the second bit string position.
  • fourth bit string becomes possible to execute the c
  • such swap processing requires execution of, for example, 10 instructions.
  • the swap processing can be realized by executing one instruction, the processing time can be reduced. Also, the memory area for storing instruction codes can be reduced, and the necessity of using a temporary register can be eliminated.
  • the instruction issuing means may move the first bit to the position of the Mth bit, and may move the second bit to the position of the (M ⁇ 1) th bit.
  • the processing of moving the (M-1) th bit to the position of the second bit, and the processing of moving the Mth bit to the position of the first bit. Issuing an M-bit mirror instruction for each of the 1st to Nth bit strings in the data stream to move the first bit string to the position of the Nth bit string; Moving the second bit string to the position of the (N-1) th bit string; and moving the (N-1) th bit string to the (N-1) th bit string.
  • the process of moving the N-th bit sequence to the position of the first bit sequence and the process of moving the N-th bit sequence to the position of the first bit sequence are performed on the first data after the process of the M-bit mirror instruction.
  • the arithmetic circuit issues a swap instruction to be performed overnight, and when the M-bit mirror instruction and the swap instruction are issued, performs a bit moving process and a bit string moving process corresponding to the instruction. It is characterized by the following.
  • the instruction issuing means may include a process of moving the first bit string to a position of the N-th bit string, and a step of shifting the second bit string to the (N ⁇ 1) -th bit string. Move to position and move the (N-1) th bit string to the position of the second bit string And a process of moving the Nth bit sequence to the position of the first bit sequence by issuing a swap instruction for the first data, and changing the first bit to the Mth bit sequence.
  • the arithmetic circuit issues an M-bit mirror instruction to be applied to each of the bit strings, and when the M-bit mirror instruction and the step instruction are issued, the bit shift processing corresponding to the instruction is performed. It is characterized by performing column moving processing.
  • each of the first to Nth bit strings is composed of 8 bits. This makes it possible to convert little endian into big endian, or vice versa, using a step instruction, for example.
  • the electronic device includes the microcomputer described above, an input source for data to be processed by the microcomputer, and an output for outputting data processed by the microcomputer. And a device.
  • the micromirror can perform various processing such as image mirror inversion processing, which has been performed by DSP, etc., and reduce the cost, size, and power consumption of electronic devices. Can be achieved.
  • FIG. 1 is a block diagram showing a configuration example of a microcomputer according to the present invention.
  • FIGS. 2A and 2B are diagrams for explaining the processing and operation of the first embodiment c .
  • FIGS. 3A to 3H show a method for implementing 8-bit mirror processing without using an 8-bit mirror instruction. It is a figure for explaining.
  • FIG. 5A is a diagram for explaining the processes and operations Embodiment 2
  • FIG. 5B is a diagram of the order describes endian, the big endian.
  • FIGS. 6A to 6H are diagrams for explaining a technique for realizing a swap process without using a swap instruction.
  • FIG. 7A, 7B, 7 C is a view a is c diagram 8A for illustrating the process of Example 3, FIG. 8B, FIG. 8 C are diagrams for explaining operation of the embodiment 3 ( 9A and 9B are diagrams for explaining the configuration of the ALU.
  • FIG. 10 is a diagram illustrating a configuration example of an 8-bit mirror circuit.
  • FIG. 11 is a diagram illustrating a configuration example of the swap circuit.
  • FIG. 12 is a configuration example of a microcomputer according to the fourth embodiment.
  • FIGS. 13A, 13B, and 13C are examples of internal block diagrams of various electronic devices.
  • FIGS. 14A, 14B, and 14C are examples of external views of various electronic devices. [Best Mode for Carrying Out the Invention]
  • Embodiment 1 is an embodiment in which 8-bit mirror processing is realized by one instruction.
  • Figure 1 FIG. 2 shows a block diagram of the microcomputer 101 of this embodiment. Note that this block diagram is a block diagram common to the first embodiment and the second and third embodiments described later.
  • the microcomputer 101 in FIG. 1 includes, for example, a CPU 102 (control circuit) for processing 32-bit data, a BCU (bus control unit) 108 for controlling a bus, and an internal memory 110. And on the other hand, an external memory 114 is provided outside the microcomputer 101.
  • the CPU 102 receives instructions such as an 8-bit mirror instruction and a swap instruction issued by the instruction issuing means 100, analyzes the received instruction, and performs control for executing the analyzed instruction.
  • a 16-bit length instruction is used.
  • the CPU 102 also includes a PC (program counter) 120, a general-purpose register 103 including 16 32-bit registers R0 to R15, and a product-sum operation circuit 104 for executing a product-sum operation.
  • an ALU (arithmetic logical operation unit) 132 that performs logical operations such as addition, subtraction, multiplication and division of data, logical operations such as OR, AND and logical shift, and 8-bit mirror processing and step processing described later.
  • the instruction issuing means 100 may be included in the internal memory 110 or may be included in the external memory 114.
  • the general-purpose register 103, the product-sum operation circuit 104, and the ALU 132 perform data transfer using P A-BUS and WW-BUS which are internal buses of the CPU 102.
  • the BCU 108 is a bus for reading various instructions and various data required for executing instructions from the internal memory 110 and the external memory 114, and for writing data to the internal memory 110 and the external memory 114. Perform control.
  • the scope of application of the present invention is not limited by whether the memory is built in the microcomputer or provided outside the microphone computer. In addition, it is not limited by the bit length of the data to be processed by the microcomputer, the product-sum operation circuit, the ALU, or the number of general-purpose registers built in the microcomputer.
  • the feature of this embodiment is that 8-bit mirror processing is realized by executing one instruction.
  • Each of these bytes 3 to 0 is composed of 8 bits (M bits).
  • mirror processing is performed on each of these bytes 3 to 0 (first to fourth bit strings). That is, the processing shown in the following (1) to (8) is performed on each of the bytes 3 to 0.
  • Bit 7 (Move first bit to Bit 0 (move to eighth bit)
  • Bit 1 (move bit 7 to bit 6 (move to bit 2)
  • the instruction issuing means 100 of FIG. 1 issues an 8-bit mirror instruction represented by, for example, the following mnemonic symbol.
  • MI RROR% R 1,% R 0 The meaning of this instruction is that 8-bit mirror processing is performed on data stored in register R 0 (source register) in general register 110 in FIG. This means that the result is stored in the register R1 (destination register).
  • the CPU 102 in FIG. 1 receives the 8-bit mirror instruction
  • the CPU 102 that analyzes the 8-bit mirror instruction performs the following processing. That is, the data stored in the register R0 is first output to the internal bus PA-BUS (step SI in FIG. 2B), and the ALU 132 receives it (step S2). Then, the ALU 132 executes the 8-bit mirror processing described in FIG. 2A and the above (1) to (8) (step S3).
  • the ALU 132 outputs the processing result to WW-BUS (step S4), and the processing result is stored in the register R1 (step S5).
  • FIG. 3A to FIG. 3H indicate bit positions in the 32-bit data.
  • “0”,, and 1 in the mask pattern in Fig. 3 and Fig. 3 represent binary numbers.
  • 8-bit mirror processing can be realized by executing one instruction. Therefore, the processing time can be significantly reduced.
  • the memory area for storing instruction codes can be reduced, and hardware can be downsized. It is.
  • Embodiment 2 is an embodiment in which the swap processing is realized by executing an instruction once.
  • a data buffer having bytes 3 to 0 (first to fourth bit strings) each consisting of 8 bits (M bits) is used.
  • Swaps 50 (1st day) in units of bytes. That is, the following processes (9) to (12) are performed.
  • Byte 0 (the fourth bit string) is moved to the position of byte 3 (the first bit string).
  • such byte-by-byte swap processing is executed by executing one swap instruction. Only realized.
  • the instruction issuing means 100 in FIG. 1 issues a swap instruction represented by, for example, the following monic symbol.
  • SWAP% R 2,% R 1 The meaning of this instruction is to perform swap processing on the data stored in the register R 1 (source register) in the general-purpose register 103, and to store the result in the register. It means that it is stored in R2 (Destination registration).
  • the data stored in the register R1 is output to the internal data bus PA-BUS (step T1 in FIG. 4B), and the ALU 132 receives it (step T2).
  • the ALU 132 is connected to the switch described in FIG. 4A and (9) to (12) above.
  • the backup process is executed (step T3).
  • the ALU 132 outputs the processing result to WW-BUS (step T4), and the processing result is stored in the register R2 (step T5).
  • step command If there is no step command as in the present embodiment, it is necessary to create the following program to realize the step processing.
  • FIGS. 6A to 6H indicate bit positions in the 32-bit data.
  • “0” and “1” in the mask patterns of FIGS. 6B and 6E represent binary numbers.
  • step processing can be realized by executing an instruction once. Therefore, the processing time can be significantly reduced. Also, the memory area for storing instruction codes can be reduced, and hardware can be downsized. In addition, the need for Temporary Regis evening (R2 above) can be eliminated.
  • the third embodiment is an embodiment that realizes a 32-bit mirror process by combining an 8-bit mirror instruction and a step instruction.
  • a data block 50 having bytes 3 to 0 (first to fourth bit strings) each having 8 bits (M bits) is provided.
  • the 8-bit mirror processing described in the first embodiment is performed on the first data. That is, the processes (1) to (8) described above are performed on each of the bytes 3 to 0.
  • the swap processing described in the second embodiment is performed on the data 50 after the 8-bit mirror processing. That is, the above-described processes (9) to (12) are performed.
  • a 32-bit mirror process as shown in Fig. 7C is possible. This enables processing such as mirror inversion of the image, —Improve the functionality of evening processing.
  • swap processing is performed after 8-bit mirror processing.
  • the instruction issuing means 100 of FIG. 1 is represented, for example, by the following mnemonic symbol.
  • PC 120 indicates an 8-bit mirror instruction as shown in Figure 8C).
  • the instruction issuing means 100 issues a swap instruction represented by, for example, the following mnemonic symbol (PC 120 indicates a swap instruction).
  • the ALU 132 includes an 8-bit mirror circuit 20, a swap circuit 22, a multiplexer 30, and various circuits (not shown) for arithmetic and logical operations.
  • the 8-bit mirror circuit 20 receives the 32-bit PA31 to PA0 (the first data or the first data subjected to the swap processing) from the PA—BUS and receives these PA31 to P0. An 8-bit mirror process is performed based on AO, and the resulting 32-bit DA31 to DA0 are output to the multiplexer 30.
  • the swap circuit 22 receives PA31 to PA0 (first data or the first data subjected to 8-bit mirror processing) from PA-BUS, performs a swap process based on these PA31 to PA0, and as a result, And outputs the 32-bit DB 31 to DB 0 to the multiplexer 30.
  • the multiplexer 30 selects one of DA 31 to DA 0 and DB 31 to DB 0 based on the select signal, and outputs the resultant 32-bit WW 31 to WW 0 to WW-BUS.
  • the multiplexer 30 also has a function of multiplexing the outputs of various circuits (not shown) for arithmetic and logical operations.
  • FIG. 10 shows a configuration example of the 8-bit mirror circuit 20. As shown in FIG. 10, this 8-bit mirror circuit 20 allows? 8 31 to 0 8 24,? 8:30 to 0825,
  • PA24 is passed on to DA31.
  • P A 23 becomes D A 16
  • PA22 is transmitted to DA17, and PA16 is transmitted to DA23. Also, 815 is transmitted to 88, PA14 is transmitted to DA9, and PA8 is transmitted to DA15. PA7 to DA0, PA6 to DA1, PA
  • FIG. 11 shows a configuration example of the swap circuit 22. As shown in FIG. Eighteen-? 24 is transmitted to 087 to 080, PA23 to PA16 is transmitted to 0815 to 088, PA15 to PA8 is transmitted to DB23 to DB16, and PA7 to PA (HiDB31 to DB24. Processing can be performed.
  • DA31 to DA0 are selected by a selector signal, and WW31 to WW0 subjected to 8-bit mirror processing are output to WW-BUS. Then, these WW31 to WW0 are input to the ALU 132 again through the general-purpose register and the PA-BUS. Then, DB 31 to DB 0 may be selected by the selector signal. Or, conversely, first, DB31 to DB0 are selected by the selector signal, and the swapped WW31 to WW0 are output to WW-BUS. Then, these WW31 to WW0 are again input to the ALU 132 via the general-purpose register and the PA-BUS. Then, DA31 to DA0 are selected by the selector signal.
  • all of the 8-bit mirror processing, the step processing, and the 32-bit mirror processing can be performed.
  • the skip processing for example, the endian conversion described in FIGS. 5A and 5B can be performed.
  • 8-bit mirror processing and 32-bit mirror processing it is possible to perform mirror inversion of images in image processing.
  • these processes can be completed in one clock period, so that information processing optimal for a RISC microcomputer can be realized.
  • FIG. 9B shows the configuration of the ALU of the comparative example of this embodiment.
  • the ALU 134 includes a 32-bit mirror circuit 24 for performing 32-bit mirror processing (see FIG. 7C) in addition to the 8-bit mirror circuit 20 and the step circuit 22. Even with the configuration of FIG. 9B, all of the 8-bit mirror processing, swap processing, and 32-bit mirror processing can be realized. However, according to this configuration, an additional 32-bit mirror circuit 24 is required.
  • the multiplexer 31 since the multiplexer 31 must multiplex not only DA 31 to DA 0 and DB 31 to DB 0 but also DC 31 to DC 0, the circuit scale of the multiplexer 31 also becomes large.
  • the circuit size of the ALU is at least
  • Embodiment 4 is an embodiment showing a detailed example of the micro combination of the present invention.
  • the microcomputer 700 of the second embodiment is a 32-bit microcomputer, and includes a CPU 710, a R ⁇ M720, a RAM730, a high-frequency oscillator 910, a low-frequency oscillator 920, and a reset.
  • analog interface circuits such as A / D converter 830 and D / A converter 840, I / O circuits such as input port 850, output port 860, I / O port 870, and so on. Includes various buses 750, 760 and various pins 890 to be connected.
  • This microcomputer 700 formed on a single-chip semiconductor substrate is a RISC microcomputer that can process 32 bits of data. It employs a pipeline and load store architecture, and executes almost all instructions in one cycle. All instructions are described with a fixed length of 16 bits, which results in a very small instruction code size.
  • the microcomputer 700 performs the 8-bit mirror processing, the step processing, and the 32-bit mirror processing on a small-scale circuit configuration. Can be realized. For this reason, processing that was previously performed by DSPs, ICs dedicated to image processing, ICs dedicated to sound processing, etc. can be substituted, and the cost and size of electronic devices incorporating this microcombiner 700 are reduced. It becomes possible.
  • the fifth embodiment is an embodiment relating to an electronic device including the micro-computer described in the first, second, third and fourth embodiments.
  • Fig. 13A shows an internal block diagram of a power navigation system, which is one of the electronic devices
  • Fig. 14A shows its appearance.
  • the operation of the force navigation system is performed using the remote controller 510, and the position detection unit 520 detects the position of the vehicle based on information from the GPS and the gyro.
  • Information such as maps is stored in CDROM 530 (information storage medium).
  • the image memory 540 is a memory serving as a work area for image processing, and the generated image is displayed to the driver using the image output unit 550.
  • the microcomputer 500 receives data from a data input source such as a remote control 510, a position detection unit 520, and a CDROM 530, performs various processes, and outputs the processed data to an image output unit 550.
  • FIG. 13B shows an internal block diagram of a game device which is one of the electronic devices
  • FIG. 14B shows an external view thereof.
  • the image memory 590 is used as a work area based on the player operation information from the game controller 560, the game program from the CDROM 570, the player information from the IC card 580, and the like.
  • a game image and a game sound are generated and output using the image output unit 610 and the sound output unit 600.
  • the microcomputer 500 described in the first, second, third, and fourth embodiments is adopted, a game image can be obtained by using an 8-bit mirror processing function, a 32-bit mirror processing function, and a swap processing function. It becomes possible to perform various processes required for generation and generation of game sounds.
  • Figure 13C shows an internal block diagram of one of the electronic devices, the pudding, and Figure 14C shows its external view.
  • a print image is generated using the bitmap memory 650 as a work area. Output using the print output unit 660.
  • the state of the pudding is indicated to the user using the display panel 670. If the microcomputer 500 described in the first, second, third, and fourth embodiments is adopted, a print image can be generated using the 8-bit mirror processing function, the 32-bit mirror processing function, and the swap processing function. It is possible to perform various processes necessary for the above.
  • the electronic devices to which the micro combination of the present invention can be applied include, in addition to the above, for example, a mobile phone (cellular phone), a PHS, a pager, an audio device, an electronic organizer, an electronic desk calculator, a POS terminal, and a sunset panel.
  • a mobile phone cellular phone
  • PHS personal computer
  • PHS personal computer
  • the present invention relates to a micro-computer, especially a RISC-type micro-computer. It is particularly effective when applied in the evening, but other uses are also possible.

Abstract

A microcomputer, an electronic apparatus and an information processing method which realize various highly functional processings with small scale hardware are provided. An ALU executes an instruction issued by an instruction issuing means under the control of a CPU. When an 8-bit mirror instruction is issued, the bit 7 is transferred to the position of the bit 0, the bit 6 is transferred to the position of the bit 1, the bit 5 is transferred to the position of the bit 2, ..., and the bit 0 is transferred to the position of the bit 7 for the byte 3 - byte 0. When a swapping instruction is issued, the byte 3 is transferred to the position of the byte 0, the byte 2 is transferred to the position of the byte 1, the byte 1 is transferred to the position of the byte 2 and the byte 0 is transferred to the position of the byte 3. If the swapping instruction is executed after the 8-bit mirror instruction is executed, a 32-bit mirror processing is realized. Reversely, an 8-bit mirror instruction may be executed after a swapping instruction is executed. The ALU includes an 8-bit mirror circuit, a swapping circuit and a multiplexer for multiplexing the outputs of the mirror circuit and the swapping circuit.

Description

明 細 書 マイクロコンビユー夕、 電子機器及び情報処理方法  Description Microcombination, electronic equipment and information processing method
[技術分野] [Technical field]
本発明は、 マイクロコンビユー夕、 電子機器及び情報処理方法に関する。 [背景技術]  The present invention relates to a micro combination, an electronic device, and an information processing method. [Background technology]
近年、 家庭用のゲーム装置、 力一ナビゲ一シヨンシステム、 プリン夕、 携帯情 報端末などの電子機器に組み込まれ、 高度な情報処理を実現できるマイクロコン ピュー夕に対する需要が高まっている。  In recent years, there has been an increasing demand for microcomputers that can be installed in electronic devices such as home game machines, power navigation systems, printers, and portable information terminals, and that can realize advanced information processing.
このようなマイクロコンビユー夕では、 画像生成のための画像処理、 音生成の ための音処理、 メモリと汎用レジス夕の間でのデータ転送時におけるデ一夕変換 処理など、 種々の処理を実行できる高機能性が要求されている。 例えばこれまで In such a micro-combination, various processes are performed, such as image processing for image generation, sound processing for sound generation, and data conversion processing during data transfer between memory and a general-purpose registry. There is a demand for high functionality. For example, until now
D S P (Digital Signal Processor) 、 画像処理専用 I C、 音処理専用 I Cが行 つていた画像処理、 音処理をマイクロコンピュータが代行できれば、 システムの 簡素化、 製品の低コス ト化を図れるからである。 This is because if a microcomputer can perform image processing and sound processing instead of the DSP (Digital Signal Processor), image processing IC, and sound processing IC, the system can be simplified and the cost of products can be reduced.
一方、 マイクロコンピュ一夕が組み込まれる電子機器の低コスト化、 低消費電 力化、 コンパクト化を実現するため、 或いはマイクロコンピュ一夕自体の低コス ト化を実現するためには、 マイクロコンピュー夕のハードウエア規模をコンパク ト化する必要がある。  On the other hand, in order to reduce the cost, power consumption, and size of electronic devices in which microcomputers are incorporated, or to reduce the cost of microcomputers themselves, microcomputers are required. It is necessary to reduce the size of the hardware in the evening.
本発明は、 以上のような技術的課題に鑑みてなされたものであり、 その目的と するところは、 小さなハ一ドウエア規模で高機能な種々の処理を実現できるマイ クロコンピュー夕、 これを用いる電子機器、 及び情報処理方法を提供することに ある。  The present invention has been made in view of the above technical problems, and an object of the present invention is to provide a micro computer capable of realizing various high-performance processes on a small hardware scale. An object of the present invention is to provide an electronic device and an information processing method.
[発明の開示] [Disclosure of the Invention]
上記課題を解決するために本発明に係るマイクロコンピュー夕は、 命令を受け、 該命令を解析し、 該命令を実行するための制御を行う制御回路と、 前記制御回路 の制御の下で前記命令に対応する演算処理を実行する演算回路と、 各々が Mビッ トで構成される第 1〜第 Nのビッ ト列を有する第 1のデータをオペランドとする 命令を前記制御回路に対して発行する命令発行手段とを含み、 前記命令発行手段 が、 第 1のビッ トを第 Mのビッ トの位置に移動する処理と、 第 2のビッ トを第In order to solve the above problems, a microcomputer according to the present invention receives an instruction, A control circuit that analyzes the instruction and performs control for executing the instruction; an arithmetic circuit that executes arithmetic processing corresponding to the instruction under the control of the control circuit; Instruction issuing means for issuing, to the control circuit, an instruction having first data having first to N-th bit strings as operands, wherein the instruction issuing means stores the first bit in the first bit. The process of moving to the bit position of M and the second bit
(M— 1 ) のビッ 卜の位置に移動する処理と、 第 (M— 1 ) のビ ッ トを第 2のビッ 卜の位置に移動する処理と、 第 Mのビッ トを第 1のビッ 卜の位 置に移動する処理とを、 第 1のデ一夕の第 1〜第 Nのビッ ト列の各々に対して施 す Mビッ トミラー命令を発行し、 前記演算回路が、 前記 Mビッ トミラ一命令が発 行された場合に、 該命令に対応するビッ ト移動処理を行うことを特徴とする。 本発明によれば、 M = 8、 N = 4の場合を例にとると次のように処理が行われ る。 即ち命令発行手段が 8ビッ トミラー命令を発行する。 すると例えば第 1のビ ヅ ト列の第 1のビッ トが第 8のビッ ト位置に、 第 2のビッ トが第 7のビッ ト位置 に、 第 7のビッ トが第 2のビッ ト位置に、 第 8のビットが第 1のビッ ト位置に移動する。 そして第 2、 第 3、 第 4のビッ ト列についても同様のビッ ト 移動が行われる。 これにより 8ビッ トミラー処理の実行が可能になる。 通常、 こ のような 8ビッ トミラ一処理の実現には例えば 4 0回の命令の実行が必要になる c 本発明によれば、 1回の命令の実行で 8ビッ トミラー処理を実現できるため、 処 理時間の短縮化を図れる。 また命令コードを格納するメモリエリアを小さくでき ると共に、 テンポラリーレジス夕の使用の必要性も無くすことができる。 A process of moving the (M-1) bit to the position of the bit, a process of moving the (M-1) bit to the position of the second bit, and a process of moving the Mth bit to the first bit. Issue an M-bit mirror instruction for performing the process of moving to the position of the unit for each of the first to N-th bit strings in the first data stream. When a Tomira instruction is issued, a bit moving process corresponding to the instruction is performed. According to the present invention, the process is performed as follows, taking M = 8 and N = 4 as an example. That is, the instruction issuing means issues an 8-bit mirror instruction. Then, for example, the first bit of the first bit string is at the eighth bit position, the second bit is at the seventh bit position, and the seventh bit is at the second bit position. Then, the eighth bit moves to the first bit position. The same bit movement is performed on the second, third, and fourth bit strings. This makes it possible to execute 8-bit mirror processing. Usually, according to the realization of the 8-bit Tomira first processing like this in c present invention need to perform, for example, four zero instructions, can be realized with 8 bits Tomira treated with execution of one instruction, Processing time can be reduced. Also, the memory area for storing instruction codes can be reduced, and the necessity of using a temporary register can be eliminated.
また本発明は、 前記命令発行手段が、 第 1のビッ ト列を第 Nのビッ ト列の位置 に移動する処理と、 第 2のビッ ト列を第 (N— 1 ) のビヅ ト列の位置に移動する 処理と、 第 (N— 1 ) のビッ ト列を第 2のビッ ト列の位置に移動 する処理と、 第 Nのビット列を第 1のビッ ト列の位置に移動する処理とを、 第 1 のデ一夕に対して施すスワップ命令を発行し、 前記演算回路が、 前記スワップ命 令が発行された場合に、 該命令に対応するビッ ト列移動処理を行うことを特徴と する。  Also, in the present invention, the instruction issuing means may move the first bit string to the position of the N-th bit string, and may shift the second bit string to the (N−1) -th bit string. , The process of moving the (N-1) th bit sequence to the position of the second bit sequence, and the process of moving the Nth bit sequence to the position of the first bit sequence Issue a swap instruction to be applied to the first data, and when the swap instruction is issued, the arithmetic circuit performs a bit string movement process corresponding to the instruction. And
本発明によれば、 M = 8、 N = 4の場合を例にとると次のように処理が行われ る。 即ち命令発行手段がスワップ命令を発行する。 すると例えば第 1のビッ ト列 が第 4のビッ ト列位置に、 第 2のビッ ト列が第 3のビッ ト列位置に、 第 3のビヅ ト列が第 2のビッ ト列位置に、 第 4のビッ ト列が第 1のビッ ト列位置に移動する c これによりスワップ処理の実行が可能になる。 通常、 このようなスワップ処理の 実現には例えば 1 0個の命令の実行が必要になる。 本発明によれば、 1回の命令 の実行でスワップ処理を実現できるため、 処理時間の短縮化を図れる。 また命令 コードを格納するメモリエリアを小さくできると共に、 テンポラリ一レジス夕の 使用の必要性も無くすことができる。 According to the present invention, taking the case of M = 8, N = 4 as an example, the following processing is performed. You. That is, the instruction issuing means issues a swap instruction. Then, for example, the first bit string is at the fourth bit string position, the second bit string is at the third bit string position, and the third bit string is at the second bit string position. , fourth bit string becomes possible to execute the c Thus swap process of moving to the first bit column position. Normally, such swap processing requires execution of, for example, 10 instructions. According to the present invention, since the swap processing can be realized by executing one instruction, the processing time can be reduced. Also, the memory area for storing instruction codes can be reduced, and the necessity of using a temporary register can be eliminated.
また本発明は、 前記命令発行手段が、 第 1のビッ トを第 Mのビッ トの位置に移 動する処理と、 第 2のビッ トを第 (M— 1 ) のビッ 卜の位置に移動する処理と、 第 (M— 1 ) のビッ トを第 2のビッ トの位置に移動する処理と、 第 Mのビッ トを第 1のビッ 卜の位置に移動する処理とを、 第 1のデ一夕の第 1〜 第 Nのビッ ト列の各々に対して施す Mビッ トミラ一命令を発行し、 第 1のビッ ト 列を第 Nのビッ ト列の位置に移動する処理と、 第 2のビッ ト列を第 (N— 1 ) の ビッ ト列の位置に移動する処理と、 第 (N— 1 ) のビッ ト列を第 Also, in the present invention, the instruction issuing means may move the first bit to the position of the Mth bit, and may move the second bit to the position of the (M−1) th bit. The processing of moving the (M-1) th bit to the position of the second bit, and the processing of moving the Mth bit to the position of the first bit. Issuing an M-bit mirror instruction for each of the 1st to Nth bit strings in the data stream to move the first bit string to the position of the Nth bit string; Moving the second bit string to the position of the (N-1) th bit string; and moving the (N-1) th bit string to the (N-1) th bit string.
2のビッ ト列の位置に移動する処理と、 第 Nのビッ ト列を第 1のビッ ト列の位置 に移動する処理とを、 前記 Mビットミラー命令の処理が施された第 1のデ一夕に 対して施すスワップ命令を発行し、 前記演算回路が、 前記 Mビットミラ一命令、 前記スワップ命令が発行された場合に、 該命令に対応するビッ ト移動処理、 ビッ ト列移動処理を行うことを特徴とする。 The process of moving the N-th bit sequence to the position of the first bit sequence and the process of moving the N-th bit sequence to the position of the first bit sequence are performed on the first data after the process of the M-bit mirror instruction. The arithmetic circuit issues a swap instruction to be performed overnight, and when the M-bit mirror instruction and the swap instruction are issued, performs a bit moving process and a bit string moving process corresponding to the instruction. It is characterized by the following.
本発明によれば、 M = 8、 N = 4の場合を例にとると次のように処理が行われ る。 即ちまず 8ビットミラー命令が発行される。 そして次にスワップ命令が発行 され、 8ビッ トミラー処理が施された後の第 1のデ一夕に対してスワップ処理が 施される。 これにより M X N ( = 3 2 ) ビヅ トミラ一処理を実現することが可能 となる。  According to the present invention, the process is performed as follows, taking M = 8 and N = 4 as an example. That is, first, an 8-bit mirror instruction is issued. Then, a swap instruction is issued, and the swap processing is performed on the first data after the 8-bit mirror processing is performed. This makes it possible to realize M X N (= 32) bit mirror processing.
また本発明は、 前記命令発行手段が、 第 1のビッ ト列を第 Nのビッ ト列の位置 に移動する処理と、 第 2のビッ ト列を第 (N— 1 ) のビッ ト列の位置に移動する 処理と、 第 ( N— 1 ) のビッ ト列を第 2のビッ ト列の位置に移動 する処理と、 第 Nのビッ ト列を第 1のビッ ト列の位置に移動する処理とを、 第 1 のデータに対して施すスワップ命令を発行し、 第 1のビッ トを第 Mのビッ 卜の位 置に移動する処理と、 第 2のビッ トを第 (M— 1 ) のビッ トの位置に移動する処 理と、 第 (M— 1 ) のビットを第 2のビッ トの位置に移動する処 理と、 第 Mのビッ トを第 1のビッ トの位置に移動する処理とを、 前記スワップ命 令の処理が施された第 1のデ一夕の第 1〜第 Nのビッ ト列の各々に対して施す M ビッ トミラー命令を発行し、 前記演算回路が、 前記 Mビッ トミラー命令、 前記ス ヮップ命令が発行された場合に、 該命令に対応するビット移動処理、 ビッ ト列移 動処理を行うことを特徴とする。 このようにスワップ命令を実行した後に Mビッ 卜ミラー命令を実行することによつても、 M X Nビッ トミラ一処理を実現できる c また本発明は、 前記演算回路が、 第 1のデータ及び前記スヮップ命令の処理が 施された第 1のデ一夕のいずれかを受け、 前記 Mビッ トミラ一命令に対応するビ ヅト移動処理を行う Mビッ トミラー回路と、 第 1のデータ及び前記 Mビットミラ —命令の処理が施された第 1のデータのいずれかを受け、 前記スワップ命令に対 応するビッ ト列移動処理を行うスワップ回路と、 前記 Mビッ トミラ一命令が発行 された場合には前記 Mビッ トミラー回路の出力を選択し、 前記スワップ命令が発 行された場合には前記スワップ回路の出力を選択するマルチプレクサとを含むこ とを特徴とする。 このようにすれば、 Mビッ トミラー命令、 スワップ命令及び M X Nビヅ トミラー命令を高速に実行できる。 また M X Nビッ トミラ一回路を設け る必要がなくマルチプレクサの入力信号数を少なくできるため、 回路を格段に小 規模化できる。 Further, in the present invention, the instruction issuing means may include a process of moving the first bit string to a position of the N-th bit string, and a step of shifting the second bit string to the (N−1) -th bit string. Move to position and move the (N-1) th bit string to the position of the second bit string And a process of moving the Nth bit sequence to the position of the first bit sequence by issuing a swap instruction for the first data, and changing the first bit to the Mth bit sequence. The process of moving the second bit to the position of the (M-1) th bit, the process of moving the second bit to the position of the (M-1) th bit, and the process of moving the (M-1) th bit to the position of the second bit. And the process of moving the M-th bit to the position of the first bit, the first to the N-th in the first data after the processing of the swap instruction. The arithmetic circuit issues an M-bit mirror instruction to be applied to each of the bit strings, and when the M-bit mirror instruction and the step instruction are issued, the bit shift processing corresponding to the instruction is performed. It is characterized by performing column moving processing. Even cowpea to thus execute the M bit Bok mirror instruction after executing the swap instruction, c also present invention can be realized MXN bit Tomira first processing, the arithmetic circuit, the first data and the Suwappu instruction An M-bit mirror circuit that receives any one of the first data having undergone the above-described processing and performs a bit transfer process corresponding to the M-bit mirror instruction, the first data and the M-bit mirror instruction A swap circuit that receives any of the first data that has undergone the above-described processing and performs a bit string movement process corresponding to the swap instruction; and the M-bit mirror when the M-bit mirror instruction is issued, A multiplexer for selecting an output of the mirror circuit and selecting the output of the swap circuit when the swap instruction is issued. This makes it possible to execute the M-bit mirror instruction, the swap instruction, and the MXN bit mirror instruction at high speed. Also, since there is no need to provide an MXN bit mirror circuit and the number of input signals to the multiplexer can be reduced, the circuit size can be significantly reduced.
また本発明に係るマイクロコンピュー夕は、 前記第 1〜第 Nのビッ ト列の各々 が 8ビッ トで構成されていることを特徴とする。 このようにすれば、 例えばスヮ ヅプ命令を用いて、 リ トルエンディアンからビッグエンディアンへの変換、 或い はその逆の変換を行うことなどが可能となる。  Further, the microcomputer according to the present invention is characterized in that each of the first to Nth bit strings is composed of 8 bits. This makes it possible to convert little endian into big endian, or vice versa, using a step instruction, for example.
また本発明に係る電子機器は、 上記のマイクロコンピュー夕と、 前記マイクロ コンピュータの処理対象となるデ一夕の入力源と、 前記マイクロコンピュ一夕に より処理されたデータを出力するための出力装置とを含むことを特徴とする。 こ のようにすれば、 これまで D S P等が行っていた画像ミラ一反転処理などの種々 の処理をマイクロコンビユー夕が代行することができ、 電子機器の低コスト化、 コンパクト化、 低消費電力化を図ることができる。 Further, the electronic device according to the present invention includes the microcomputer described above, an input source for data to be processed by the microcomputer, and an output for outputting data processed by the microcomputer. And a device. This In this way, the micromirror can perform various processing such as image mirror inversion processing, which has been performed by DSP, etc., and reduce the cost, size, and power consumption of electronic devices. Can be achieved.
[図面の簡単な説明] [Brief description of drawings]
図 1は、 本発明のマイクロコンピュー夕の構成例を示すプロック図である。 図 2A、 図 2Bは、 実施例 1の処理及び動作について説明するための図である c 図 3 A〜図 3 Hは、 8ビットミラ一命令を用いないで 8ビットミラー処理を実 現する手法について説明するための図である。 FIG. 1 is a block diagram showing a configuration example of a microcomputer according to the present invention. FIGS. 2A and 2B are diagrams for explaining the processing and operation of the first embodiment c . FIGS. 3A to 3H show a method for implementing 8-bit mirror processing without using an 8-bit mirror instruction. It is a figure for explaining.
図 4A、 図 4Bは、 実施例 2の処理及び動作について説明するための図である c 図 5A、 図 5Bは、 リ トルエンディアン、 ビッグエンディアンについて説明す るための図である。 4A, 4B is a c Figure 5A is a diagram for explaining the processes and operations Embodiment 2, FIG. 5B is a diagram of the order describes endian, the big endian.
図 6 A〜図 6 Hは、 スワップ命令を用いないでスワップ処理を実現する手法に ついて説明するための図である。  FIGS. 6A to 6H are diagrams for explaining a technique for realizing a swap process without using a swap instruction.
図 7A、 図 7B、 図 7 Cは、 実施例 3の処理について説明するための図である c 図 8A、 図 8B、 図 8 Cは、 実施例 3の動作について説明するための図である ( 図 9A、 図 9Bは、 ALUの構成について説明するための図である。 7A, 7B, 7 C is a view a is c diagram 8A for illustrating the process of Example 3, FIG. 8B, FIG. 8 C are diagrams for explaining operation of the embodiment 3 ( 9A and 9B are diagrams for explaining the configuration of the ALU.
図 10は、 8ビットミラー回路の構成例を示す図である。  FIG. 10 is a diagram illustrating a configuration example of an 8-bit mirror circuit.
図 1 1は、 スワップ回路の構成例を示す図である。  FIG. 11 is a diagram illustrating a configuration example of the swap circuit.
図 12は、 実施例 4のマイクロコンピュー夕の構成例である。  FIG. 12 is a configuration example of a microcomputer according to the fourth embodiment.
図 13 A、 図 13 B、 図 13 Cは、 種々の電子機器の内部プロヅク図の例であ る。  FIGS. 13A, 13B, and 13C are examples of internal block diagrams of various electronic devices.
図 14A、 図 14B、 図 14 Cは、 種々の電子機器の外観図の例である。 [発明を実施するための最良の形態]  FIGS. 14A, 14B, and 14C are examples of external views of various electronic devices. [Best Mode for Carrying Out the Invention]
以下、 本発明の好適な実施形態について図面を用いて詳細に説明する。  Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
(実施例 1 )  (Example 1)
実施例 1は、 8ビットミラ一処理を 1回の命令で実現する実施例である。 図 1 に、 本実施例のマイクロコンピュー夕 101のブロック図を示す。 なお、 このブ ロック図は、 実施例 1及び後述の実施例 2、 3に共通のブロック図である。 Embodiment 1 is an embodiment in which 8-bit mirror processing is realized by one instruction. Figure 1 FIG. 2 shows a block diagram of the microcomputer 101 of this embodiment. Note that this block diagram is a block diagram common to the first embodiment and the second and third embodiments described later.
図 1のマイクロコンピュー夕 101は、 例えば 32ビッ トのデ一夕を処理する CPU 102 (制御回路) と、 バスの制御を行う BCU (バスコントロールュニ ッ ト) 108と、 内部メモリ 1 10とを含む。 一方、 このマイクロコンピュー夕 101の外部には外部メモリ 1 14が設けられている。  The microcomputer 101 in FIG. 1 includes, for example, a CPU 102 (control circuit) for processing 32-bit data, a BCU (bus control unit) 108 for controlling a bus, and an internal memory 110. And On the other hand, an external memory 114 is provided outside the microcomputer 101.
ここで CPU 102は、 命令発行手段 100が発行する 8ビッ トミラ一命令や スワップ命令などの命令を受け、 受け付けた命令を解析し、 解析した命令を実行 するための制御を行うものであり、 本実施例では 16ビッ ト長の命令を使用して いる。 また CPU 102は、 PC (プログラムカウン夕) 120と、 R 0から R 15までの 16本の 32ビヅ 卜のレジス夕から成る汎用レジス夕 103と、 積和 演算を実行する積和演算回路 104と、 データの加減乗除などの算術演算、 論理 和や論理積や論理シフトなどの論理演算、 後述する 8ビッ トミラー処理やスヮッ プ処理などを行う ALU (算術論理演算ユニッ ト) 132とを含む。 なお命令発 行手段 100は内部メモリ 1 10に含ませてもよいし、 外部メモリ 1 14に含ま せてもよい。  Here, the CPU 102 receives instructions such as an 8-bit mirror instruction and a swap instruction issued by the instruction issuing means 100, analyzes the received instruction, and performs control for executing the analyzed instruction. In the embodiment, a 16-bit length instruction is used. The CPU 102 also includes a PC (program counter) 120, a general-purpose register 103 including 16 32-bit registers R0 to R15, and a product-sum operation circuit 104 for executing a product-sum operation. And an ALU (arithmetic logical operation unit) 132 that performs logical operations such as addition, subtraction, multiplication and division of data, logical operations such as OR, AND and logical shift, and 8-bit mirror processing and step processing described later. The instruction issuing means 100 may be included in the internal memory 110 or may be included in the external memory 114.
汎用レジス夕 103、 積和演算回路 104、 ALU 132は、 CPU 102の 内部バスである P A— BU S、 WW— BUSを用いてデ一夕転送を行う。 BCU 108は、 内部メモリ 110や外部メモリ 1 14から各種の命令や命令の実行に 必要な各種のデ一夕を読み込んだり、 内部メモリ 1 10や外部メモリ 1 14にデ 一夕を書き込むためのバス制御を行う。  The general-purpose register 103, the product-sum operation circuit 104, and the ALU 132 perform data transfer using P A-BUS and WW-BUS which are internal buses of the CPU 102. The BCU 108 is a bus for reading various instructions and various data required for executing instructions from the internal memory 110 and the external memory 114, and for writing data to the internal memory 110 and the external memory 114. Perform control.
但し本発明の適用範囲は、 メモリがマイクロコンピュー夕に内蔵されるか、 マ イク口コンピュータの外部に設けられるかによって限定されるものではない。 ま た、 マイクロコンピュー夕、 積和演算回路、 ALUの処理するデ一夕のビッ ト長、 もしくはマイクロコンビュ一夕の内蔵する汎用レジス夕の数等により限定される ものではない。  However, the scope of application of the present invention is not limited by whether the memory is built in the microcomputer or provided outside the microphone computer. In addition, it is not limited by the bit length of the data to be processed by the microcomputer, the product-sum operation circuit, the ALU, or the number of general-purpose registers built in the microcomputer.
本実施例の特徴は、 1回の命令の実行で 8ビッ トミラー処理を実現している点 にある。 例えば図 2 Aに示すように、 デ一夕 50 (第 1のデータ) を 4バイ トに 分割し、 最上位バイ 卜からバイ ト 3、 バイ ト 2、 バイ ト 1、 バイ ト 0 (第 1、 第 2、 第 3、 第 4のビッ ト列。 N = 4) と定義したとする。 これらのバイ ト 3〜バ ィ ト 0の各々は 8ビッ ト (Mビッ ト) で構成されている。 The feature of this embodiment is that 8-bit mirror processing is realized by executing one instruction. For example, as shown in Figure 2A, 50 bytes (first data) is converted to 4 bytes. It is assumed that the data is divided and the highest byte is defined as byte 3, byte 2, byte 1, byte 0 (first, second, third, and fourth bit strings; N = 4). Each of these bytes 3 to 0 is composed of 8 bits (M bits).
本実施例では、 図 2Aに示すように、 これらのバイ ト 3 〜バイ ト 0 (第 1〜第 4のビッ ト列) の各々に対してミラー処理を施す。 即ち、 以下の(1)〜(8)に示す 処理をバイ ト 3〜バイ ト 0の各々に対して施す。  In the present embodiment, as shown in FIG. 2A, mirror processing is performed on each of these bytes 3 to 0 (first to fourth bit strings). That is, the processing shown in the following (1) to (8) is performed on each of the bytes 3 to 0.
(1)ビッ ト 7 (第 1のビッ ト をビッ ト 0 (第 8のビッ ト の位置に移動  (1) Bit 7 (Move first bit to Bit 0 (move to eighth bit)
(2)ビヅ ト 6 (第 2のビッ ト をビッ ト 1 (第 7のビヅ ト の位置に移動  (2) Bit 6 (moves bit 2 to bit 1 (moves to bit 7
(3)ビッ ト 5 (第 3のビッ ト をビッ ト 2 (第 6のビヅ ト の位置に移動  (3) bit 5 (move third bit to bit 2 (move to sixth bit
(4)ビッ ト 4 (第 4のビッ ト をビッ ト 3 (第 5のビッ ト の位置に移動  (4) Bit 4 (Move fourth bit to bit 3 (Move to fifth bit
(5)ビッ ト 3 (第 5のビッ ト をビッ ト 4 (第 4のビッ ト の位置に移動  (5) Bit 3 (Move bit 5 to Bit 4 (move to bit 4
(6)ビッ ト 2 (第 6のビッ ト をビッ ト 5 (第 3のビッ ト の位置に移動  (6) Bit 2 (Move bit 6 to Bit 5 (Move to bit 3
(7)ビッ ト 1 (第 7のビッ ト をビッ ト 6 (第 2のビッ ト の位置に移動  (7) Bit 1 (move bit 7 to bit 6 (move to bit 2)
(8)ビッ 卜 0 (第 8のビッ ト をビッ ト 7 (第 1のビッ ト の位置に移動 本実施例ではこのような 8ビッ トミラ一処理が、 1回の 8ビッ トミラ一命令を 実行するだけで実現される。  (8) Bit 0 (Move the 8th bit to Bit 7 (Move to the position of the 1st bit) In this embodiment, such an 8-bit mirror process executes one 8-bit mirror instruction. It is realized just by doing.
次に本実施例の動作について図 2 Bを用いて説明する。 まず図 1の命令発行手 段 1 00が、 例えば下記のニーモニック記号で表される 8ビッ トミラ一命令を発 行する。  Next, the operation of this embodiment will be described with reference to FIG. 2B. First, the instruction issuing means 100 of FIG. 1 issues an 8-bit mirror instruction represented by, for example, the following mnemonic symbol.
M I RROR %R 1 , %R 0 この命令の意味は、 図 1の汎用レジス夕 1 03の中のレジス夕 R 0 (ソースレ ジス夕) に格納されるデ一夕に対して 8ビッ トミラー処理を施し、 その結果をレ ジス夕 R 1 (デスティネーションレジス夕) に格納するという意味である。 この 8ビッ トミラ一命令を図 1の CPU 1 02が受け付けると、 この 8ビッ ト ミラ一命令を解析した CPU 1 02により、 以下に示す処理が行われる。 即ち、 まずレジス夕 R 0に格納されるデータが、 内部デ一夕バスである PA— BU Sに出力され (図 2 Bのステップ S I ) 、 ALU 1 32がこれを受け取る (ステップ S 2) 。 そして ALU 1 3 2は、 図 2 A及び上記(1)〜(8)で説明した 8ビッ トミラ一処理を実行する (ステップ S 3) 。 8ビヅ トミラー処理が完了す ると、 ALU 1 3 2が処理結果を WW— BU Sに出力し (ステップ S 4) 、 この 処理結果はレジス夕 R 1に格納される (ステップ S 5) MI RROR% R 1,% R 0 The meaning of this instruction is that 8-bit mirror processing is performed on data stored in register R 0 (source register) in general register 110 in FIG. This means that the result is stored in the register R1 (destination register). When the CPU 102 in FIG. 1 receives the 8-bit mirror instruction, the CPU 102 that analyzes the 8-bit mirror instruction performs the following processing. That is, the data stored in the register R0 is first output to the internal bus PA-BUS (step SI in FIG. 2B), and the ALU 132 receives it (step S2). Then, the ALU 132 executes the 8-bit mirror processing described in FIG. 2A and the above (1) to (8) (step S3). When the 8-bit mirror processing is completed, the ALU 132 outputs the processing result to WW-BUS (step S4), and the processing result is stored in the register R1 (step S5).
以上のようにすることで 8ビッ トミラ一処理が可能となる。 これにより画像の ミラ一反転などの処理が可能となり、 マイクロコンピュー夕の処理の高機能化を 図れる。 なお 8ビッ トミラー処理を行う回路の詳細 (図 1 0参照) については後 述する。  In this way, 8-bit mirror processing can be performed. As a result, processing such as mirror inversion of images becomes possible, and the processing of microcomputers can be enhanced. The details of the circuit that performs 8-bit mirror processing (see Fig. 10) will be described later.
さて本実施例のような 8ビッ トミラー命令が無い場合には、 8ビッ トミラー処 理を実現するために以下に示すようなプログラムを作成する必要がある。 1 ミラ一するデ一夕 (図 3 A参照) を格納するレジス夕  When there is no 8-bit mirror instruction as in the present embodiment, it is necessary to create a program as shown below to realize the 8-bit mirror processing. Regis evening to store 1 day of Mira (see Figure 3A)
R2 テンポラリ一レジス夕  R2 Temporary Regis Evening
R3 マスクパターンを格納するレジス夕  R3 evening to store R3 mask pattern
R5 ミラーの結果を格納するレジス夕  Regis evening to store R5 mirror results
LD.W %R3, 0x80808080 R3 <= 0x80808080 マスクパターンをセッ ト LD.W% R3, 0x80808080 R3 <= 0x80808080 Set mask pattern
(図 3 B参照)  (See Fig. 3B)
LD.W ¾R25 %R1 R2 く = R1 ミラーするデ一夕をコピー LD.W ¾R2 5 % R1 R2 ku = R1 Copy the data to be mirrored
RL %R2, 0x07 R2を 7ビット左方向にローテ一ト  RL% R2, 0x07 Rotate R2 7 bits left
(図 3 C参照)  (See Fig. 3C)
AND %R2, %R3 R2にマスクパターンを ANDする AND% R2,% R3 AND mask pattern with R2
LD.W ¾R5, %R2 R5 <= R2 R2をミラー結果レジス夕にコピ一 LD.W ¾R5,% R2 R5 <= R2 R2
(図 3D参照)  (See Fig. 3D)
RR %R3, 0x01 ; R3二 0x40404040 マスクパターンを 1ビッ ト右方向 に口一テート (図 3 E参照)RR% R3, 0x01; R3 2 0x40404040 Mask pattern right by 1 bit (See Figure 3E)
LD.W ¾R23 %R1 R2 <= Rl ミラ一するデータをコピー RL %R2, 0x05 R2を 5ビッ ト左方向にローテ一ト LD.W ¾R2 3 % R1 R2 <= Rl Copy mirrored data RL% R2, 0x05 Rotate R2 to left by 5 bits
(図 3 F参照)  (See Fig. 3F)
AND %R2, %R3 R2にマスクパターンを ANDする OR ¾R5, %R2 R2を R5に OR (図 3 G参照)  AND% R2,% R3 AND mask pattern with R2 OR ¾R5,% R2 OR R2 with R5 (see Figure 3G)
RR ¾R3, 0x01 R3=0x20202020 マスクパターンを 1ビット右方向 にローテ一ト RR ¾R3, 0x01 R3 = 0x20202020 Rotate mask pattern right by 1 bit
LD.W ¾R2, %R1 R2 <= Rl ミラーするデータをコピー LD.W ¾R2,% R1 R2 <= Rl Copy data to be mirrored
RL ¾R2, 0x03 R2を 3ビッ ト左方向にローテ一トRL ¾R2, 0x03 Rotate R2 left 3 bits
AND %R2, %R3 R2にマスクパターンを ANDするAND% R2,% R3 AND mask pattern with R2
OR ¾R5, %R2 R2を R5に ORする OR ¾R5,% R2 OR R2 with R5
RR %R3, 0x01 R3=0xl0101010 マスクパターンを 1ビッ ト右方向 にローテ一ト RR% R3, 0x01 R3 = 0xl0101010 Rotate mask pattern right by 1 bit
LD.W %R2, ¾R1 R2 <= Rl ミラ一するデータをコピー LD.W% R2, ¾R1 R2 <= Rl
RL ¾R2, 0x01 R2を 1ビッ ト左方向にローテ一トRL ¾R2, 0x01 Rotate R2 one bit to the left
AND % 2, %R3 R2にマスクパターンを ANDするAND% 2,% R3 AND mask pattern with R2
OR %R5, %R2 R2を R5に ORする OR% R5,% R2 OR R2 with R5
RR %R3, 0x01 R3=0x08080808 マスクパターンを 1ビッ ト右方向 にローテ一ト RR% R3, 0x01 R3 = 0x08080808 Rotate mask pattern right by 1 bit
LD.W % 2, %R1 R2 <= Rl ミラーするデータをコピー LD.W% 2,% R1 R2 <= Rl Copy data to be mirrored
RR %R2, 0x01 R2を 1ビッ ト右方向にローテ一トRR% R2, 0x01 Rotate R2 1 bit right
AND % 2, %R3 R2にマスクパターンを ANDするAND% 2,% R3 AND mask pattern with R2
OR %R5, %R2 R2を R5に ORする RR %R3, 0x01 R3=0x04040404 マスクパターンを 1ビッ ト右方向 OR% R5,% R2 OR R2 with R5 RR% R3, 0x01 R3 = 0x04040404 Mask pattern 1 bit right
t 口一つ—ト  t one mouth
LD.W %R2, %R1 R2 <= Rl ミラ一するデ一夕をコビ一  LD.W% R2,% R1 R2 <= Rl
RR %R2, 0x03 R2を 3ビヅ ト右方向にローテ一ト RR% R2, 0x03 Rotate R2 right by 3 bits
AND %R2, %R3 R2にマスクパターンを ANDするAND% R2,% R3 AND mask pattern with R2
OR %R53 %R2 R2を R5に OR OR% R5 3 % R2 OR R2 to R5
RR %R3, 0x01 R3=0x02020202 マスクパターンを 1ビッ ト右方向 にローテ一ト RR% R3, 0x01 R3 = 0x02020202 Rotate mask pattern right by 1 bit
LD.W %R2, ¾R1 R2 <= Rl ミラーするデータをコピー  LD.W% R2, ¾R1 R2 <= Rl Copy data to be mirrored
RR %R2, 0x05 R2を 5ビッ ト右方向にローテ一ト RR% R2, 0x05 Rotate R2 5 bits right
AND %R2, ¾R3 R2にマスクパターンを ANDするAND% R2, ¾R3 AND mask pattern with R2
OR ¾R5, %R2 R2を R5に ORする OR ¾R5,% R2 OR R2 with R5
RR %R3, 0x01 R3=0x01010101 マスクパターンを 1ビッ ト右方向 にローテ一ト RR% R3, 0x01 R3 = 0x01010101 Rotate mask pattern right by 1 bit
LD.W %R2, %R1 R2 <= R1 ミラ一するデ一夕をコピー  LD.W% R2,% R1 R2 <= R1
RR %R2, 0x07 R2を Ίビッ ト右方向にローテ一ト RR% R2, 0x07 Rotate R2 Ίbit right
AND %R2, %R3 R2にマスクパターンを ANDするAND% R2,% R3 AND mask pattern with R2
OR ¾R5, ¾R2 R2を R5に ORする OR ¾R5, ¾R2 OR R2 to R5
(図 3 H参照)  (See Fig. 3H)
なお図 3 A〜図 3 Hにおける 3 1, 3 0 · · · · 02 , 0 1 , 00は、 3 2ビ ッ トのデータの中のビッ ト位置を示す。 これに対して図 3 Β、 図 3 Εのマスクパ 夕一ンなどにおける' 0 ' 、 , 1 ' は、 2進数の数字を表す。  .., 02, 01, and 00 in FIG. 3A to FIG. 3H indicate bit positions in the 32-bit data. On the other hand, “0”,, and 1 in the mask pattern in Fig. 3 and Fig. 3 represent binary numbers.
上記のように、 通常の手法で 8ビッ トミラ一処理を実現しょうとすると 40回 の命令の実行が必要になる。 これに対して本実施例によれば 1回の命令の実行で 8ビッ トミラー処理を実現できる。 従って、 処理時間を大幅に短縮できる。 また 命令コ一卞を格納するメモリエリアを小さくでき、 ハードウエアの小規模化を図 れる。 更にテンポラリ一レジス夕 (上記の R2) の必要性を無くすことが可能と なる。 As described above, 40-instruction execution is required to implement 8-bit mirror processing in the usual way. On the other hand, according to the present embodiment, 8-bit mirror processing can be realized by executing one instruction. Therefore, the processing time can be significantly reduced. In addition, the memory area for storing instruction codes can be reduced, and hardware can be downsized. It is. In addition, it is possible to eliminate the need for a temporary registration evening (R2 above).
(実施例 2) (Example 2)
実施例 2は、 スワップ処理を 1回の命令の実行で実現する実施例である。 本実 施例では図 4 Aに示すように、 各々が 8ビッ ト (Mビッ ト) で構成されるバイ ト 3〜バイ ト 0 (第 1〜第 4のビッ ト列) を有するデ一夕 50 (第 1のデ一夕) に 対してバイ ト単位のスワップ処理を施す。 即ち、 以下の(9)〜(12)に示す処理を施 す。  Embodiment 2 is an embodiment in which the swap processing is realized by executing an instruction once. In the present embodiment, as shown in FIG. 4A, a data buffer having bytes 3 to 0 (first to fourth bit strings) each consisting of 8 bits (M bits) is used. Swaps 50 (1st day) in units of bytes. That is, the following processes (9) to (12) are performed.
(9) バイ ト 3 (第 1のビッ ト列) をバイ ト 0 (第 4のビッ ト列) の位置に移動 (9) Move byte 3 (first bit string) to byte 0 (fourth bit string)
(10)バイ ト 2 (第 2のビッ ト列) をパイ ト 1 (第 3のビッ ト列) の位置に移動(10) Byte 2 (second bit string) is moved to bit 1 (third bit string)
(11)バイ ト 1 (第 3のビッ ト列) をバイ ト 2 (第 2のビッ ト列) の位置に移動(11) Move byte 1 (third bit string) to byte 2 (second bit string)
(12)バイ ト 0 (第 4のビッ ト列) をバイ ト 3 (第 1のビット列) の位置に移動 本実施例ではこのようなバイ ト単位のスワップ処理が、 1回のスワップ命令の 実行だけで実現される。 (12) Byte 0 (the fourth bit string) is moved to the position of byte 3 (the first bit string). In this embodiment, such byte-by-byte swap processing is executed by executing one swap instruction. Only realized.
次に本実施例の動作について図 4 Bを用いて説明する。 まず図 1の命令発行手 段 100が、 例えば下記の二一モニック記号で表されるスワップ命令を発行する。  Next, the operation of this embodiment will be described with reference to FIG. 4B. First, the instruction issuing means 100 in FIG. 1 issues a swap instruction represented by, for example, the following monic symbol.
SWAP %R 2 , %R 1 この命令の意味は、 汎用レジス夕 103の中のレジス夕 R 1 (ソースレジス夕) に格納されるデ一夕に対してスワップ処理を施し、 その結果をレジス夕 R2 (デ ステイネ一シヨンレジス夕) に格納するという意味である。 SWAP% R 2,% R 1 The meaning of this instruction is to perform swap processing on the data stored in the register R 1 (source register) in the general-purpose register 103, and to store the result in the register. It means that it is stored in R2 (Destination registration).
このスワップ命令を CPU 102が受け付けると、 このスワップ命令を解析し た CPU 102により、 以下に示す処理が行われる。  When the CPU 102 receives this swap instruction, the following processing is performed by the CPU 102 that has analyzed the swap instruction.
即ち、 レジス夕 R 1に格納されるデータが、 内部データバスである P A— BU Sに出力され (図 4 Bのステップ T 1 ) 、 ALU 132がこれを受け取る (ステ ヅプ T 2 ) 。 そして ALU 132は、 図 4 A及び上記(9)〜(12)で説明したスヮッ プ処理を実行する (ステップ T 3) 。 スワップ処理が完了すると、 ALU 1 32 が処理結果を WW— BUSに出力し (ステップ T 4) 、 この処理結果はレジス夕 R 2に格納される (ステップ T 5) 。 That is, the data stored in the register R1 is output to the internal data bus PA-BUS (step T1 in FIG. 4B), and the ALU 132 receives it (step T2). The ALU 132 is connected to the switch described in FIG. 4A and (9) to (12) above. The backup process is executed (step T3). When the swap processing is completed, the ALU 132 outputs the processing result to WW-BUS (step T4), and the processing result is stored in the register R2 (step T5).
以上のようにすることでバイ ト単位のスワップ処理が可能となる。 これにより、 例えば図 5 Aに示すリ トルエンディアンのデ一夕を図 5 Bに示すビッグエンディ アンのデータに変換したり、 逆にビッグエンディアンのデータをリ トルエンディ アンのデータに変換することができる。 これにより、 リ トルエンディアンを採用 するアーキテクチャの情報処理装置で作成したデ一夕を、 ビッグエンディアンを 採用するアーキテクチャの情報処理装置で有効利用したり、 その逆を行ったりす ることが可能となる。 なおスワップ処理を行う回路の詳細 (図 1 1参照) につい ては後述する。  By doing so, it becomes possible to perform swap processing in byte units. As a result, for example, little endian data shown in Fig. 5A can be converted to big endian data shown in Fig. 5B, and conversely, big endian data can be converted to little endian data. it can. This makes it possible to effectively use data created on an information processing device with a little endian architecture on an information processing device with a big endian architecture, and vice versa. . The details of the circuit that performs the swap processing (see Fig. 11) will be described later.
さて本実施例のようなスヮップ命令が無い場合には、 スヮップ処理を実現する ために以下に示すようなプログラムを作成する必要がある。  If there is no step command as in the present embodiment, it is necessary to create the following program to realize the step processing.
R1 スワップするデータ (図 6 A参照) R1 Data to be swapped (see Figure 6A)
R2 テンポラリーレジス夕  R2 Temporary Regis Evening
R3 マスクパターン  R3 mask pattern
R5 スヮップの結果  R5 Step Results
LD.W %R3, OxffOOffOO ; R3 <= OxffOOffOO マスクパターンをセッ ト LD.W% R3, OxffOOffOO; R3 <= OxffOOffOO Set mask pattern
(図 6 B参照)  (See Fig. 6B)
LD.W %R2, ¾R1 ; R2 <= R1 スワップするデータをコピー  LD.W% R2, ¾R1; R2 <= R1 Copy data to be swapped
RR %R2, 0x10 ; R2を 8ビッ ト右方向に口一テート RR% R2, 0x10; R2 8 bits right
(図 6 C参照)  (See Fig. 6C)
AND %R2, %R3 ; R2にマスクパターンを ANDする LD.W %R5, ¾R2 ; R2をスワップ結果のレジス夕にコ ピー (図 6 D参照)  AND% R2,% R3; AND the mask pattern with R2 LD.W% R5, ¾R2; Copy R2 to the registry of the swap result (see Figure 6D)
RR %R3, 0x10 ; R3 <= OxOOffOOff マスクパターンを 8ビット右方向 R RR% R3, 0x10; R3 <= OxOOffOOff Mask pattern right by 8 bits R
にローテ一ト (図 6 E参照) Rotate (see Fig. 6E)
LD.W %R R2 5, %R1 ; R2 <= R1 スワップするデータをコピー RL %R2, 0x10 ; R2を 8ビット左方向に口一テート LD.W% R R2 5,% R1; R2 <= R1 Copy data to be swapped RL% R2, 0x10; R2 8 bits left
2  Two
(図 6 F参照)  (See Fig. 6F)
AND %R2, %R3 ; R2にマスクパターンを ANDする  AND% R2,% R3; AND mask pattern with R2
(図 6 G参照)  (See Fig. 6G)
; R2を R5に ORする  OR R2 to R5
(図 6 H参照)  (See Fig. 6H)
なお図 6 A〜図 6 Hにおける 3 1, 30 · · · - 02 , 0 1, 00は、 3 2ビ ヅ トのデータの中のビッ ト位置を示す。 これに対して図 6 B、 図 6 Eのマスクパ ターンなどにおける' 0' 、 ' 1 ' は、 2進数の数字を表す。  .., -02, 01, and 00 in FIGS. 6A to 6H indicate bit positions in the 32-bit data. On the other hand, “0” and “1” in the mask patterns of FIGS. 6B and 6E represent binary numbers.
上記のように、 通常の手法でスワップ処理を実現しょうとすると 1 0回の命令 の実行が必要になる。 これに対して本実施例によれば 1回の命令の実行でスヮッ プ処理を実現できる。 従って、 処理時間を大幅に短縮できる。 また命令コードを 格納するメモリエリアを小さくでき、 ハ一ドウエアの小規模化を図れる。 更にテ ンポラリーレジス夕 (上記の R 2) の必要性を無くすことが可能となる。  As described above, if you try to implement swap processing in the usual way, you need to execute 10 instructions. On the other hand, according to the present embodiment, step processing can be realized by executing an instruction once. Therefore, the processing time can be significantly reduced. Also, the memory area for storing instruction codes can be reduced, and hardware can be downsized. In addition, the need for Temporary Regis evening (R2 above) can be eliminated.
(実施例 3) (Example 3)
実施例 3は、 8ビヅ トミラー命令とスヮップ命令とを組み合わせて 3 2ビッ ト ミラ一処理を実現する実施例である。  The third embodiment is an embodiment that realizes a 32-bit mirror process by combining an 8-bit mirror instruction and a step instruction.
本実施例では図 7 Aに示すように、 各々が 8ビット (Mビッ ト) で構成される バイ ト 3〜バイ ト 0 (第 1〜第 4のビッ ト列) を有するデ一夕 5 0 (第 1のデ一 夕) に対して、 まず実施例 1で説明した 8ビッ トミラ一処理を施す。 即ち前述の (1)〜(8)の処理をバイ ト 3〜バイ ト 0の各々に対して施す。  In this embodiment, as shown in FIG. 7A, a data block 50 having bytes 3 to 0 (first to fourth bit strings) each having 8 bits (M bits) is provided. First, the 8-bit mirror processing described in the first embodiment is performed on the first data. That is, the processes (1) to (8) described above are performed on each of the bytes 3 to 0.
次に、 8ビッ トミラ一処理が施された後のデ一夕 5 0に対して、 実施例 2で説 明したスワップ処理を施す。 即ち前述の(9)〜(12)の処理を施す。  Next, the swap processing described in the second embodiment is performed on the data 50 after the 8-bit mirror processing. That is, the above-described processes (9) to (12) are performed.
以上のようにすることで、 図 7 Cに示すような 32ビッ トミラー処理が可能と なる。 これにより画像のミラ一反転などの処理が可能となり、 マイクロコンピュ —夕の処理の高機能化を図れる。 By doing so, a 32-bit mirror process as shown in Fig. 7C is possible. This enables processing such as mirror inversion of the image, —Improve the functionality of evening processing.
なお上記では、 8ビッ トミラ一処理の後にスワップ処理を行っているが、 図 7 In the above, swap processing is performed after 8-bit mirror processing.
Bに示すように、 スワップ処理の後に 8ビッ トミラー処理を行うようにしても、As shown in B, even if an 8-bit mirror process is performed after the swap process,
32ビッ トミラー処理を実現できる。 32-bit mirror processing can be realized.
次に本実施例の動作について図 8 A、 図 8B、 図 8 Cを用いて説明する。 まず図 1の命令発行手段 100が、 例えば下記のニーモニック記号で表される Next, the operation of this embodiment will be described with reference to FIGS. 8A, 8B, and 8C. First, the instruction issuing means 100 of FIG. 1 is represented, for example, by the following mnemonic symbol.
8ビッ トミラ一命令を発行する (図 8 Cに示すように P C 120が 8ビットミラ 一命令を指す) 。 Issue an 8-bit mirror instruction (PC 120 indicates an 8-bit mirror instruction as shown in Figure 8C).
MIRROR % 1 , %R 0 この 8ビッ トミラー命令を図 1の CPU 102が受け付けると、 この 8ビッ ト ミラ一命令を解析した CPU 102により、 図 8 Aに示す処理が行われる。 なお 図 8 Aのステップ U 1 ~U 5の処理は、 図 2 Bのステップ S 1〜S 5と同様であ るため、 説明を省略する。 MIRROR% 1,% R 0 When the CPU 102 in FIG. 1 receives the 8-bit mirror instruction, the CPU 102 that analyzes the 8-bit mirror instruction performs the processing shown in FIG. 8A. Note that the processing in steps U1 to U5 in FIG. 8A is the same as the processing in steps S1 to S5 in FIG. 2B, and a description thereof will be omitted.
次に命令発行手段 100が、 例えば下記のニーモニック記号で表されるスヮッ プ命令を発行する (P C 120がスワップ命令を指す) 。  Next, the instruction issuing means 100 issues a swap instruction represented by, for example, the following mnemonic symbol (PC 120 indicates a swap instruction).
SWAP %R 2 , %R 1 このスワップ命令を CPU 102が受け付けると、 このスワップ命令を解析し た CPU 102により、 図 8 Bに示す処理が行われる。 なお図 8 Bのステップ V 1〜V5の処理は、 図 4 Bのステップ T 1〜T 5と同様であるため、 説明を省略 する。 但し、 図 8 Βのステップ V 1においてレジス夕 R 1には、 8ビッ トミラ一 処理が施された後のデータが格納されている。 SWAP% R 2,% R 1 When the CPU 102 receives this swap instruction, the CPU 102 that has analyzed the swap instruction performs the processing shown in FIG. 8B. Note that the processing in steps V1 to V5 in FIG. 8B is the same as that in steps T1 to T5 in FIG. However, the data after the 8-bit mirror processing has been performed is stored in the register R1 in step V1 in FIG.
以上のようにして、 レジス夕 R 0のデータに対して 32ビッ トミラー処理 (8 ビッ トミラ一処理及びスワップ処理) を施したデ一夕が、 レジス夕 R2に格納さ れることになる。 次に ALU 132 (演算回路) の構成例について説明する。 図 9 Aに示すよう に ALU 132は、 8ビッ トミラー回路 20、 スワップ回路 22、 マルチプレク サ 30、 並びに算術演算、 論理演算のための図示しない種々の回路を含む。 As described above, the data obtained by applying the 32-bit mirror processing (8-bit mirror processing and swap processing) to the data of the register R0 is stored in the register R2. Next, a configuration example of the ALU 132 (arithmetic circuit) will be described. As shown in FIG. 9A, the ALU 132 includes an 8-bit mirror circuit 20, a swap circuit 22, a multiplexer 30, and various circuits (not shown) for arithmetic and logical operations.
ここで 8ビッ トミラ一回路 20は、 P A— B USから 32ビッ トの PA31〜 PA0 (第 1のデータ又はスワップ処理が施された第 1のデ一夕) を受け、 これ らの PA31〜P AOに基づき 8ビッ トミラ一処理を行い、 その結果である 32 ビヅ トの DA31〜DA0をマルチプレクサ 30に出力する。 スワップ回路 22 は、 PA— BUSから PA31〜PA0 (第 1のデータ又は 8ビッ トミラー処理 が施された第 1のデ一夕) を受け、 これらの PA31〜PA0に基づきスワップ 処理を行い、 その結果である 32ビッ 卜の DB 31〜DB 0をマルチプレクサ 3 0に出力する。 マルチプレクサ 30は、 セレク ト信号に基づいて D A 31〜DA 0及び DB 31〜DB 0のいずれかを選択し、 その結果である 32ビヅ 卜の WW 31〜WW0を WW— BUSに出力する。 なおマルチプレクサ 30は、 算術演算、 論理演算のための図示しない種々の回路の出力をマルチプレクスする機能も有す る o  Here, the 8-bit mirror circuit 20 receives the 32-bit PA31 to PA0 (the first data or the first data subjected to the swap processing) from the PA—BUS and receives these PA31 to P0. An 8-bit mirror process is performed based on AO, and the resulting 32-bit DA31 to DA0 are output to the multiplexer 30. The swap circuit 22 receives PA31 to PA0 (first data or the first data subjected to 8-bit mirror processing) from PA-BUS, performs a swap process based on these PA31 to PA0, and as a result, And outputs the 32-bit DB 31 to DB 0 to the multiplexer 30. The multiplexer 30 selects one of DA 31 to DA 0 and DB 31 to DB 0 based on the select signal, and outputs the resultant 32-bit WW 31 to WW 0 to WW-BUS. The multiplexer 30 also has a function of multiplexing the outputs of various circuits (not shown) for arithmetic and logical operations.
図 10に、 8ビッ トミラ一回路 20の構成例を示す。 図 10に示すようにこの 8ビッ トミラ一回路 20により、 ?八31は0八24に、 ?八30は0八25に、  FIG. 10 shows a configuration example of the 8-bit mirror circuit 20. As shown in FIG. 10, this 8-bit mirror circuit 20 allows? 8 31 to 0 8 24,? 8:30 to 0825,
PA24は DA31に伝えられる。 また P A 23は D A 16に、 PA24 is passed on to DA31. P A 23 becomes D A 16,
PA22は DA 17に、 PA 16は DA23に伝えられる。 また 八 15は0八8に、 PA14はDA9に、 PA8は DA15 に伝えられる。 また PA7は DA0に、 PA6は DA1に、 PAPA22 is transmitted to DA17, and PA16 is transmitted to DA23. Also, 815 is transmitted to 88, PA14 is transmitted to DA9, and PA8 is transmitted to DA15. PA7 to DA0, PA6 to DA1, PA
0は D A 7に伝えられる。 このようにして 8ビッ ト毎のミラ一処理が可能となる。 図 1 1に、 スワップ回路 22の構成例を示す。 図 1 1に示すようにこのスヮッ プ回路 22により、 ?八31〜?八24は087〜080に、 PA23〜PA1 6は0815〜088に、 PA 15〜PA8は DB 23〜DB 16に、 PA7〜 PA(HiDB31〜DB24に伝えられる。 このようにしてバイ ト単位のスヮッ プ処理が可能となる。 0 is transmitted to D A 7. In this way, mirror processing for every 8 bits becomes possible. FIG. 11 shows a configuration example of the swap circuit 22. As shown in FIG. Eighteen-? 24 is transmitted to 087 to 080, PA23 to PA16 is transmitted to 0815 to 088, PA15 to PA8 is transmitted to DB23 to DB16, and PA7 to PA (HiDB31 to DB24. Processing can be performed.
図 9 Aの構成の ALU 132により 32ビッ トミラ一処理を行う場合には次の ようにする。 即ち、 まずセレクタ信号により DA 31〜D A 0を選択し、 8ビヅ トミラ一処理が施された WW31〜WW0を WW— BUSに出力する。 そしてこ の WW 31〜WW0を汎用レジス夕及び PA— BUSを介して再度 ALU 132 に入力する。 そして次は、 セレクタ信号により DB 31〜DB 0を選択すればよ い。 或いは逆に、 まずセレクタ信号により DB 31〜DB0を選択し、 スワップ 処理が施された WW31〜WW0を WW— BUSに出力する。 そしてこの WW3 1〜WW0を汎用レジス夕及び PA— BUSを介して再度 ALU 132に入力す る。 そして次は、 セレクタ信号により D A31〜DA0を選択する。 When performing 32-bit mirror processing by ALU 132 with the configuration of Fig. To do. That is, first, DA31 to DA0 are selected by a selector signal, and WW31 to WW0 subjected to 8-bit mirror processing are output to WW-BUS. Then, these WW31 to WW0 are input to the ALU 132 again through the general-purpose register and the PA-BUS. Then, DB 31 to DB 0 may be selected by the selector signal. Or, conversely, first, DB31 to DB0 are selected by the selector signal, and the swapped WW31 to WW0 are output to WW-BUS. Then, these WW31 to WW0 are again input to the ALU 132 via the general-purpose register and the PA-BUS. Then, DA31 to DA0 are selected by the selector signal.
以上のように、 図 9 Aの ALU 132によれば、 8ビヅ トミラ一処理、 スヮヅ プ処理及び 32ビッ トミラ一処理の全ての処理が可能となる。 スヮップ処理が可 能になることで、 例えば図 5A、 図 5 Bで説明したエンディアンの変換が可能と なる。 一方、 8ビッ トミラ一処理や 32ビッ トミラー処理が可能となることで、 画像処理における画像のミラ一反転などが可能となる。  As described above, according to the ALU 132 of FIG. 9A, all of the 8-bit mirror processing, the step processing, and the 32-bit mirror processing can be performed. By enabling the skip processing, for example, the endian conversion described in FIGS. 5A and 5B can be performed. On the other hand, by enabling 8-bit mirror processing and 32-bit mirror processing, it is possible to perform mirror inversion of images in image processing.
しかも、 図 9 Aの ALU 132によれば、 1クロックの期間でこれらの処理を 完了できるため、 R I S C方式のマイクロコンピュー夕に最適な情報処理を実現 できる。  Moreover, according to the ALU 132 in FIG. 9A, these processes can be completed in one clock period, so that information processing optimal for a RISC microcomputer can be realized.
なお図 9 Bに本実施例の比較例の ALUの構成を示す。 この ALU 134は、 8ビッ トミラ一回路 20、 スヮップ回路 22の他に、 32ビッ トミラ一処理 (図 7 C参照) を行う 32ビッ トミラー回路 24を含む。 図 9 Bの構成によっても、 8ビッ トミラー処理、 スワップ処理及び 32ビッ トミラー処理の全ての処理を実 現できる。 しかしながら、 この構成によると 32ビッ トミラ一回路 24が余計に 必要になる。 またマルチプレクサ 31は、 D A 31〜D A 0及び D B 31〜D B 0のみならず、 D C 31〜D C 0もマルチプレクスしなければならなくなるため、 マルチプレクサ 3 1の回路規模も大きくなる。 例えばミラ一回路が 1ビッ 卜の入 力に対して 1ゲートを必要とする場合には、 32ビッ 卜の入力を持つ 32ビヅ ト ミラー回路 24を設けると 32ゲートだけ回路規模が大きくなる。 また例えばマ ルチプレクサが 1ビッ 卜の入力に対して 1ゲート必要である場合には、 図 9 Bで はマルチプレクサの入力が 32ビッ ト分増えるため、 32ゲートだけ回路規模が 大きくなる。 従って、 図 9Bの構成によると、 ALUの回路規模が最低でも合計FIG. 9B shows the configuration of the ALU of the comparative example of this embodiment. The ALU 134 includes a 32-bit mirror circuit 24 for performing 32-bit mirror processing (see FIG. 7C) in addition to the 8-bit mirror circuit 20 and the step circuit 22. Even with the configuration of FIG. 9B, all of the 8-bit mirror processing, swap processing, and 32-bit mirror processing can be realized. However, according to this configuration, an additional 32-bit mirror circuit 24 is required. In addition, since the multiplexer 31 must multiplex not only DA 31 to DA 0 and DB 31 to DB 0 but also DC 31 to DC 0, the circuit scale of the multiplexer 31 also becomes large. For example, when a mirror circuit requires one gate for one bit input, providing a 32-bit mirror circuit 24 having a 32-bit input increases the circuit scale by only 32 gates. For example, if the multiplexer requires one gate for one bit input, the circuit scale is increased by 32 gates in Fig. 9B because the multiplexer input is increased by 32 bits. growing. Therefore, according to the configuration of Figure 9B, the circuit size of the ALU is at least
64ゲートだけ増えてしまい、 これは製品コストの上昇、 消費電力の増大化等を 招く。 This increases only 64 gates, which leads to higher product costs and higher power consumption.
一方、 本実施例によれば、 このような回路の大規模化を招くことなく、 8ビッ トミラー処理、 スワップ処理及び 32ビットミラ一処理の全ての処理を実現する ことが可能となる。  On the other hand, according to the present embodiment, it is possible to realize all the processes of the 8-bit mirror process, the swap process, and the 32-bit mirror process without increasing the circuit scale.
(実施例 4) (Example 4)
実施例 4は、 本発明のマイクロコンビユー夕の詳細例を示す実施例である。 図 12に示すように実施例 2のマイクロコンビユー夕 700は、 32ビッ トの マイクロコンピュー夕であり、 CPU710、 R〇M720、 RAM730、 高 周波発振回路 910、 低周波発振回路 920、 リセッ ト回路 930、 プリスケ一 ラ 940、 16ビヅ トプログラマブルタイマ 950や 8ビッ トプログラマプル夕 イマ 960やクロックタイマ 970などの夕イマ回路、 インテリジェント DMA 980や高速 DMA 990などのデータ転送制御回路、 割り込みコントローラ 8 00、 シリァルイン夕一フエース 810、 B C U (バスコントロールュニヅ ト) Embodiment 4 is an embodiment showing a detailed example of the micro combination of the present invention. As shown in FIG. 12, the microcomputer 700 of the second embodiment is a 32-bit microcomputer, and includes a CPU 710, a R〇M720, a RAM730, a high-frequency oscillator 910, a low-frequency oscillator 920, and a reset. Circuit 930, prescaler 940, 16-bit programmable timer 950, 8-bit programmer, timer circuit such as timer 960, clock timer 970, etc., data transfer control circuit such as intelligent DMA 980 and high-speed DMA 990, interrupt controller 800, Serial Inn Yuichi Face 810, BCU (Bus Control Unit)
740、 A/D変換器 830や D/ A変換器 840などのアナログインタ一フエ ース回路、 入力ポート 850や出力ポ一ト 860や I/Oポート 870などの I /0回路、 及びそれらを接続する各種バス 750、 760、 各種ピン 890を含 む。 740, analog interface circuits such as A / D converter 830 and D / A converter 840, I / O circuits such as input port 850, output port 860, I / O port 870, and so on. Includes various buses 750, 760 and various pins 890 to be connected.
1チップの半導体基板上に形成されるこのマイクロコンビユー夕 700は、 3 2ビッ トのデ一夕を処理できる R I S C方式のマイクロコンピュ一夕である。 そ してパイプライン方式及びロード ·ストァ方式のアーキテクチャ一を採用し、 ほ とんど全ての命令を 1ク口ックの期間で実行する。 全ての命令は 16ビッ トの固 定長で記述されており、 これにより極めて小さい命令コ一ドサイズを実現してい る。  This microcomputer 700 formed on a single-chip semiconductor substrate is a RISC microcomputer that can process 32 bits of data. It employs a pipeline and load store architecture, and executes almost all instructions in one cycle. All instructions are described with a fixed length of 16 bits, which results in a very small instruction code size.
そして、 実施例 1、 2、 3で説明したように、 マイクロコンピュー夕 700は、 8ビッ トミラ一処理、 スヮップ処理及び 32ビッ トミラ一処理を小規模な回路構 成で実現できる。 このため、 これまで DSP、 画像処理専用 I C、 音処理専用 I Cなどが行っていた処理を代行することができ、 このマイクロコンビユー夕 70 0が組み込まれる電子機器の低コスト化、 小型化を図ることが可能となる。 As described in the first, second, and third embodiments, the microcomputer 700 performs the 8-bit mirror processing, the step processing, and the 32-bit mirror processing on a small-scale circuit configuration. Can be realized. For this reason, processing that was previously performed by DSPs, ICs dedicated to image processing, ICs dedicated to sound processing, etc. can be substituted, and the cost and size of electronic devices incorporating this microcombiner 700 are reduced. It becomes possible.
(実施例 5) (Example 5)
実施例 5は、 実施例 1、 2、 3、 4で説明したマイクロコンビュ一夕を含む電 子機器に関する実施例である。  The fifth embodiment is an embodiment relating to an electronic device including the micro-computer described in the first, second, third and fourth embodiments.
例えば図 13 Aに電子機器の 1つである力一ナビゲ一シヨンシステムの内部ブ ロック図を示し、 図 14 Aにその外観図を示す。 力一ナビゲーシヨンシステムの 操作はリモコン 5 10を用いて行われ、 GP Sやジャイロからの情報に基づいて 位置検出部 520が車の位置を検出する。 地図などの情報は CDROM 530 (情報記憶媒体) に格納されている。 画像メモリ 540は画像処理の際の作業領 域になるメモリであり、 生成された画像は画像出力部 550を用いてドライバー に表示される。 マイクロコンピュー夕 500は、 リモコン 510、 位置検出部 5 20、 CDROM 530などのデ一夕入力源からデ一夕を入力し、 種々の処理を 行い、 処理後のデ一夕を画像出力部 550などの出力装置を用いて出力する。 これまでの力一ナビゲ一シヨンシステムでは、 画像処理 (グラフィヅク処理) は、 D S Pや専用の画像処理 I Cが行っていた。 このため、 例えば C I SC型の マイクロコンビュ一夕と D SPというように電子機器内に 2つのプロセッサが存 在することになり、 システムが複雑化していた。 実施例 1、 2、 3、 4で説明し たマイクロコンピュ一夕を採用すれば、 8ビッ トミラ一処理、 32ビッ トミラー 処理、 スワップ処理を少ない回路規模で実現できるため、 DSP等を用いること なく、 力一ナビゲーシヨンシステムが必要とする画像ミラ一反転などの画像処理 を実現することが可能となる。  For example, Fig. 13A shows an internal block diagram of a power navigation system, which is one of the electronic devices, and Fig. 14A shows its appearance. The operation of the force navigation system is performed using the remote controller 510, and the position detection unit 520 detects the position of the vehicle based on information from the GPS and the gyro. Information such as maps is stored in CDROM 530 (information storage medium). The image memory 540 is a memory serving as a work area for image processing, and the generated image is displayed to the driver using the image output unit 550. The microcomputer 500 receives data from a data input source such as a remote control 510, a position detection unit 520, and a CDROM 530, performs various processes, and outputs the processed data to an image output unit 550. Output using an output device such as. In the conventional navigation system, image processing (graphic processing) is performed by DSP or dedicated image processing IC. For this reason, there were two processors in the electronic equipment, for example, a CISC-type microcomputer and a DSP, and the system became complicated. If the microcomputer described in the first, second, third, and fourth embodiments is used, 8-bit mirror processing, 32-bit mirror processing, and swap processing can be realized with a small circuit scale, without using a DSP or the like. It is possible to realize image processing such as image mirror inversion required by the force navigation system.
図 13 Bに電子機器の 1つであるゲーム装置の内部プロヅク図を示し、 図 14 Bにその外観図を示す。 このゲーム装置では、 ゲームコントローラ 560からの プレーヤの操作倩報、 CDROM 570からのゲームプログラム、 I Cカード 5 80からのプレーヤ情報等に基づいて、 画像メモリ 590を作業領域としてゲ一 ム画像やゲーム音を生成し、 画像出力部 6 1 0、 音出力部 6 0 0を用いて出力す る。 実施例 1、 2、 3、 4で説明したマイクロコンピュー夕 5 0 0を採用すれば、 8ビッ トミラ一処理機能、 3 2ビヅ トミラ一処理機能、 スワップ処理機能を用い て、 ゲーム画像の生成やゲーム音の生成に必要な種々の処理を行うことが可能と なる。 FIG. 13B shows an internal block diagram of a game device which is one of the electronic devices, and FIG. 14B shows an external view thereof. In this game device, the image memory 590 is used as a work area based on the player operation information from the game controller 560, the game program from the CDROM 570, the player information from the IC card 580, and the like. A game image and a game sound are generated and output using the image output unit 610 and the sound output unit 600. If the microcomputer 500 described in the first, second, third, and fourth embodiments is adopted, a game image can be obtained by using an 8-bit mirror processing function, a 32-bit mirror processing function, and a swap processing function. It becomes possible to perform various processes required for generation and generation of game sounds.
図 1 3 Cに電子機器の 1つであるプリン夕の内部プロック図を示し、 図 1 4 C にその外観図を示す。 このプリン夕では、 操作パネル 6 2 0からの操作情報、 コ 一ドメモリ 6 3 0及びフォントメモリ 6 4 0から文字情報に基づいて、 ビッ トマ ップメモリ 6 5 0を作業領域として、 印刷画像を生成し、 プリント出力部 6 6 0 を用いて出力する。 またプリン夕の状態ゃモ一ドを表示パネル 6 7 0を用いてュ —ザに伝える。 実施例 1、 2、 3、 4で説明したマイクロコンピュー夕 5 0 0を 採用すれば、 8ビヅ トミラー処理機能、 3 2ビットミラー処理機能、 スワップ処 理機能を用いて、 印刷画像の生成に必要な種々の処理を行うことが可能となる。 なお本発明のマイクロコンビユー夕を適用できる電子機器としては、 上記以外 にも例えば、 携帯電話 (セルラーフォン) 、 P H S、 ページャ、 オーディオ機器、 電子手帳、 電子卓上計算機、 P O S端末、 夕ツチパネルを備えた装置、 プロジェ クタ、 ワードプロセッサ、 パーソナルコンピュータ、 テレビ、 ビュ一ファインダ 型又はモニタ直視型のビデオテープレコーダなど種々のものを考えることができ ο  Figure 13C shows an internal block diagram of one of the electronic devices, the pudding, and Figure 14C shows its external view. In this printing, based on the operation information from the operation panel 620 and the character information from the code memory 630 and the font memory 640, a print image is generated using the bitmap memory 650 as a work area. Output using the print output unit 660. The state of the pudding is indicated to the user using the display panel 670. If the microcomputer 500 described in the first, second, third, and fourth embodiments is adopted, a print image can be generated using the 8-bit mirror processing function, the 32-bit mirror processing function, and the swap processing function. It is possible to perform various processes necessary for the above. In addition, the electronic devices to which the micro combination of the present invention can be applied include, in addition to the above, for example, a mobile phone (cellular phone), a PHS, a pager, an audio device, an electronic organizer, an electronic desk calculator, a POS terminal, and a sunset panel. Devices, projectors, word processors, personal computers, televisions, viewfinder-type or monitor-directed video tape recorders, etc.
なお、 本発明は上記実施例 1、 2、 3、 4、 5に限定されるものではなく、 本 発明の要旨の範囲内で種々の変形実施が可能である。  It should be noted that the present invention is not limited to the first, second, third, fourth, and fifth embodiments, and various modifications can be made within the scope of the present invention.
例えば上記実施例では、 各々が 8ビッ トで構成される第 1〜第 4のビッ ト列を 含むデ一夕に対して、 ミラー処理やスワップ処理を施す場合について説明したが、 本発明はこれに限られるものではない。 例えば各々が Mビッ トで構成される第 1 〜第 Nのビッ ト列のデータに対するミラー処理やスワップ処理に本発明は適用で きる。 但しスワップ処理をエンディアンの変更に使用する場合は、 M = 8である ことが望ましい。  For example, in the above embodiment, a description has been given of a case where mirror processing and swap processing are performed on data including the first to fourth bit strings each consisting of 8 bits. It is not limited to. For example, the present invention can be applied to a mirror process or a swap process for the data of the first to Nth bit strings each including M bits. However, if swap processing is used to change the endian, it is desirable that M = 8.
また本発明は、 マイクロコンビユー夕、 特に R I S C型のマイクロコンビュ一 夕に適用した場合に特に有効であるが、 それ以外の用途も可能である。 Also, the present invention relates to a micro-computer, especially a RISC-type micro-computer. It is particularly effective when applied in the evening, but other uses are also possible.

Claims

請 求 の 範 囲 The scope of the claims
( 1 ) 命令を受け、 該命令を解析し、 該命令を実行するための制御を行う制御 回路と、 (1) a control circuit that receives an instruction, analyzes the instruction, and performs control for executing the instruction;
前記制御回路の制御の下で前記命令に対応する演算処理を実行する演算回路と、 各々が Mビッ 卜で構成される第 1〜第 Nのビッ ト列を有する第 1のデ一夕をォ ペランドとする命令を前記制御回路に対して発行する命令発行手段とを含み、 前記命令発行手段が、  An operation circuit that executes an operation process corresponding to the instruction under the control of the control circuit, and a first data unit having first to N-th bit strings each including M bits. Instruction issuing means for issuing an instruction to be a peland to the control circuit, wherein the instruction issuing means comprises:
第 1のビッ トを第 Mのビッ 卜の位置に移動する処理と、 第 2のビッ トを第 (M 一 1 ) のビッ トの位置に移動する処理と、 第 (M— 1 ) のビヅ ト を第 2のビッ 卜の位置に移動する処理と、 第 Mのビッ トを第 1のビッ 卜の位置に 移動する処理とを、 第 1のデータの第 1〜第 Nのビッ ト列の各々に対して施す M ビヅ トミラー命令を発行し、  The process of moving the first bit to the position of the Mth bit, the process of moving the second bit to the position of the (M-1) th bit, and the process of moving the first bit to the (M-1) th bit The process of moving the bit to the position of the second bit and the process of moving the Mth bit to the position of the first bit are the first to Nth bit strings of the first data. Issue an M-bit mirror instruction for each of the
前記演算回路が、  The arithmetic circuit includes:
前記 Mビッ トミラー命令が発行された場合に、 該命令に対応するビッ ト移動処 理を行うことを特徴とするマイクロコンピュー夕。  A microcomputer according to claim 1, wherein when the M-bit mirror instruction is issued, a bit move process corresponding to the instruction is performed.
( 2 ) 命令を受け、 該命令を解析し、 該命令を実行するための制御を行う制御 回路と、  (2) a control circuit that receives the instruction, analyzes the instruction, and performs control for executing the instruction;
前記制御回路の制御の下で前記命令に対応する演算処理を実行する演算回路と、 各々が Mビットで構成される第 1〜第 Nのビッ ト列を有する第 1のデータをォ ペランドとする命令を前記制御回路に対して発行する命令発行手段とを含み、 前記命令発行手段が、  An arithmetic circuit that executes arithmetic processing corresponding to the instruction under the control of the control circuit; and first data having first to N-th bit strings, each including M bits, as an operand Instruction issuing means for issuing an instruction to the control circuit, wherein the instruction issuing means comprises:
第 1のビッ ト列を第 Nのビッ ト列の位置に移動する処理と、 第 2のビッ ト列を 第 (N— 1 ) のビッ ト列の位置に移動する処理と、 第 (N— 1 ) のビッ ト列を第 2のビッ ト列の位置に移動する処理と、 第 Nのビッ ト列を第 1の ビッ ト列の位置に移動する処理とを、 第 1のデ一夕に対して施すスワップ命令を 発行し、  A process of moving the first bit sequence to the position of the N-th bit sequence, a process of moving the second bit sequence to the position of the (N-1) -th bit sequence, The process of moving the bit sequence of (1) to the position of the second bit sequence and the process of moving the N-th bit sequence to the position of the first bit sequence are performed in the first Issue a swap instruction
前記演算回路が、 前記スワップ命令が発行された場合に、 該命令に対応するビッ ト列移動処理を 行うことを特徴とするマイクロコンピュータ。 The arithmetic circuit includes: When the swap instruction is issued, the microcomputer performs a bit string movement process corresponding to the instruction.
( 3 ) 命令を受け、 該命令を解析し、 該命令を実行するための制御を行う制御 回路と、  (3) a control circuit that receives the instruction, analyzes the instruction, and performs control for executing the instruction;
前記制御回路の制御の下で前記命令に対応する演算処理を実行する演算回路と、 各々が Mビッ 卜で構成される第 1〜第 Nのビッ ト列を有する第 1のデータをォ ペランドとする命令を前記制御回路に対して発行する命令発行手段とを含み、 前記命令発行手段が、  An arithmetic circuit that executes arithmetic processing corresponding to the instruction under the control of the control circuit; and first data having first to N-th bit strings, each of which is formed of M bits, as an operand. And an instruction issuing means for issuing an instruction to the control circuit.
第 1のビッ トを第 Mのビッ トの位置に移動する処理と、 第 2のビットを第 (M 一 1 ) のビヅ トの位置に移動する処理と、 第 (M— 1 ) のビッ ト を第 2のビッ トの位置に移動する処理と、 第 Mのビッ トを第 1のビッ 卜の位置に 移動する処理とを、 第 1のデ一夕の第 1〜第 Nのビッ ト列の各々に対して施す M ビッ トミラー命令を発行し、  A process of moving the first bit to the position of the Mth bit, a process of moving the second bit to the position of the (M−1) th bit, and a process of moving the first bit to the (M−1) th bit. The process of moving the M bit to the position of the first bit and the process of moving the Mth bit to the position of the first bit are the first to Nth bits of the first data. Issue an M-bit mirror instruction for each of the columns,
第 1のビッ ト列を第 Nのビッ ト列の位置に移動する処理と、 第 2のビッ ト列を 第 (N— 1 ) のビッ ト列の位置に移動する処理と、 第 (N— 1 ) のビッ ト列を第 2のビッ ト列の位置に移動する処理と、 第 Nのビッ ト列を第 1の ビッ ト列の位置に移動する処理とを、 前記 Mビッ トミラ一命令の処理が施された 第 1のデ一夕に対して施すスワップ命令を発行し、  A process of moving the first bit sequence to the position of the N-th bit sequence, a process of moving the second bit sequence to the position of the (N-1) -th bit sequence, The process of moving the bit sequence of 1) to the position of the second bit sequence and the process of moving the Nth bit sequence to the position of the first bit sequence are performed by the M-bit mirror instruction. Issue a swap instruction to be applied to the processed first data,
前記演算回路が、  The arithmetic circuit includes:
前記 Mビッ トミラー命令、 前記スワップ命令が発行された場合に、 該命令に対 応するビッ ト移動処理、 ビッ ト列移動処理を行うことを特徴とするマイクロコン ピュー夕。  A microcomputer according to claim 1, wherein when the M-bit mirror instruction and the swap instruction are issued, a bit move process and a bit string move process corresponding to the instruction are performed.
( 4 ) 命令を受け、 該命令を解析し、 該命令を実行するための制御を行う制御 回路と、  (4) a control circuit that receives the instruction, analyzes the instruction, and performs control for executing the instruction;
前記制御回路の制御の下で前記命令に対応する演算処理を実行する演算回路と、 各々が Mビヅトで構成される第 1〜第 Nのビッ ト列を有する第 1のデータをォ ペランドとする命令を前記制御回路に対して発行する命令発行手段とを含み、 前記命令発行手段が、 第 1のビッ ト列を第 Nのビッ ト列の位置に移動する処理と、 第 2のビッ ト列を 第 (N— 1 ) のビッ ト列の位置に移動する処理と、 · 第 (N— 1 ) のビッ ト列を第 2のビッ ト列の位置に移動する処理と、 第 Nのビッ ト列を第 1の ビッ ト列の位置に移動する処理とを、 第 1のデ一夕に対して施すスワップ命令を 発行し、 An arithmetic circuit that executes arithmetic processing corresponding to the instruction under the control of the control circuit; and first data having first to N-th bit strings, each including M bits, as an operand Instruction issuing means for issuing an instruction to the control circuit, wherein the instruction issuing means comprises: A process of moving the first bit sequence to the position of the Nth bit sequence, a process of moving the second bit sequence to the position of the (N-1) th bit sequence, — The process of moving the bit sequence of 1) to the position of the second bit sequence and the process of moving the Nth bit sequence to the position of the first bit sequence are performed in the first Issues a swap instruction for
第 1のビッ トを第 Mのビヅ 卜の位置に移動する処理と、 第 2のビットを第 (M 一 1 ) のビッ トの位置に移動する処理と、 第 (M— 1 ) のビヅ ト を第 2のビッ 卜の位置に移動する処理と、 第 Mのビッ トを第 1のビッ 卜の位置に 移動する処理とを、 前記スヮヅプ命令の処理が施された第 1のデ一夕の第 1〜第 Nのビッ ト列の各々に対して施す Mビッ トミラー命令を発行し、  A process of moving the first bit to the position of the Mth bit, a process of moving the second bit to the position of the (M-1) th bit, and a process of moving the first bit to the (M-1) th bit. The process of moving the bit to the position of the second bit and the process of moving the Mth bit to the position of the first bit are the first data to which the processing of the step instruction has been performed. Issue an M-bit mirror instruction for each of the 1st to Nth bit strings in the evening,
前記演算回路が、  The arithmetic circuit includes:
前記 Mビッ トミラー命令、 前記スワップ命令が発行された場合に、 該命令に対 応するビッ ト移動処理、 ビッ ト列移動処理を行うことを特徴とするマイクロコン ビュー夕。  A micro-computer, wherein when the M-bit mirror instruction and the swap instruction are issued, a bit moving process and a bit string moving process corresponding to the instruction are performed.
( 5 ) 請求項 3において、  (5) In claim 3,
前記演算回路が、  The arithmetic circuit includes:
第 1のデ一夕及び前記スヮップ命令の処理が施された第 1のデ一夕のいずれか を受け、 前記 Mビッ トミラー命令に対応するビッ ト移動処理を行う Mビッ トミラ —回路と、  An M-bit mirror circuit that receives one of the first data and the first data processed by the step instruction and performs a bit moving process corresponding to the M-bit mirror instruction;
第 1のデ一夕及び前記 Mビッ トミラ一命令の処理が施された第 1のデ一夕のい ずれかを受け、 前記スワップ命令に対応するビッ ト列移動処理を行うスワップ回 路と、  A swap circuit that receives one of the first data and the first data that has been processed by the M-bit mirror instruction, and performs a bit string movement process corresponding to the swap instruction;
前記 Mビッ 卜ミラー命令が発行された場合には前記 Mビッ トミラ一回路の出力 を選択し、 前記スワップ命令が発行された場合には前記スワップ回路の出力を選 択するマルチプレクサとを含むことを特徴とするマイクロコンピュー夕。  A multiplexer for selecting an output of the M-bit mirror circuit when the M-bit mirror instruction is issued, and a multiplexer for selecting an output of the swap circuit when the swap instruction is issued. A special feature of a microcomputer.
( 6 ) 請求項 4において、  (6) In claim 4,
前記演算回路が、  The arithmetic circuit includes:
第 1のデ一夕及び前記スヮヅプ命令の処理が施された第 1のデータのいずれか を受け、 前記 Mビッ トミラー命令に対応するビッ ト移動処理を行う Mビッ トミラEither the first data or the first data processed by the step instruction Receiving an M-bit mirror instruction, and performing a bit moving process corresponding to the M-bit mirror instruction
—回路と、 —Circuit and
第 1のデータ及び前記 Mビッ トミラー命令の処理が施された第 1のデ一夕のい ずれかを受け、 前記スワップ命令に対応するビッ ト列移動処理を行うスワップ回 路と、  A swap circuit that receives a first data and one of the first data processed by the M-bit mirror instruction and performs a bit string movement process corresponding to the swap instruction;
前記 Mビッ トミラー命令が発行された場合には前記 Mビッ トミラー回路の出力 を選択し、 前記スワップ命令が発行された場合には前記スワップ回路の出力を選 択するマルチプレクサとを含むことを特徴とするマイクロコンピュー夕。  A multiplexer for selecting an output of the M-bit mirror circuit when the M-bit mirror instruction is issued, and a multiplexer for selecting an output of the swap circuit when the swap instruction is issued. Microcomputer evening to do.
( 7 ) 請求項 1において、  (7) In claim 1,
前記第 1〜第 Nのビッ ト列の各々が 8ビッ トで構成されていることを特徴とす るマイクロコンピュー夕。  A microcomputer according to claim 1, wherein each of said first to Nth bit strings is composed of 8 bits.
( 8 ) 請求項 2において、  (8) In claim 2,
前記第 1〜第 Nのビッ ト列の各々が 8ビッ 卜で構成されていることを特徴とす るマイクロコンビュ一夕。  A microcomputer, wherein each of the first to Nth bit strings is composed of 8 bits.
( 9 ) 請求項 3において、  (9) In claim 3,
前記第 1〜第 Nのビッ ト列の各々が 8ビッ 卜で構成されていることを特徴とす るマイクロコンピュ一夕。  A microcomputer according to claim 1, wherein each of said first to Nth bit strings is composed of 8 bits.
( 1 0 ) 請求項 4において、  (10) In claim 4,
前記第 1〜第 Nのビッ ト列の各々が 8ビッ トで構成されていることを特徴とす るマイクロコンピュー夕。  A microcomputer according to claim 1, wherein each of said first to Nth bit strings is composed of 8 bits.
( 1 1 ) 請求項 1乃至 1 0のいずれかのマイクロコンピュー夕と、  (11) The microcomputer according to any one of claims 1 to 10,
前記マイクロコンビュー夕の処理対象となるデ一夕の入力源と、  An input source for data processing to be processed in the micro-viewing process;
前記マイクロコンピュー夕により処理されたデータを出力するための出力装置 とを含むことを特徴とする電子機器。  An output device for outputting data processed by the microcomputer.
( 1 2 ) 各々が Mビッ 卜で構成される第 1〜第 Nのビッ ト列を有する第 1のデ 一夕をオペランドとする命令を発行し、 該命令に対応した処理を該第 1のデ一夕 に対して施す情報処理方法であって、  (12) An instruction having an operand of a first data having first to Nth bit strings each composed of M bits is issued, and a process corresponding to the instruction is executed by the first data processor. Information processing method to be applied to
第 1のビッ トを第 Mのビッ トの位置に移動する処理と、 第 2のビッ トを第 (M 一 1 ) のビッ 卜の位置に移動する処理と、 第 (M— 1 ) のビッ ト を第 2のビッ 卜の位置に移動する処理と、 第 Mのビッ トを第 1のビッ 卜の位置に 移動する処理とを、 第 1のデータの第 1〜第 Nのビッ ト列の各々に対して施す M ビヅ トミラー命令を発行するステップと、 The process of moving the first bit to the position of the Mth bit and the process of moving the second bit to the (M (1) a process of moving the bit position of 1), a process of moving the (M-1) th bit to the position of the second bit, and a process of moving the Mth bit to the position of the first bit. Issuing an M-bit mirror instruction for performing each of the first to N-th bit strings of the first data;
第 1のビッ ト列を第 Nのビッ ト列の位置に移動する処理と、 第 2のビッ ト列を 第 (N— 1 ) のビヅ ト列の位置に移動する処理と、 第 (N— 1 ) のビッ ト列を第 2のビッ ト列の位置に移動する処理と、 第 Nのビッ ト列を第 1の ビッ 卜列の位置に移動する処理とを、 前記 Mビッ トミラー命令の処理が施された 第 1のデ一夕に対して施すスワップ命令を発行するステップとを含むことを特徴 とする情報処理方法。  A process of moving the first bit sequence to the position of the N-th bit sequence, a process of moving the second bit sequence to the position of the (N-1) -th bit sequence, — The process of moving the bit sequence of 1) to the position of the second bit sequence and the process of moving the Nth bit sequence to the position of the first bit sequence are performed by the M-bit mirror instruction. Issuing a swap instruction to be applied to the processed first data.
( 1 3 ) 各々が Mビッ トで構成される第 1〜第 Nのビッ ト列を有する第 1のデ —夕をオペランドとする命令を発行し、 該命令に対応した処理を該第 1のデ一夕 に対して施す情報処理方法であって、  (13) An instruction is issued with the first data as an operand having first to N-th bit strings each composed of M bits, and the processing corresponding to the instruction is executed by the first data processor. Information processing method to be applied to
第 1のビッ ト列を第 Nのビッ ト列の位置に移動する処理と、 第 2のビッ ト列を 第 (N— 1 ) のビヅ ト列の位置に移動する処理と、 第 (N— 1 ) のビッ ト列を第 2のビッ ト列の位置に移動する処理と、 第 Nのビッ ト列を第 1の ビッ ト列の位置に移動する処理とを、 第 1のデータに対して施すスワップ命令を 発行するステップと、  A process of moving the first bit sequence to the position of the N-th bit sequence, a process of moving the second bit sequence to the position of the (N-1) -th bit sequence, — The process of moving the bit sequence of 1) to the position of the second bit sequence and the process of moving the Nth bit sequence to the position of the first bit sequence are performed on the first data. Issuing a swap instruction to be performed
第 1のビッ トを第 Mのビッ 卜の位置に移動する処理と、 第 2のビッ トを第 (M 一 1 ) のビヅ 卜の位置に移動する処理と、 第 (M— 1 ) のビッ ト を第 2のビッ 卜の位置に移動する処理と、 第 Mのビッ トを第 1のビヅ 卜の位置に 移動する処理とを、 前記スワップ命令の処理が施された第 1のデータの第 1〜第 Nのビッ ト列の各々に対して施す Mビッ トミラー命令を発行するステップとを含 むことを特徴とする情報処理方法。  A process for moving the first bit to the position of the Mth bit, a process for moving the second bit to the position of the (M-1) th bit, and a process for moving the first bit to the (M-1) th bit. The process of moving the bit to the position of the second bit and the process of moving the Mth bit to the position of the first bit are the first data processed by the swap instruction. Issuing an M-bit mirror instruction to be applied to each of the first to N-th bit strings.
PCT/JP1998/001392 1997-04-03 1998-03-27 Microcomputer, electronic apparatus and information processing method WO1998044409A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP10104897 1997-04-03
JP9/101048 1997-04-03

Publications (1)

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

Family

ID=14290250

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP1998/001392 WO1998044409A1 (en) 1997-04-03 1998-03-27 Microcomputer, electronic apparatus and information processing method

Country Status (2)

Country Link
TW (1) TW421759B (en)
WO (1) WO1998044409A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9645820B2 (en) 2013-06-27 2017-05-09 Intel Corporation Apparatus and method to reserve and permute bits in a mask register

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6361041U (en) * 1986-10-06 1988-04-22
JPH02285426A (en) * 1989-03-30 1990-11-22 Intel Corp Microprocessor and format conversion method
JPH0337715A (en) * 1989-07-05 1991-02-19 Fujitsu Ltd Bit order inverting circuit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6361041U (en) * 1986-10-06 1988-04-22
JPH02285426A (en) * 1989-03-30 1990-11-22 Intel Corp Microprocessor and format conversion method
JPH0337715A (en) * 1989-07-05 1991-02-19 Fujitsu Ltd Bit order inverting circuit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9645820B2 (en) 2013-06-27 2017-05-09 Intel Corporation Apparatus and method to reserve and permute bits in a mask register
EP3014417A4 (en) * 2013-06-27 2017-06-21 Intel Corporation Apparatus and method to reverse and permute bits in a mask register
US10209988B2 (en) 2013-06-27 2019-02-19 Intel Corporation Apparatus and method to reverse and permute bits in a mask register
US10387149B2 (en) 2013-06-27 2019-08-20 Intel Corporation Apparatus and method to reverse and permute bits in a mask register
US10387148B2 (en) 2013-06-27 2019-08-20 Intel Corporation Apparatus and method to reverse and permute bits in a mask register

Also Published As

Publication number Publication date
TW421759B (en) 2001-02-11

Similar Documents

Publication Publication Date Title
US10831477B2 (en) In-lane vector shuffle instructions
Mazidi The 8051 Microcontroller And Embedded Systems Using Assembly And C, 2/E
KR100327777B1 (en) Data processing device using multiple instruction sets
JPH087083A (en) Three-input arithmetic and logic unit for formation of arithmetic and logic mixed combination
JPH07287567A (en) Arithmetical logical unit with plural independent segments and register that stores result from each fraction
TW201337738A (en) Instruction and logic to provide vector horizontal majority voting functionality
JPH086544A (en) Rotary register for orthogonal data conversion
JP3627725B2 (en) Information processing apparatus and electronic apparatus
KR940005202B1 (en) Bit order inverting device
CN1485741B (en) Information processing apparatus and electronic device
US6542989B2 (en) Single instruction having op code and stack control field
JP2559868B2 (en) Information processing device
WO1998044409A1 (en) Microcomputer, electronic apparatus and information processing method
JP2000322235A (en) Information processor
JPH09198231A (en) Arithmetic processor
US4723258A (en) Counter circuit
JP3332606B2 (en) Microprocessor
WO1998044408A1 (en) Microcomputer and electronic equipment
WO2001042903A1 (en) Data processing apparatus and data processing system
JP3043861B2 (en) Data processing device
JP2003084972A (en) Method for improving execution speed of conditional subtraction command, and enlarging range of operand to which command is correctly executed
Darche Microprocessor 3: Core Concepts-Hardware Aspects
JP2543589B2 (en) Data processing device
JPH06250818A (en) Arithmetic and logic unit
JP3474347B2 (en) Instruction decoding unit of microcomputer

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 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