KR100413651B1 - An information processing apparatus and its information processing method for realizing data transfer of multiple registers with short word length commands - Google Patents

An information processing apparatus and its information processing method for realizing data transfer of multiple registers with short word length commands Download PDF

Info

Publication number
KR100413651B1
KR100413651B1 KR1019960041278A KR19960041278A KR100413651B1 KR 100413651 B1 KR100413651 B1 KR 100413651B1 KR 1019960041278 A KR1019960041278 A KR 1019960041278A KR 19960041278 A KR19960041278 A KR 19960041278A KR 100413651 B1 KR100413651 B1 KR 100413651B1
Authority
KR
South Korea
Prior art keywords
register
registers
bit
field
operand
Prior art date
Application number
KR1019960041278A
Other languages
Korean (ko)
Other versions
KR970016973A (en
Inventor
노부오 히가키
노부키 도미나가
신야 미야지
슈이치 다카야마
Original Assignee
마츠시타 덴끼 산교 가부시키가이샤
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 마츠시타 덴끼 산교 가부시키가이샤 filed Critical 마츠시타 덴끼 산교 가부시키가이샤
Publication of KR970016973A publication Critical patent/KR970016973A/en
Application granted granted Critical
Publication of KR100413651B1 publication Critical patent/KR100413651B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • G06F9/30043LOAD or STORE instructions; Clear instruction
    • 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/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30138Extension of register space, e.g. register cache
    • 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/30145Instruction analysis, e.g. decoding, instruction word fields
    • G06F9/3016Decoding the operand specifier, e.g. specifier format

Abstract

본 발명의 정보처리장치는 복수 레지스터로 이루어지는 레지스터군, 프로그램 중의 기계어 명령을 순차적으로 해독하고 레지스터군 중 일부분의 레지스터를 각각 개별적으로 지정하는지의 여부를 나타내는 개별필드 및 레지스터군 중 다른 일부분의 레지스터를 일괄하여 지정하는지의 여부를 나타내는 일괄필드로 이루어지는 제 1 오퍼랜드, 메모리의 실효어드레스를 지정하는 제 2 오퍼랜드를 가지며, 제 1 오퍼랜드로 지정된 복수레지스터, 제 2 오퍼랜드로 지정된 메모리와의 사이에 데이터전송을 지시하는 기계어 명령을 검출하는 해독수단, 검출된 기계어명령의 제 1 오퍼랜드 중의 개별필드와 일괄필드에 대하여 각 비트가 유효한지를 판정하는 판정수단, 개별필드에서 유효로 판정된 비트에 대응하는 레지스터의 레지스터 번호를 생성하는 제 1 생성수단, 일괄필드에서 유효로 판정된 경우 상기 이외의 레지스터 일부분의 레지스터 번호를 차례로 생성하는 제 2 생성수단, 제 1 생성수단 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터, 제 2 오퍼랜드로 지정된 실효 어드레스로부터 연속하는 메모리 영역 사이에 데이터 전송을 실행하는 전송수단을 구비한다. 이 구성에 의하면, 복수 레지스터를 지정할 수 있는 기계어 명령에서, 적은 비트 수로 복수의 레지스터를 지정할 수 있고, 정보처리장치에 실장되어 있는 레지스터수가 많아져도 프로그램의 코드 사이즈의 증가를 억제할 수 있다.The information processing apparatus of the present invention includes a register group composed of a plurality of registers, a separate field indicating whether or not each machine word instruction in a program is sequentially read, and a register of a portion of the register group is individually designated. Data transfer is performed between a first operand comprising a batch field indicating whether or not to be designated collectively, a second operand specifying an effective address of a memory, and a plurality of registers designated by the first operand and a memory designated by the second operand. Decoding means for detecting an instructing machine language instruction, determining means for determining whether each bit is valid for individual fields and batch fields in the first operand of the detected machine language instruction, a register of a register corresponding to the bit determined to be valid in the individual field 1st number generation The second generating means, which sequentially generates register numbers of portions of the registers other than the above, when the validity is determined in the batch field, the register of the register number generated by the first generating means and the second generating means, and the second operand. And transfer means for performing data transfer between consecutive memory areas from the designated effective address. According to this configuration, in a machine language instruction capable of specifying a plurality of registers, a plurality of registers can be specified with a small number of bits, and an increase in the code size of the program can be suppressed even if the number of registers mounted in the information processing apparatus increases.

Description

복수 레지스터의 데이터 전송을 워드길이가 짧은 명령으로 실현하는 정보처리장치 및 그 정보처리방법Information processing apparatus and its information processing method for realizing data transfer of multiple registers with short word length instruction

본 발명은 복수의 레지스터와 메모리의 연속영역 사이에서 데이터를 전송하는 명령을 사용하는 정보처리장치 및 그 정보처리방법에 관한 것이다.The present invention relates to an information processing apparatus using an instruction for transferring data between a plurality of registers and a continuous area of a memory, and an information processing method thereof.

최근에는 마이크로컴퓨터 등의 정보처리장치의 처리능력이 비약적으로 향상하여 모든 분야에서 이용되고 있다.In recent years, the processing capacity of information processing apparatuses such as microcomputers has been greatly improved and used in all fields.

일반적으로 마이크로컴퓨터에서는, 서브루틴의 호출이나 태스크 전환 등을 할 때 범용 레지스터의 내용을 메모리상에 세이브(save)·복귀(restore)시키기 위한 전송명령(transfer instructions)이 이용되고 있다.In general, microcomputers use transfer instructions for saving and restoring the contents of general-purpose registers to a memory when calling a subroutine or switching a task.

종래의 마이크로컴퓨터에는, 전송명령 중에 하나의 명령으로 복수의 레지스터 데이터를 메모리와의 사이에서 전송하는 것이 있다(예를 들면, "MC68040 사용자 매뉴얼"에 개시된 「MOVEM 명령」, 일본 모토로라 주식회사에서 발간).Some conventional microcomputers transfer a plurality of register data to and from the memory by one of the transfer commands (for example, the "MOVEM command" disclosed in "MC68040 User Manual", published by Motorola, Japan). .

이 명령에서는, 복수의 레지스터를 지정하는 경우, 오퍼랜드(operand)에 있어서, 1 비트에 1 레지스터를 할당하고, 실장하고 있는 레지스터의 수와 같은 비트 수의 레지스터 지정필드를 필요로 하고 있었다.In this instruction, when a plurality of registers are designated, one register is allocated to one bit in an operand, and a register designation field having the same number of bits as the number of registers implemented is required.

제 1 도는 종래 프로세서의 복수의 레지스터를 전송하는 명령에 있어서, 복수의 레지스터를 지정하기 위한 오퍼랜드의 비트 할당을 나타내는 도면이다. 이 프로세서는 실장되어 있는 16 개의 레지스터(데이터 레지스터 8 개, 어드레스 레지스터 8 개)를 16 비트로 지정하고 있다.1 is a diagram showing bit allocation of an operand for designating a plurality of registers in an instruction for transferring a plurality of registers of a conventional processor. The processor specifies 16 registers (16 data registers and 8 address registers) in 16 bits.

그러나 상기 종래 기술에 의하면, 프로세서에 실장되어 있는 레지스터의 수가 많으면 많을수록 레지스터 지정필드가 길어지고, 코드 사이즈가 증가하는 문제점이 있었다.However, according to the conventional technology, the larger the number of registers mounted in the processor, the longer the register designation field and the larger the code size.

본 발명의 목적은 상기 문제점을 감안하여, 짧은 레지스터 지정필드로 복수의 레지스터를 지정할 수 있고, 레지스터의 수가 많을 경우에도 코드 사이즈의 증가를 억제할 수 있는 정보처리장치 및 그 정보처리방법을 제공하기 위한 것이다.SUMMARY OF THE INVENTION In view of the above problems, an object of the present invention is to provide an information processing apparatus and information processing method capable of designating a plurality of registers in a short register designation field and suppressing an increase in code size even when the number of registers is large. It is for.

상기 목적 달성을 위한 본 발명의 정보처리장치는 프로그램을 실행하는 정보처리장치에 있어서, 복수의 레지스터로 이루어지는 레지스터 군과,An information processing apparatus according to the present invention for achieving the above object comprises: a register group consisting of a plurality of registers;

프로그램 중의 기계어 명령을 순차적으로 해독하고 레지스터군 중 일부분의 레지스터를 각각 개별적으로 지정하는지의 여부를 나타내는 개별필드 및 레지스터 군 중 다른 일부분의 레지스터를 일괄하여 지정하는지의 여부를 나타내는 일괄필드로 이루어지는 제 1 오퍼랜드와 메모리의 실효 어드레스를 지정하는 제 2 오퍼랜드를 가지며, 제 1 오퍼랜드로 지정된 복수의 레지스터와 제 2 오퍼랜드로 지정된 메모리 사이의 데이터 전송을 지시하는 기계어 명령을 검출하는 해독수단과,A first field comprising a separate field indicating whether to sequentially read a machine language instruction in the program and individually designating a register of a portion of the register group and a batch field indicating whether to designate a register of another portion of the register group collectively; Decoding means for detecting a machine language instruction having an operand and a second operand specifying an effective address of the memory, the machine language instruction instructing data transfer between a plurality of registers designated by the first operand and a memory designated by the second operand;

검출된 기계어 명령의 제 1 오퍼랜드 중 개별필드와 일괄필드에 대하여 각 비트가 유효인지 무효인지를 판정하는 판정수단과,Determination means for determining whether each bit is valid or invalid for the individual field and the batch field in the first operand of the detected machine language instruction;

개별필드에 있어서 유효로 판정된 비트에 대응하는 레지스터의 레지스터번호를 생성하는 제 1 생성수단과,First generating means for generating a register number of a register corresponding to the bit determined to be valid in the individual field;

일괄필드에 있어서 유효로 판정된 경우, 상기 다른 일부분의 레지스터의 레지스터 번호를 차례로 생성하는 제 2 생성수단과,Second generating means for sequentially generating register numbers of the other partial registers when it is determined that the batch field is valid;

제 1 생성수단 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터와, 제 2 오퍼랜드로 지정된 실효 어드레스로부터 연속하는 메모리 영역 사이의 데이터 전송을 실행하는 전송수단을 포함하고 있다.And transfer means for performing data transfer between the register of the register number generated by the first generating means and the second generating means, and the memory area contiguous from the effective address designated by the second operand.

이 구성에 의하면, 복수의 레지스터의 지정이 가능한 기계어 명령에 있어서, 적은 비트 수로 복수의 레지스터를 지정할 수 있고, 정보처리장치에 실장되어있는 레지스터수가 많아도 프로그램의 코드 사이즈의 증가를 억제할 수 있는 효과가 있다.According to this configuration, in a machine language instruction capable of designating a plurality of registers, a plurality of registers can be specified with a small number of bits, and an increase in the code size of a program can be suppressed even if the number of registers mounted in the information processing apparatus is large. There is.

여기에서 상기 레지스터군은 m+n 개의 레지스터를 구비하고, 상기 개별필드는 m 개의 레지스터에 개별적으로 대응하는 m 비트로 이루어지며, 상기 일괄필드는 n 개의 레지스터를 일괄 지정하는 1 비트로 이루어지는 구성이어도 된다. 이 구성에 의하면, 본원의 제 1 발명의 효과에 더하여 1 비트의 필드로 복수의 레지스터를 지정할 수 있는 효과가 있다.The register group may include m + n registers, the individual field may be composed of m bits corresponding to m registers individually, and the batch field may be configured of one bit for collectively designating n registers. According to this configuration, in addition to the effect of the first invention of the present application, there is an effect that a plurality of registers can be designated in a field of 1 bit.

또, 상기 판정수단은,In addition, the determination means,

해독수단으로 검출된 기계어 명령의 개별필드의 내용과 일괄필드의 내용을 래치하고, 개별필드의 내용이 일괄필드의 내용보다도 상위측에 래치되는 래치수단과,Latch means for latching the contents of the individual field and the batch field of the machine language instruction detected by the decryption means, the contents of the individual field being latched above the contents of the batch field;

래치수단의 MSB측으로부터 맨 처음으로 유효한 비트를 검출하고, 이 비트 위치를 나타내는 위치신호를 제 1 및 제 2 생성수단으로 출력하는 비트 검출수단과,Bit detection means for detecting a first valid bit from the MSB side of the latch means and outputting a position signal indicating the bit position to the first and second generating means;

전송수단에 의하여, 1 레지스터 분의 데이터 전송이 이루어진 경우, 래치수단으로 레치된 비트 중, 비트 검출수단으로 검출된 비트를 리세트하는 비트 리세트 수단을 포함하고,A bit reset means for resetting the bits detected by the bit detection means among the bits latched by the latch means when the data transfer for one register is made by the transfer means,

상기 비트 검출수단은, 상기 리세트 후에 재차 상기 검출을 시도한다. 상기 제 1, 제 2 생성수단은 1 레지스터분의 데이터 전송 사이클에 하나의 레지스터 번호를 상기 위치신호에 따라 생성하는 구성이라도 된다.The bit detection means attempts the detection again after the reset. The first and second generating means may be configured to generate one register number in accordance with the position signal in one register data transfer cycle.

또 상기 제 1 생성수단은, 상기 위치신호가 개별필드 내의 비트위치를 나타내고 있는 경우에, 상기 m 개의 레지스터 중 당해 비트 위치에 대응하는 레지스터의 번호를 생성하는 구성이어도 된다.The first generating means may be configured to generate the number of the register corresponding to the bit position among the m registers when the position signal indicates the bit position in the individual field.

또 상기 제 2 생성수단은,In addition, the second generating means,

상기 위치신호가 래치수단 중 일괄필드의 비트위치를 나타내고 있는지의 여부를 판정하는 일괄필드 판정수단과, 일괄필드의 비트위치를 나타내고 있다고 판정된 경우에, 상기 n 개의 레지스터에 대하여 1 전송 사이클에 하나의 레지스터 번호를 차례로 생성하는 연속생성수단을 포함하는 구성이어도 된다.Batch field determination means for determining whether the position signal indicates the bit position of the batch field among the latch means, and when it is determined that the position signal indicates the bit position of the batch field, one in one transfer cycle for the n registers. It may be a configuration including a continuous generating means for sequentially generating a register number.

이 구성에 의하면, 우선, 개별 지정필드에 지정된 레지스터 데이터가 전송되고, 이어서 일괄 지정필드에 지정된 레지스터 데이터가 전송된다.According to this configuration, first, register data specified in the individual designated field is transferred, and then register data designated in the batch designated field is transferred.

또 상기 제 2 오퍼랜드는 스택 포인터가 지정되고, 상기 전송수단은 제 1 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터와, 상기 스택 포인터에의하여 지정되는 스택영역 사이의 데이터 전송을 행하도록 구성하여도 된다.The second operand is designated with a stack pointer, and the transfer means is configured to perform data transfer between a register of register numbers generated by the first and second generating means and a stack area designated by the stack pointer. You may also do it.

이 구성에 의하면, 복수의 레지스터와 스택 영역의 사이에 데이터 전송이 이루어지므로, 서브루틴이나 인터럽트 처리루틴에서의 데이터의 세이브 및 데이터의 복귀를 효율 좋게 행할 수 있다.According to this configuration, since data transfer is performed between the plurality of registers and the stack area, the data can be saved and the data can be efficiently returned in the subroutine or interrupt processing routine.

또 상기 레지스터군은 m+n개의 레지스터를 구비하고, 상기 개별필드는 m 개의 레지스터 각각에 대응하는 m 비트로 이루어지며, 상기 일괄필드는 적어도 2 비트로 이루어지고, 상기 제 2 생성수단은 일괄필드의 비트패턴에 따라 n 개의 레지스터 중 소정의 복수의 레지스터로 이루어지는 레지스터군에 대응하는 레지스터 번호를 순차적으로 생성하도록 구성하여도 된다.The register group includes m + n registers, the individual field is composed of m bits corresponding to each of the m registers, the batch field is composed of at least 2 bits, and the second generating means includes bits of the batch field. According to the pattern, a register number corresponding to a register group consisting of a plurality of predetermined registers among n registers may be sequentially generated.

이 구성에 의하면, 레지스터 그룹 단위로 일괄지정 할 수 있다.According to this configuration, it is possible to specify collectively in units of register groups.

또 상기 기계어 명령은 제 1 오퍼랜드로 지정된 복수의 레지스터 데이터와, 제 2 오퍼랜드로 지정된 실행 어드레스로부터 연속하는 메모리 영역의 데이터 사이에서의 연산을 추가로 지시하고, 상기 정보처리장치는 상기 기계어 명령으로 지시된 연산을 실행하는 연산수단을 포함하며, 상기 전송수단은 연산수단에 의한 연산 결과를 상기 복수의 레지스터 또는 상기 메모리 영역으로 전송하도록 구성하여도 된다.The machine language instruction further instructs an operation between a plurality of register data designated by the first operand and data of a memory area contiguous from the execution address designated by the second operand, and the information processing apparatus instructs the machine language instruction. And a calculating means for executing the calculated operation, wherein the transmitting means may be configured to transmit the calculation result by the calculating means to the plurality of registers or the memory area.

이 구성에 의하면, 예를 들면 메모리 중의 테이블 데이터에 대하여 일괄하여 데이터 갱신을 하는 등 유연한 프로그램 설계가 가능하게 된다.According to this configuration, for example, flexible program design is possible, such as updating data collectively for the table data in the memory.

상술한 목적 및 기타의 목적과 본 발명의 특징 및 이점은 첨부도면과 관련한 다음의 상세한 설명을 통해 보다 분명해 질 것이다.The above and other objects and features and advantages of the present invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings.

제 1 도는 종래의 프로세서의 복수의 레지스터를 전송하는 명령에 있어서, 복수의 레지스터를 지정하기 위한 오퍼랜드(operand)의 비트 할당을 나타낸 도면.1 is a diagram illustrating bit allocation of an operand for specifying a plurality of registers in an instruction for transferring a plurality of registers of a conventional processor.

제 2 도는 본 발명의 제 1 실시예에 따른 복수의 레지스터를 전송하는 명령 방법을 표시한 도면.2 is a diagram showing a command method for transferring a plurality of registers according to the first embodiment of the present invention.

제 3 도는 본 발명의 제 1 실시예에 따른 마이크로컴퓨터의 주요부의 구성을 나타내는 블록도.3 is a block diagram showing a configuration of main parts of a microcomputer according to the first embodiment of the present invention.

제 4 도는 본 발명의 제 1 실시예에 따른 레지스터 지정필드 해독기(105)의 내부 구성을 나타낸 블록도.4 is a block diagram showing an internal configuration of a register designation field decoder 105 according to the first embodiment of the present invention.

제 5 도는 본 발명의 제 1 실시예에 따른 래치(201)의 구체 회로도.5 is a detailed circuit diagram of a latch 201 according to the first embodiment of the present invention.

제 6A 도는 본 발명의 제 1 실시예에 따른 우선순위 엔코더(202)의 입출력 논리를 표시한 설명도.6A is an explanatory diagram showing the input / output logic of the priority encoder 202 according to the first embodiment of the present invention.

제 6B 도는 본 발명의 제 1 실시예에 따른 디코더(203)의 입출력 논리를 표시한 설명도.6B is an explanatory diagram showing input and output logic of the decoder 203 according to the first embodiment of the present invention.

제 6C 도는 본 발명의 제 1 실시예에 따른 레지스터 번호 변환회로(204)의 입출력 논리를 표시한 설명도.6C is an explanatory diagram showing input and output logic of the register number conversion circuit 204 according to the first embodiment of the present invention.

제 6D 도는 본 발명의 제 1 실시예에 따른 레지스터수 검출회로(214)의 입출력 논리를 표시한 설명도.6D is an explanatory diagram showing input and output logic of the register number detection circuit 214 according to the first embodiment of the present invention.

제 7A 도는 본 발명의 제 1 실시예에 따른 일괄지정 비트 검출회로(205)의 구체 회로도.7A is a detailed circuit diagram of a batch designation bit detection circuit 205 according to the first embodiment of the present invention.

제 7B 도는 본 발명의 제 1 실시예에 따른 일괄지정 비트 검출회로(205)의 입출력 논리를 나타낸 설명도.7B is an explanatory diagram showing the input / output logic of the batch designation bit detection circuit 205 according to the first embodiment of the present invention.

제 7C 도는 본 발명의 제 1 실시예에 따른 일괄처리 계속신호 생성회로(210)의 회로도.7C is a circuit diagram of a batch processing continuation signal generating circuit 210 according to the first embodiment of the present invention.

제 7D 도는 본 발명의 제 1 실시예에 따른 증분기(209)의 입출력 논리를 나타낸 설명도.7D is an explanatory diagram showing the input / output logic of the integrator 209 according to the first embodiment of the present invention.

제 8A, 8B 도는 본 발명의 제 1 실시예에 따른 명령 해독기(101)에 의한 MOVM 명령의 제어순서를 레지스터 트랜스퍼 레벨로 나타낸 설명도.8A and 8B are explanatory diagrams showing control order of MOVM instructions by the instruction decoder 101 according to the first embodiment of the present invention in register transfer levels.

제 9 도는 본 발명의 제 1 실시예에 따른 MOVM 명령에 의하여, 복수의 레지스터 데이터가 메모리에 격납되는 순서를 표시한 모식도.9 is a schematic diagram showing an order in which a plurality of register data is stored in a memory by a MOVM instruction according to the first embodiment of the present invention.

제 10 도는 본 발명의 제 1 실시예에 따른 MOVM 명령에 의하여, 메모리로부터 복수의 데이터가 레지스터에 격납되는 순서를 표시한 모식도.10 is a schematic diagram showing an order in which a plurality of data from a memory is stored in a register by a MOVM instruction according to the first embodiment of the present invention.

제 11 도는 본 발명의 제 1 실시예에 따른 MOVM 명령의 실행 타임챠트.11 is a execution time chart of a MOVM instruction according to the first embodiment of the present invention.

제 12 도는 본 발명의 제 1 실시예에 따른 콘텍스트 세이브(save) 프로그램의 일례를 나타낸 도면.12 shows an example of a context save program according to the first embodiment of the present invention.

제 13 도는 종래의 MOVM 명령과 본 발명의 실시예의 MOVM 명령을 대비한 설명도.13 is an explanatory diagram comparing a conventional MOVM command with a MOVM command of an embodiment of the present invention.

제 14 도는 본 발명의 제 2 실시예에 따른 복수의 레지스터를 전송하는 명령 방법을 표시한 도면.14 is a view showing a command method for transferring a plurality of registers according to a second embodiment of the present invention.

제 15 도는 제 2 실시예에 따른 레지스터 지정필드 해독기의 내부 구성을 나타낸 블록도.Fig. 15 is a block diagram showing an internal configuration of a register designation field decoder according to the second embodiment.

제 16 도는 제 2 실시예에 따른 레지스터 번호 변환회로(303)의 입출력 논리표를 표시한 설명도.16 is an explanatory diagram showing an input / output logic table of the register number conversion circuit 303 according to the second embodiment.

제 17A 및 17B 도는 서브루틴의 콜 명령, 서브루틴으로부터의 리턴명령을 본 발명에 적용한 경우의 명령 해독기에 의한 제어순서를 레지스터 전송레벨로 나타낸 설명도.17A and 17B are explanatory diagrams showing control order by the instruction decoder in the register transfer level when the call instruction of the subroutine and the return instruction from the subroutine are applied to the present invention.

< 도면의 주요 부분에 대한 부호의 설명 ><Description of Symbols for Main Parts of Drawings>

100: 명령 레지스터 101: 명령 해독기100: instruction register 101: instruction decoder

102: 레지스터 파일 103: 연산기군102: register file 103: operator group

104: 메모리 105: 레지스터 지정필드 해독기104: memory 105: register designation field decoder

201, 208, 213, 300: 래치 202: 우선순위 엔코더201, 208, 213, 300: Latch 202: Priority Encoder

203: 디코더 204, 303: 레지스터 번호 변환회로203: decoder 204, 303: register number conversion circuit

205: 일괄지정 비트 검출회로205: batch designation bit detection circuit

206, 301: 일괄지정 레지스터 번호 출력 시퀀서206, 301: Batch Register Number Output Sequencer

207, 212, 601, 603: AND 게이트207, 212, 601, 603: AND gate

209, 302: 증분기209, 302: incremental

210: 일괄처리 계속신호 생성회로 211: 레지스터 처리완료 검출회로210: batch processing continuation signal generation circuit 211: register processing completion detection circuit

214: 레지스터수 검출회로 215,216: 셀렉터214: register number detection circuit 215, 216: selector

602: RS 플립플롭 SP: 스택 포인터602: RS flip-flop SP: stack pointer

제 2 도는, 본 발명의 제 1 실시예에 따라 복수의 레지스터를 전송하는 명령 방법을 표시하는 도면이다. 제 2 도에 있어서 「MOVM regs, <ea>」는 복수 레지스터의 데이터를 메모리의 연속영역으로 블록전송을 지시하는 기계어 명령이고, 니모닉(mnemonic) 형식으로 표시하고 있다. 「MOVM <ea>, regs」는 메모리의 연속영역으로부터 복수의 레지스터로 블록전송을 지시하는 기계어 명령이다.2 is a diagram showing an instruction method for transferring a plurality of registers according to the first embodiment of the present invention. In FIG. 2, "MOVM regs, <ea>" is a machine language command for instructing block transfer to the continuous area of the memory, and is expressed in mnemonic format. "MOVM <ea>, regs" is a machine language instruction for instructing block transfer from a contiguous area of memory to a plurality of registers.

「MOVM」은 OP 코드이고, 전송방향을 판별하기 위한 「MOVM regs, <ea>」와 「MOVM <ea>, regs」에는 다른 코드가 할당되어 있다."MOVM" is an OP code, and different codes are assigned to "MOVM regs, <ea>" and "MOVM <ea>, regs" for determining the transmission direction.

「<ea>」는 메모리의 실효 어드레스를 지정하는 오퍼랜드이고, 지정된 어드레스의 선두로부터 연속한 메모리 영역에 대하여 전송된다. 본 실시예에서는 스택 포인터에 의한 간접 어드레싱에 의하여 실효 어드레스가 지정되는 것으로 한다."<Ea>" is an operand that specifies an effective address of the memory, and is transferred to a continuous memory area from the head of the designated address. In this embodiment, it is assumed that the effective address is specified by indirect addressing by the stack pointer.

「regs」는 전송대상의 레지스터를 지정하기 위한 오퍼랜드이고, 복수 레지스터를 지정하여 얻는 레지스터 지정필드를 나타낸다. 이 레지스터 지정필드는 제 2 도에 나타내는 바와 같이 8 비트 구성이고, 개별 지정필드와 일괄 지정필드를 갖는다. 개별 지정필드는 비트 7 내지 비트 2의 6 비트로 이루어지며, MSB(Most Significant Bit: 최상위비트)측으로부터 차례로 각 비트가 R10, R11, R12, R13, R14, R15에 대하여 '1'이 성립되어 있는 비트에 대응하는 레지스터와의 사이에 전송하는 것을 의미하고 있다. 일괄 지정필드는 비트 1(도면중 "기타"로 표기)로 이루어지고, 그 외의 레지스터(R0∼R9)를 일괄하여 지정한다. 이 비트가 "1"이 되었을 때 R0∼R9의 모든 레지스터 사이에 전송하는 것을 의미한다. 본 구성에서 범용레지스터는 16 개(R0∼R15)가 실장되어 있다."Regs" is an operand for specifying a register to be transferred, and indicates a register designation field obtained by designating multiple registers. This register designation field has an 8-bit structure as shown in FIG. 2, and has individual designation fields and collective designation fields. The individual designation field is composed of 6 bits of bits 7 to 2, and each bit is set to '1' for R10, R11, R12, R13, R14, and R15 in order from the MSB (most significant bit) side. This means transferring between registers corresponding to bits. The batch designation field consists of bit 1 (denoted "other" in the figure), and designates other registers R0 to R9 collectively. When this bit is set to "1", it means to transfer between all registers of R0 to R9. In this configuration, 16 general purpose registers (R0 to R15) are mounted.

상기의 개별 지정필드, 일괄 지정필드로 지정되는 레지스터는 컴파일러에 의하여 결정되는 파괴 레지스터, 비파괴 레지스터에 각각 대응하도록 나뉘어져 있는 것이 바람직하다. 여기에서 파괴 레지스터는 레지스터 데이터가 서브루틴에서 파괴되는, 즉 스택으로 세이브, 복귀되지 않고 사용되는 레지스터를 말한다. 비파괴 레지스터는 서브루틴에서 레지스터 데이터가 보존되는, 즉 스택으로 세이브, 복귀되어 사용되는 레지스터를 말한다.The registers designated by the individual designated fields and the collective designated fields are preferably divided so as to correspond to the destructive registers and the non-destructive registers determined by the compiler. Here, the destroy register is a register that is used without destroying the register data in the subroutine, that is, save and return to the stack. Non-destructive registers are registers in which the register data is stored in the subroutine, that is, saved and returned to the stack.

제 3 도는 본 실시예에 의한 마이크로 컴퓨터의 주요부의 구성을 나타내는 블록도이다.3 is a block diagram showing the configuration of main parts of the microcomputer according to the present embodiment.

본 마이크로컴퓨터의 주요부는 명령 레지스터(100), 명령 해독기(101), 레지스터 파일(102), 연산기군(103), 메모리(104), 레지스터 지정필드 해독기(105)를 포함한다.The main part of this microcomputer includes an instruction register 100, an instruction decoder 101, a register file 102, an operator group 103, a memory 104, and a register designation field decoder 105.

명령 레지스터(100)는 메모리(104)로부터 패치(fetch)된 명령을 순차적으로 유지한다.The instruction register 100 sequentially holds instructions fetched from the memory 104.

명령 해독기(101)는 명령 레지스터(100)에 유지된 명령을 해독하고, 그 명령 실행을 제어하는 각종 제어신호를 출력한다. 특히, 명령 해독기(101)가 제 2 도에 나타낸 MOVM 명령을 해독한 경우에는 레지스터 지정필드 해독기(105)에 의하여 순차적으로 출력되는 레지스터 번호의 레지스터와, <ea> 오퍼랜드로 지정되는 메모리(104)상의 연속 영역 사이의 데이터 전송을 제어한다.The command decoder 101 decodes the command held in the command register 100 and outputs various control signals for controlling the execution of the command. In particular, when the instruction decoder 101 decodes the MOVM instruction shown in FIG. 2, the register of the register number sequentially output by the register designation field decoder 105 and the memory 104 designated by the <ea> operand. Control data transfer between contiguous regions of the image.

레지스터 파일(102)은 32 비트 길이의 범용 레지스터(R0∼R15)와,메모리(104)내의 스택 영역의 선두를 지시하는 32 비트 길이의 스택 포인터(SP)로 이루어진다.The register file 102 is composed of 32-bit general registers R0 to R15 and a 32-bit stack pointer SP that indicates the head of the stack area in the memory 104.

연산기군(103)은 복수의 연산기를 포함하고, 명령 해독기(101)의 제어에 따라 명령으로 지정된 데이터 연산이나 명령의 오퍼랜드로 지정된 실효 어드레스를 산출한다. 연산기군(103) 중의 연산기의 하나(이하, 전용 연산기라 칭함)는 오퍼랜드 어드레스의 산출전용으로 설치되어 있다. 전용 연산기는, 제 2 도에 나타낸 MOVM 명령의 실행시에는 명령 해독기(101) 제어의 기본으로, 32 비트 데이터가 1회 전송될 때 마다 <ea> 오퍼랜드로 지정된 스택 포인터의 내용에 오프셋값(4의 배수)을 가산함으로써 연속영역의 메모리 어드레스를 순차적으로 산출한다.The operator group 103 includes a plurality of calculators, and calculates an effective address designated by the data operation designated by the instruction or the operand of the instruction under the control of the instruction decoder 101. One of the calculators (hereinafter, referred to as dedicated calculators) in the calculator group 103 is provided exclusively for calculating the operand address. The dedicated operator is based on the control of the instruction decoder 101 at the time of execution of the MOVM instruction shown in FIG. 2, and the offset value (4) is set in the contents of the stack pointer designated by the <ea> operand every time 32-bit data is transmitted. Memory addresses of the continuous area are sequentially calculated.

메모리(104)는 제 2 도에 나타낸 MOVM 명령을 포함하는 프로그램 또는 데이터를 기억하는 역할을 하는데, 기억영역의 일부에 스택영역을 갖는다.The memory 104 stores a program or data including the MOVM instruction shown in FIG. 2, and has a stack area in part of the storage area.

레지스터 지정필드 해독기(105)는 명령 해독기(101)에 의하여 제 2 도에 나타낸 MOVM 명령이 해독되었을 때 상기의 regs 오퍼랜드를 해독하여 지정된 레지스터의 레지스터 번호를 레지스터 파일(102)로 출력한다.The register designation field decoder 105 decodes the regs operand described above when the instruction decoder 101 decodes the MOVM instruction, and outputs the register number of the designated register to the register file 102.

제 4 도는 레지스터 지정필드 해독기(105)의 내부구성을 나타내는 블록도 이다. 이 레지스터 지정필드 해독기(105)는 래치(201), 우선순위 엔코더(priority encoder)(202), 디코더(203), 레지스터 번호 변환회로(204), 일괄지정 비트 검출회로(205), 일괄지정 레지스터 번호 출력 시퀀서(206), 레지스터 처리완료 검출회로(211), AND 게이트(212), 래치(213), 레지스터수 검출회로(214), 셀렉터(215, 216)로 구성된다. 또, 일괄지정 레지스터 번호 출력 시퀀서(206)는AND 게이트(207), 래치(208), 증분기(209), 일괄처리 계속신호 생성회로(210)로 구성된다.4 is a block diagram showing the internal structure of the register designation field decoder 105. As shown in FIG. The register designation field decoder 105 includes a latch 201, a priority encoder 202, a decoder 203, a register number conversion circuit 204, a batch designation bit detection circuit 205, and a batch designation register. The number output sequencer 206, the register processing completion detection circuit 211, the AND gate 212, the latch 213, the register number detection circuit 214, and the selector 215, 216 are comprised. The batch designation register number output sequencer 206 is composed of an AND gate 207, a latch 208, an incrementer 209, and a batch processing continuation signal generating circuit 210.

래치(201)는 명령 해독기(101)에 의하여 상기 MOVM 명령이 검출된 시점에서 MOVM 명령 중의 레지스터 지정필드를 래치한다. 래치된 개개의 비트 "1"은 데이터가 전송될 때마다 디코더(203)에 의하여 차례로 리세트된다. 제 5 도는 래치(201)의 구체적인 회로예를 나타낸 것으로서, 8 개의 1 비트 래치회로로 이루어진다. 각 래치회로는 개별적으로 리세트 단자를 가지고 있고, 우선순위 엔코더(202)에 의하여 "1"이 검출된 경우에는 디코더(203)에 의하여 리세트된다.The latch 201 latches a register designation field in the MOVM instruction at the time when the MOVM instruction is detected by the instruction decoder 101. Each latched bit " 1 " is in turn reset by the decoder 203 every time data is transmitted. 5 shows a specific circuit example of the latch 201, and consists of eight one-bit latch circuits. Each latch circuit has a reset terminal individually, and is reset by the decoder 203 when " 1 " is detected by the priority encoder 202.

우선순위 엔코더(202)는 래치(201) 내의 레지스터 지정필드에 있어서 "1"로 되어 있는 비트를 데이터 전송 사이클마다 하나씩 검출하고, 검출한 비트위치를 나타내는 신호(이하, 비트위치라 칭함)를 출력한다. 제 6A 도에 우선순위 엔코더(202)의 입출력 논리를 표시한 설명도(진리값 표)를 나타낸다. 제 6A 도에서는 입력, 출력 모두 2진수로 표시하고 있다. 「입력」란에 있는 바와 같이, 우선순위 엔코더(202)는 데이터 전송 사이클마다 래치(201)의 MSB측에서 보아 최초로 "1"이 되어 있는 비트를 검출하고, 검출 결과를 「출력」란에 있는 바와 같이, 3비트로 표시한 비트위치를 출력한다. 그 후, 검출된 비트 "1"은 디코더(203)에 의하여 리세트되므로, 제 2 도에 나타낸 개별 지정필드(비트 7∼비트 2)에서의 "1"이 전송 사이클마다 차례로 검출되고, 또 일괄 지정필드(비트 1)에서의 "1"이 검출되게 된다. 또, 우선순위 엔코더(202)는 래치(201)의 맨처음 비트 "1"을 검출한 후 마지막 비트 "1"을 검출하고, 마칠 때까지의 사이에는 비트검출 계속신호를 유효 "1"로 하여 출력한다.The priority encoder 202 detects one bit in the register designation field in the latch 201 for each data transfer cycle, and outputs a signal (hereinafter referred to as a bit position) indicating the detected bit position. do. An explanatory diagram (truth value table) showing the input / output logic of the priority encoder 202 is shown in FIG. 6A. In Fig. 6A, both input and output are shown in binary. As shown in the "input" column, the priority encoder 202 detects the bit that is "1" for the first time as viewed from the MSB side of the latch 201 for each data transfer cycle, and the detection result is displayed in the "output" field. As described above, the bit position indicated by three bits is output. Thereafter, the detected bit "1" is reset by the decoder 203, so that "1" in the individual designated fields (bits 7 to 2) shown in FIG. 2 is sequentially detected every transmission cycle, and collectively. "1" in the designated field (bit 1) is detected. In addition, the priority encoder 202 detects the last bit "1" after detecting the first bit "1" of the latch 201 and sets the bit detection continuation signal to be valid "1" until it finishes. Output

디코더(203)는 우선순위 엔코더(202)에 의하여 검출된 비트위치를 입력하여 그 비트위치에 대응하는 래치(201)의 "1"을 "0"으로 리세트한다. 제 6B 도에 디코더(203)의 입출력 논리를 표시한 설명도(진리값 표)를 나타낸다. 제 6B 도에서는 입력, 출력 모두 2진수로 표시하고 있다. 예를들면, 「입력」이 우선순위 엔코더(202)로부터의 비트위치 "111" 인 경우, 「출력」의 비트 7 만이 "0"으로 되므로 래치(201)의 비트 7이 리세트된다. 이것은 우선순위 엔코더(202)에 있어서, 다음의 데이터 전송 사이클에서 래치(201)의 더 하위측에 있는 "1"을 검출시키는 것을 가능하게 하고 있다.The decoder 203 inputs the bit position detected by the priority encoder 202 and resets "1" of the latch 201 corresponding to the bit position to "0". Explanatory drawing (truth value table) which shows the input / output logic of the decoder 203 in FIG. 6B is shown. In FIG. 6B, both input and output are represented in binary. For example, when the "input" is the bit position "111" from the priority encoder 202, only bit 7 of the "output" becomes "0", so that bit 7 of the latch 201 is reset. This makes it possible for the priority encoder 202 to detect &quot; 1 &quot; further down the latch 201 in the next data transfer cycle.

레지스터 번호 변환회로(204)는 우선순위 엔코더(202)로부터의 비트위치를 입력하여 그것에 대응하는 레지스터의 레지스터 번호를 출력한다. 제 6C 도에 레지스터 번호 변환회로(204)의 입출력 논리를 표시한 설명도(진리값 표)를 나타낸다. 제 6C 도에서는, 입력, 출력 모두 2진수로 표시하고 있다. 본 실시예에서는, 레지스터 파일(102)의 레지스터(R0∼R15)에는 2진수로 0000∼1111의 레지스터 번호가 할당되어 있다. 예를들면, 「입력」이 "111"인 경우, 「출력」은 R10의 레지스터 번호 "1010"으로 된다. 또, 제 6C 도의 「입력」, 「출력」란에 나타내는 바와 같이, 레지스터 번호 변환회로(204)는 개별 지정필드의 각 비트를 표시하는 비트위치에 대해서만 레지스터 번호를 출력한다.The register number conversion circuit 204 inputs the bit position from the priority encoder 202 and outputs the register number of the register corresponding to it. Explanatory drawing (truth value table) which shows the input / output logic of the register number conversion circuit 204 in FIG. 6C is shown. In Fig. 6C, both input and output are represented in binary. In the present embodiment, register numbers 0000 to 1111 are assigned to registers R0 to R15 of the register file 102 in binary. For example, when the "input" is "111", the "output" becomes the register number "1010" of R10. In addition, as shown in the "input" and "output" columns of FIG. 6C, the register number conversion circuit 204 outputs the register number only for the bit positions representing each bit of the individual designated field.

일괄지정 비트 검출회로(205)는 우선순위 엔코더(202)로부터 비트위치 중 일괄지정 필드를 나타내는 비트위치를 검출하고, 검출된 것을 나타내는 일괄지정 비트 검출신호를 출력한다. 제 7A 도에 일괄지정 비트 검출회로(205)의 구체적인 회로예를, 제 7B 도에 그 입출력 논리를 나타낸다. 제 7A 도와 같이, 일괄지정 비트 검출회로(205)는 AND 게이트(601), RS 플립플롭(602), AND 게이트(603)로 구성된다. AND 게이트(601)는 비트위치가 "001", 즉 일괄지정 필드인 것을 검출한다. 제 7B 도에 나타내는 바와 같이, RS 플립플롭(602)은 AND 게이트(601)에 의하여 일괄지정 필드인 것이 검출된 시점에서 세트되고, AND 게이트(603)에 의하여 리세트된다. AND 게이트(603)는 증분기(209)의 카운트값 출력이 "1001"로 된 시점에서 RS 플립플롭(602)을 리세트한다. 따라서, 일괄지정 비트 검출신호는 우선순위 엔코더(202)에 의하여 일괄지정 필드의 "1"이 검출된 시점에서 유효 "1"이 되고, 그후 증분기(209)의 카운트값이 "1001"이 된 다음 사이클에서 무효 "0"이 된다.The batch designation bit detection circuit 205 detects a bit position indicating the batch designation field among the bit positions from the priority encoder 202, and outputs a batch designation bit detection signal indicating that it is detected. A specific circuit example of the collectively designated bit detection circuit 205 in FIG. 7A is shown in FIG. 7B and its input / output logic. As shown in FIG. 7A, the batch designation bit detection circuit 205 includes an AND gate 601, an RS flip-flop 602, and an AND gate 603. The AND gate 601 detects that the bit position is "001", that is, a batch designation field. As shown in FIG. 7B, the RS flip-flop 602 is set at the time when it is detected that the batch designation field is detected by the AND gate 601, and is reset by the AND gate 603. FIG. The AND gate 603 resets the RS flip-flop 602 when the count value output of the incrementer 209 becomes " 1001 ". Therefore, the batch designation bit detection signal becomes valid "1" at the time when "1" of the batch designation field is detected by the priority encoder 202, and then the count value of the incrementer 209 becomes "1001". It becomes invalid "0" in the next cycle.

일괄지정 레지스터 번호 출력 시퀀서(206)는, 일괄지정 비트 검출회로(205)로부터 일괄지정 비트 검출신호가 유효일 때, 레지스터(R0∼R9)의 레지스터 번호를 데이터 전송 사이클마다 하나씩 출력한다.The batch designation register number output sequencer 206 outputs one register number of the registers R0 to R9 for each data transfer cycle when the batch designation bit detection signal from the batch designation bit detection circuit 205 is valid.

AND 게이트(207)는 일괄지정 비트 검출신호가 유효일 때에 래치(208)로 래치 클록의 공급을 인에이블(enable) 한다.The AND gate 207 enables the supply of the latch clock to the latch 208 when the batch designation bit detection signal is valid.

래치(208)는 4비트 길이의 래치이고, 일괄지정 비트 검출신호가 유효일 때 증분기(209)의 출력을 데이터 전송 사이클마다 래치한다. 일괄지정 비트 검출신호는 증분기(209)의 카운트값이 "1001"이 된 시점에서 무효 "0"이 되므로, 래치(208)는 일괄지정 비트 검출신호가 무효 "0"인 동안은 "1001"을 유지하고 있다.The latch 208 is a 4-bit long latch and latches the output of the incrementer 209 every data transfer cycle when the batch designation bit detection signal is valid. Since the batch designation bit detection signal becomes invalid "0" when the count value of the incrementer 209 becomes "1001", the latch 208 is "1001" while the batch designation bit detection signal is invalid "0". Is keeping.

증분기(209)는 래치(208)의 출력에 1을 가산함으로써 레지스터 번호 "0000"∼"1001"을 순차적으로 출력한다. 제 7D 도에 증분기(209)의 입출력 논리를 나타낸다. 제 7D 도와 같이 「입력」이 "1001"일 때 「출력」은 "0000"이 되고, 「입력」이 "0000"∼"1001"일 때 「출력」은 1 이 가산된 값이 된다. 이로써 R0∼R9의 레지스터 번호가 데이터 전송 사이클과 합쳐져서 차례로 출력되게 된다.The incrementer 209 sequentially outputs register numbers "0000" to "1001" by adding 1 to the output of the latch 208. 7D shows input / output logic of the integrator 209. As shown in the 7D diagram, when the "input" is "1001", the "output" is "0000", and when the "input" is "0000" to "1001", the "output" is a value to which 1 is added. As a result, the register numbers R0 to R9 are combined with the data transfer cycles and output in order.

일괄처리 계속신호 생성회로(210)는 일괄지정 레지스터의 데이터 전송이 계속되고 있는 것을 나타내는 일괄처리 계속신호를 출력한다. 제 7C 도에 그 회로예를 나타낸다. 일괄처리 계속신호 생성회로(210)는 OR 게이트(604)이고, 증분기(209)로부터의 카운트값이 "0000" 이외일 때에 일괄처리 계속신호를 유효("1")로 하여 출력한다.The batch processing continuation signal generating circuit 210 outputs a batch processing continuation signal indicating that the data transfer of the batch designation register is being continued. The circuit example is shown in FIG. 7C. The batch processing continuation signal generating circuit 210 is an OR gate 604, and outputs the batch processing continuation signal as valid ("1") when the count value from the incrementer 209 is other than "0000".

레지스터 처리완료 검출회로(211)는 우선순위 엔코더(202)로부터의 비트검출 계속신호와 일괄처리 계속신호의 논리합을 취하여, 레지스터 처리 계속신호로서 출력한다. 이 레지스터 처리 계속신호는 레지스터 지정필드로 지정된 모든 레지스터 번호가 출력되는 동안 유효 "1"이 된다.The register processing completion detection circuit 211 takes a logical sum of the bit detection continuation signal from the priority encoder 202 and the batch processing continuation signal and outputs it as a register processing continuation signal. This register processing continue signal becomes valid "1" while all the register numbers specified in the register designation field are output.

AND 게이트(212)는 레지스터 처리 계속신호가 유효인 동안, 명령 레지스터로의 클록공급을 금지한다.The AND gate 212 prohibits clock supply to the command register while the register processing continuation signal is valid.

래치(213)는 명령 해독기(101)에 의하여 상기 MOVM 명령이 검출된 시점에서 MOVM 명령 중의 레지스터 지정필드를 래치한다.The latch 213 latches a register designation field in the MOVM instruction at the time when the MOVM instruction is detected by the instruction decoder 101.

레지스터수 검출회로(214)는 래치(213) 중의 레지스터 지정필드로 지정된 레지스터수 및 그 레지스터수의 데이터에 필요한 메모리 사이즈(전송 데이터 사이즈)를 검출한다. 제 6D 도에 레지스터수 검출회로(214)의 입출력 논리를 표시하는 도면을 나타낸다. 제 6D 도에 있어서 「입력」은 래치(213) 중의 레지스터 지정필드의 값이다. 「입력」란의 비트 7로부터 비트 2에 대해서는, 예를들면 「하나 "1"」의 표기는 100000, 010000, 001000, 000100, 000010, 000001의 6가지를 생략하여 "1"의 개수만큼을 나타내고 있다. 「출력 1」은 레지스터수를, 「출력 2」는 전송 데이터 사이즈를 표시한다. 본 실시예에서는, 각 레지스터가 4 바이트 길이이기 때문에, 전송 데이터 사이즈는 출력 1에서 나타내는 레지스터수의 4배이다.The register number detection circuit 214 detects the number of registers specified in the register designation field in the latch 213 and the memory size (transfer data size) required for the data of the register number. 6D shows an input / output logic of the register number detection circuit 214. FIG. In FIG. 6D, "input" is a value of the register designation field in the latch 213. FIG. For bit 2 to bit 2 of the "input" column, for example, the expression "one" or "1" indicates only the number of "1", omitting six of 100000, 010000, 001000, 000100, 000010, 000001. have. "Output 1" shows the number of registers and "Output 2" shows the transfer data size. In this embodiment, since each register is four bytes long, the transfer data size is four times the number of registers indicated at output 1.

셀렉터(215, 216)는 레지스터 번호 변환회로(204), 증분기(209), 명령 해독기(101)로부터 출력되는 레지스터 번호를 레지스터 파일로 출력한다.The selectors 215 and 216 output register numbers output from the register number conversion circuit 204, the incrementer 209, and the instruction decoder 101 to a register file.

제 8A 도와 제 8B 도는, 명령 해독기(101)에 의한 MOVM 명령의 제어순서를 레지스터 트랜스퍼 레벨로 나타낸 설명도이다.8A and 8B are explanatory diagrams showing the control procedure of the MOVM instruction by the instruction decoder 101 at the register transfer level.

제 8A 도에 있어서, MOVM[R10-R15, 기타], (SP)는 모든 레지스터로부터 메모리에 데이터를 세이브하는 경우를 나타내고 있다. 제 9 도에 이 명령에 의하여 메모리에 데이터가 격납되는 순서를 표시한 모식도를 나타낸다.In FIG. 8A, MOVMs [R10-R15, etc.], (SP) show a case where data is stored in memory from all registers. FIG. 9 is a schematic diagram showing the order in which data is stored in the memory by this command.

(a1)의 부분은 개별필드로 지정된 레지스터 데이터를 메모리로 전송하는 제어내용을 표시한다. 예를 들면 (R10 →(SP-4))에 대해서, 명령 해독기(101)는 레지스터 번호 10의 레지스터로부터 데이터를 판독하여 스택 포인터(SP)의 내용에서 4를 감산한 값을 어드레스로 하는 메모리에 기록함으로써 데이터를 전송한다. 이때의 레지스터 번호는 레지스터 번호 변환회로(204)에 의하여 생성되고, 레지스터 파일에 공급된다. 또, 이 때의 메모리 어드레스는 전용 연산기에 의하여 SP의 내용으로부터 4를 감산시킴으로써 얻어진다. 이 예에서는, 개별필드의 모든 레지스터가지정되어 있지만, 지정되어 있지 않은 레지스터는 레지스터번호 변환회로(204)에 의하여 레지스터 번호가 생성되지 않으므로 전송되지 않는다.Part (a1) shows the control contents for transferring register data designated as individual fields to the memory. For example, for (R10? (SP-4)), the instruction decoder 101 reads data from the register of register number 10 and subtracts 4 from the contents of the stack pointer SP to a memory whose address is the address. Data is transferred by recording. The register number at this time is generated by the register number conversion circuit 204 and supplied to the register file. The memory address at this time is obtained by subtracting 4 from the contents of the SP by the dedicated operator. In this example, all registers of the individual fields are specified, but registers not specified are not transferred because the register number is not generated by the register number conversion circuit 204.

(a2)의 부분은, 일괄필드로 지정된 레지스터 데이터를 메모리로 전송하는 제어내용을 표시한다. 명령 해독기(101)의 제어내용은 상기와 같다. 다만, 레지스터 번호는 증분기(209)에 의하여 생성되는 점이 상기와 다르게 되어 있다.The portion (a2) shows the control contents for transferring the register data designated in the batch field to the memory. The control contents of the command decoder 101 are as described above. However, the register number is different from the above in that it is generated by the incrementer 209.

또 명령 해독기(101)는 (a1), (a2)의 데이터 전송을 통하여, 스택 포인터(SP)의 내용으로부터 데이터 전송마다 4의 배수(4, 8, 12, …)를 차례로 전용 연산기로 감산시켜 메모리 어드레스를 생성시킨다.In addition, the instruction decoder 101 sequentially subtracts a multiple of four (4, 8, 12, ...) for each data transfer from the contents of the stack pointer SP by a dedicated operator through the data transfer of (a1) and (a2). Create a memory address.

(a3)의 부분은, 스택 포인터의 갱신을 의미한다. 명령 해독기(101)는 스택 포인터(SP)의 내용으로부터, 레지스터수 검출회로(214)에 의하여 생성된 전송데이터 사이즈(또는 전송 레지스터수 *4)를 전용 연산기로 감산시키고, 그 감산값을 스택 포인터(SP)에 격납한다.Part of (a3) means updating the stack pointer. The instruction decoder 101 subtracts the transfer data size (or transfer register number * 4) generated by the register number detection circuit 214 from the contents of the stack pointer SP with a dedicated operator, and subtracts the subtracted value from the stack pointer. It is stored in (SP).

제 8B 도에 있어서, MOVM (SP),[R10-R15, 기타]는 모든 레지스터에 메모리로부터 데이터를 복귀하는 경우를 나타내고 있다. 제 10 도에, 이 명령에 의하여, 메모리로부터 데이터가 레지스터(R0∼R15)에 복귀되는 순서를 표시한 모식도를 나타낸다. 이 명령에 대한 명령 해독기(101)의 제어는 스택 포인터의 갱신이 가장 먼저 행해지는 점과, 데이터의 전송방향(메모리로부터 레지스터)이 달라져 있을 뿐이다. 그 이외는 상기한 바와 같으므로 그에 대한 상세한 설명은 생략한다.In FIG. 8B, MOVM (SP), [R10-R15, etc.] shows a case where data is returned from memory to all registers. FIG. 10 shows a schematic diagram showing the order in which data is returned from the memory to the registers R0 to R15 by this instruction. In the control of the instruction decoder 101 for this instruction, only the point of updating the stack pointer is performed first and the data transfer direction (register from memory) is different. Other than that is as described above, detailed description thereof will be omitted.

제 11 도는 제 8A 도의 MOVM[R10-R15, 기타], (SP) 명령의 실행 타임챠트를 나타낸다. 도면 중의 a∼j는 제 4 도의 각 부분에 표시된 부호이고, 이하의 신호이다. "Ox"에 관한 수치는 16진수를 나타낸다.11 shows execution time charts of the MOVM [R10-R15, etc.], (SP) instructions of FIG. 8A. In the figure, a to j are symbols shown in respective parts of FIG. 4 and are the following signals. The numerical value for "Ox" represents a hexadecimal number.

a : 명령 레지스터의 내용a: contents of command register

b : 래치(201) 중의 레지스터 지정필드b: Register designation field in latch 201

c : 우선순위 엔코더(202)로부터 출력되는 비트위치c: bit position output from the priority encoder 202

d : 레지스터 번호 변환회로(204)로부터 출력되는 레지스터 번호d: register number output from register number conversion circuit 204

e : 우선순위 엔코더(202)로부터 출력되는 비트검출 계속신호e: bit detection continuation signal output from priority encoder 202

f : 일괄지정 비트 검출회로(205)로부터 출력되는 일괄지정 비트 검출신호f: batch designation bit detection signal output from batch designation bit detection circuit 205

g : 증분기(209)로부터 출력되는 레지스터 번호g: Register number outputted from the incrementer 209

h : 일괄처리 계속신호 생성회로(210)로부터 출력되는 일괄처리 계속신호h: batch processing continuation signal outputted from the batch processing continuation signal generating circuit 210

i : 레지스터 처리완료 검출회로(211)로부터 출력되는 레지스터 처리 계속신호i: Register processing continuation signal output from the register processing completion detection circuit 211

j : 셀렉터(216)로부터 출력되는 레지스터 번호j: Register number output from selector 216

제 11 도와 같이 MOVM 명령에서는, 레지스터 지정필드로 지정된 복수 레지스터의 데이터는 전송 사이클마다 차례로 전송된다. 또, 제 11 도에서는 모든 레지스터가 지정되어 있는 경우를 나타내고 있으나, R10∼R15에 대해서는 개별 지정필드에 "0"이 설정되어 있는 경우에는 그 전송 사이클이 발생하지 않는다. 또, 일괄 지정 필드가 "0"인 경우에는 R0∼R9의 전송 사이클이 발생하지 않는다.As in the eleventh figure, in the MOVM instruction, data of a plurality of registers specified in the register designation field is transferred in sequence every transfer cycle. 11 shows a case where all registers are designated, but the transfer cycle does not occur when " 0 " is set in the individual designation field for R10 to R15. When the batch designation field is "0", the transfer cycle of R0 to R9 does not occur.

이상과 같이 구성된 정보처리장치에 대하여, 복수의 데이터를 메모리로부터 레지스터로 전송하는 경우를 예로 하여, 그 동작을 설명한다.The operation of the information processing device configured as described above will be described taking the case of transferring a plurality of data from a memory to a register as an example.

통상, 서브루틴에서 범용 레지스터의 몇 개는 파괴 레지스터로서 이용되고,그 외는 비파괴 레지스터로서 이용된다. 예를 들면, 컴파일러에 의하여 R0∼R9가 파괴 레지스터로서 정의된 경우, 파괴 레지스터는 서브루틴에 있어서 스택으로의 세이브 및 스택으로부터의 복귀를 행할 필요가 없다. 따라서, 서브루틴 내에서 파괴 레지스터의 개수(10 개)보다 많은 레지스터를 사용하는 경우만 필요 개수의 비파괴 레지스터의 스택 세이브 및 복귀를 행하게 된다.Typically, some of the general purpose registers in subroutines are used as destructive registers, and others are used as nondestructive registers. For example, when R0 to R9 are defined as destruction registers by the compiler, the destruction registers do not need to save to the stack and return from the stack in the subroutine. Therefore, the stack save and return of the required number of non-destructive registers are performed only when more than 10 registers are used in the subroutine.

예를 들면, 루틴 내에서 파괴 레지스터 외에 2개의 레지스터(R10, R11)를 사용하는 경우에는 서브루틴의 선두에 다음 (1)의 명령을, 서브루틴의 말미에 다음 (2)의 명령을 배치하면 된다.For example, in the case of using two registers R10 and R11 in addition to the destroy register in the routine, the next (1) instruction is placed at the beginning of the subroutine and the next (2) instruction is placed at the end of the subroutine. do.

이로써, 본 마이크로컴퓨터는, 이 서브루틴 실행개시값 후에 비파괴 레지스터(R10, R11)만을 스택으로 세이브하고, 서브루틴 실행종료 직전에 R10과 R11만을 스택으로부터 복귀한다. (1)의 명령실행 동작은 제 11도에 나타낸 맨 처음의 2 사이클에서 종료한다.Thus, the microcomputer saves only the non-destructive registers R10 and R11 on the stack after the subroutine execution start value, and returns only R10 and R11 from the stack immediately before the subroutine execution ends. The instruction execution operation in (1) ends in the first two cycles shown in FIG.

다음으로, 태스크 전환에 수반하는 콘텍스트(context)의 세이브 및 복귀의 예를 설명한다.Next, an example of saving and returning context associated with task switching will be described.

제 12 도는, 상기 콘텍스트 세이브 프로그램의 일례를 나타낸다.12 shows an example of the context save program.

제 12 도에 있어서 (11.1)은 스택 포인터(SP)의 값을 미리 정해진 콘텍스트 세이브영역의 스택 포인터 세이브영역으로 세이브하는 명령이다. 여기에서는, 스In Fig. 12, (11.1) is a command to save the value of the stack pointer SP into the stack pointer save area of the predetermined context save area. Here,

택 포인터의 세이브영역을 편의상 OxFFFFFEBC로 하여 둔다. (11.2)는 콘텍스트 세이브영역으로서 미리 정해져 있는 고정 어드레스를 스택 포인터(SP)에 세트하는 명령이다. 여기에서는, 고정 어드레스로서 편의상 OxOOOO OOOO으로하여 둔다. (11.3)은 모든 레지스터의 내용을 콘텍스트 세이브영역으로 세이브하는 MOVM 명령이다. (11.4)는 태스크 전환에 의하여 새롭게 실행되는 태스크용 스택 포인터값이 세이브되어 있던 영역으로부터 스택 포인터(SP)로 로드하는 명령이다. 여기에서는 새롭게 실행되는 태스크용 스택 포인터 세이브영역으로 되어 있던 영역을 편의상 OxFFFFFEBC로 하여 둔다.The save area of the tack pointer is set to OxFFFFFEBC for convenience. (11.2) is an instruction to set a fixed address predetermined as a context save area to the stack pointer SP. In this example, OxOOOO OOOO is used as a fixed address for convenience. (11.3) is a MOVM instruction that saves the contents of all registers into the context save area. (11.4) is an instruction to load the stack pointer SP from the area where the task stack pointer value newly executed by the task switching is saved. In this case, the area that is the stack pointer save area for a newly executed task is referred to as OxFFFFFEBC for convenience.

이 프로그램의 실행에 의하여 모든 레지스터(R0∼R15)의 내용이 콘덱스트 세이브영역으로 전송된다. (11.3)의 MOVM 명령에 의한 전송동작은 제 11 도에 나타낸 타임챠트와 같고, 16 사이클로 실행된다.By the execution of this program, the contents of all registers R0 to R15 are transferred to the context save area. The transfer operation by the MOVM instruction in (11.3) is the same as the time chart shown in FIG. 11, and is executed in 16 cycles.

이상과 같이 본 실시예에 의하면, 레지스터를 파괴 레지스터, 비파괴 레지스터로 그룹화하고, 파괴 레지스터를 1 비트로 지정하는 일괄 지정필드에 할당함으로써 적은 비트수로 많은 레지스터를 지정하는 것이 가능하게 되며, 레지스터수가 많은 경우에도 코드 사이즈가 증가하지 않도록 할 수 있다. 제 13 도에 종래의 MOVM 명령과 본 실시예의 MOVM 명령을 대비하여 나타낸다. 제 13 도에 있어서 (1), (2), (11.3)은 이미 설명한 본 실시예의 MOVM 명령의 명령 비트 패턴과 그 명령 니모닉을 나타낸다. (1'), (2'), (11.3')는 종래의 MOVM 명령의 명령 비트패턴과 그 명령 니모닉을 나타낸다. (1), (2)의 명령에서는 제 3 바이트의 "OxCO"가 2 개의 레지스터(R10, R11)를 지정하고 있는 것에 대하여, (1'), (2')의 명령에서는 제 3, 제 4 바이트의 "0x0030"이 레지스터(R10, R11)를 지정하고 있다. 또, (11.3)의 명령에서는, 제 3 바이트의 "OxFE"가 모든 레지스터(R0∼R15)를 지정하고 있는 것에 대하여, (11.3')의 명령에서는 제 3, 제 4 바이트의 "OxFFFF"가 모든 레지스터(R0∼R15)를 지정하고 있다. 이와 같이 본실시예에서는, 종래에 비하여 MOVM 명령 하나로 1 바이트의 코드사이즈 단축이 도모되고 있다. 프로그램이 많은 것은 다수의 서브루틴으로 세분화되어 작성되는 것이 통상이고, 또 MOVM 명령은 서브루틴에서의 레지스터 세이브· 복귀에 이용하기 때문에 빈번하게 사용된다. 따라서, 프로그램 전체의 코드사이즈의 단축을 실현할 수 있다.As described above, according to the present embodiment, it is possible to designate a large number of registers with a small number of bits by grouping registers into destructive registers and non-destructive registers, and assigning them to a batch designation field that designates a destroyed register as 1 bit. Even if the code size does not increase. FIG. 13 shows a comparison of the conventional MOVM command and the MOVM command of this embodiment. In Fig. 13, (1), (2), and (11.3) show the command bit pattern of the MOVM instruction of this embodiment and the instruction mnemonic which have already been described. (1 '), (2'), and (11.3 ') indicate the command bit pattern of the conventional MOVM instruction and its instruction mnemonic. In the instructions (1) and (2), the third byte "OxCO" specifies two registers R10 and R11, whereas in the instructions (1 ') and (2'), the third and fourth instructions are used. "0x0030" of the byte designates the registers R10 and R11. In the instruction of (11.3), the "OxFE" of the third byte designates all registers R0 to R15. In the instruction of (11.3 '), the "OxFFFF" of the third and fourth bytes is all Registers R0 to R15 are specified. As described above, in the present embodiment, the code size of 1 byte is reduced by one MOVM instruction. It is common to have many programs subdivided into many subroutines, and MOVM instructions are frequently used because they are used for register save and return in subroutines. Therefore, the code size of the whole program can be shortened.

또, 본 실시예에서는 레지스터의 그룹화를 컴파일러가 정의하는 파괴 레지스터, 비파괴 레지스터로 하였으나, 그 외의 조건으로 그룹화를 하여도 된다.In this embodiment, the grouping of registers is a destructive register or a non-destructive register defined by the compiler, but the grouping may be performed under other conditions.

또 본 실시예는 복수 레지스터 대상의 로드/스토어 이었으나, 복수의 레지스터를 사용하는 연산명령으로 하여도 된다.In the present embodiment, a load / store for a plurality of registers is used. However, the operation instruction may use a plurality of registers.

제 14 도는 본 발명의 제 2 실시예에 의한 복수의 레지스터를 전송하는 명령 방법을 나타내는 도면이다. 제 1 실시예에서 도시된 제 2 도의 MOVM 명령에 대하여, 일괄지정 비트가 2 비트로 되어 있는 점만이 다르게 되어 있다. 이하 동일한 부분에 관한 설명은 생략하고 상이한 부분에 대해서만 설명하기로 한다. 제 14 도에 있어서, 레지스터 지정필드의 비트 1, 비트 0은 "00"일 때 R0∼R9 중 어느 하나의 레지스터도 지정하지 않는 것을, "01"일 때 R0∼R4를 지정하는 것을, "10"일 때 R5∼R9를 지정하는 것을, "11"일 때 R0∼R2, R5, R6을 지정하는 것을 의미한다. 여기에서, R0∼R4를 그룹 1, R5∼R9를 그룹 2, R0∼R2, R5, R6을 그룹 3으로 한다. 본 실시예의 MOVM 명령에서 일괄지정 필드는 R0∼R9의 레지스터의 그룹 1, 2, 3 중 어느 하나를 지정할 수 있다.14 is a diagram showing a command method for transferring a plurality of registers according to a second embodiment of the present invention. For the MOVM instruction of FIG. 2 shown in the first embodiment, only the batch designation bit is 2 bits is different. Hereinafter, description of the same parts will be omitted and only different parts will be described. In Fig. 14, bit 1 and bit 0 of the register designation field indicate that none of R0 to R9 is designated when "00", and that R0 to R4 when "01" is specified. When R5 to R9 is specified, R0 to R2, R5 and R6 are designated as "11". Here, R0 to R4 are group 1, and R5 to R9 are group 2, and R0 to R2, R5 and R6 are group 3. In the MOVM instruction of this embodiment, the batch designation field may designate any one of groups 1, 2, and 3 of the registers R0 to R9.

본 실시예에 의한 마이크로컴퓨터의 주요부의 구성은 제 3 도에 나타낸 개략 블록도와 거의 같으므로 생략한다. 다만, 레지스터 지정필드 해독기(105)의 내부 구성 중 일부분이 상기 2 비트의 레지스터 지정필드를 해독하기 때문에 다르다.The configuration of the main part of the microcomputer according to the present embodiment is almost the same as the schematic block diagram shown in FIG. However, a part of the internal configuration of the register designation field decoder 105 is different because it decodes the register designation field of the two bits.

제 15 도는 레지스터 지정필드 해독기(105)의 내부구성을 나타내는 블록도이다. 래치(300)가 추가되어 있는 점과, 일괄지정 레지스터 번호 출력 시퀀서(206) 대신에 일괄지정 레지스터 번호 출력 시퀀서(301)가 설치되어 있는 점이 다르다.15 is a block diagram showing the internal structure of the register designation field decoder 105. As shown in FIG. The latch 300 is added, and the batch designation register number output sequencer 301 is provided in place of the batch designation register number output sequencer 206.

래치(300)는 명령 해독기(101)에 의하여 상기 MOWM 명령이 검출된 시점에서 MOVM 명령 중 일괄지정 필드의 2 비트를 래치하고, 그 값을 일괄지정 레지스터 번호 출력 시퀀서(301)로 출력한다.The latch 300 latches two bits of the batch designation field of the MOVM instructions at the time when the MOWM instruction is detected by the instruction decoder 101 and outputs the value to the batch designation register number output sequencer 301.

일괄지정 레지스터 번호 출력 시퀀서(301)는 래치(300)로부터 입력되는 일괄 지정필드의 값이 그룹 1을 지정하고 있는 경우에는 R0∼R4의 레지스터 번호를, 그룹 2를 지정하고 있는 경우에는 R5∼R9의 레지스터 번호를, 그룹 3을 지정하고 있는 경우에는 R0∼R2, R5, R6의 레지스터 번호를 차례로 생성한다.The batch designation register number output sequencer 301 uses the register numbers of R0 to R4 when the value of the batch designation field input from the latch 300 designates group 1, and R5 to R9 when the group 2 is designated. If group 3 is specified, register numbers R0 to R2, R5 and R6 are generated sequentially.

제 16 도는 일괄지정 레지스터 번호 출력 시퀀서(301)의 내부구성을 나타내는 블록도이다. 제 16 도에 있어서 제 4 도와 동일한 구성요소에는 동일한 번호를 부여하고, 그에 대한 자세한 설명은 생략한다.16 is a block diagram showing the internal structure of the batch designation register number output sequencer 301. As shown in FIG. In FIG. 16, the same reference numerals are given to the same components as those in FIG. 4, and detailed description thereof will be omitted.

증분기(302)는 제 4 도의 증분기(209)에 대하여 0에서 4까지 카운트하는 점이 다르게 되어 있고, 제 16 도 중의 입출력 논리표가 나타내는 바와 같이 「입력」 "100"일 때 「출력」은 "000"이 된다.The incrementer 302 has a different count from 0 to 4 with respect to the incrementer 209 of FIG. 4, and as shown in the input / output logic table of FIG. "000".

레지스터 번호 변환회로(303)는 제 16 도 중의 입출력 논리표에 나타내는 바와 같이, 래치(300)로부터 출력되는 일괄지정 필드의 값이 나타내는 그룹번호에 따라서 일괄지정 레지스터 번호 출력 시퀀서(301)로부터 출력되는 카운트값을 그룹내의 레지스터 번호로 변환하여 차례로 출력한다.The register number conversion circuit 303 is output from the batch designation register number output sequencer 301 according to the group number indicated by the value of the batch designation field output from the latch 300, as shown in the input / output logic table in FIG. Count values are converted to register numbers in the group and output in order.

이상과 같이 본 실시예에서는 일괄지정이 가능한 레지스터가 그룹으로 나뉘어져 있으므로, 용도에 따라서 적절한 그룹을 지정함으로써 유연한 프로그램 설계가 가능하게 된다.As described above, in the present embodiment, registers that can be designated collectively are divided into groups, so that a flexible program design can be made by designating an appropriate group according to the use.

또 상기 제 1, 제 2 실시예에 있어서, MOW 명령을 예로 설명하였으나, 전송 명령에 한정되지 않고, 복수의 레지스터와 메모리의 연속영역 사이에서 연산을 실행하는 연산명령에 적용하여도 된다. 예를 들면, ADDM (SP), [R10-R15, 기타]와 같이 가산명령에 적용한 경우, 명령 해독기(101)가 연산기군(103)에 대하여 레지스터 데이터와 메모리 데이터를 가산하고나서 메모리로 전송하도록 제어하게 된다. 이로써, 예를 들면 메모리 중의 데이블 데이터에 대하여 일괄하여 데이터 갱신을 하는 등 유연한 프로그램 설계가 가능하게 된다.In the first and second embodiments, the MOW instruction has been described as an example. However, the MOW instruction is not limited to the transfer instruction, but may be applied to an operation instruction that performs an operation between a plurality of registers and a continuous area of a memory. For example, when applied to an add instruction such as ADDM (SP), [R10-R15, etc.], the instruction decoder 101 adds register data and memory data to the operator group 103 and then transfers them to the memory. Control. This enables flexible program design, for example, updating data collectively for the table data in the memory.

또 상기 이외의 명령에 본 발명을 적용한 경우를 제 17A 및 17B 도를 이용하여 설명한다. 제 17A 및 17B 도는 서브루틴의 콜 명령, 서브루틴으로부터의 리턴 명령을 본 발명에 적용한 경우의 명령 해독기(101)에 의한 제어순서를 레지스터 전송 레벨로 나타낸 설명도이다.In addition, the case where the present invention is applied to an instruction other than the above will be described with reference to FIGS. 17A and 17B. 17A and 17B are explanatory views showing the control procedure by the instruction decoder 101 in the case where the call instruction of the subroutine and the return instruction from the subroutine are applied to the present invention.

제 17A 도에 있어서, CALL(disp, PC), [R10-R15, 기타] 명령은 서브루틴을 호출하는 것과, 복수의 레지스터로부터 메모리 상부의 스택으로 데이터를 세이브하는 것을 지시하는 명령이다. 오퍼랜드(disp, PC)는 서브루틴의 개시 어드레스(프로그램 카운터(PC)의 값(이 명령자체의 명령 어드레스)에 변위를 가산하여 얻어진다)를 나타낸다. 또 하나의 오퍼랜드[R10-R15, 기타]는 서브루틴 콜을 할 때에 스택으로 세이브해야 할 레지스터 데이터를 나타내고, 이미 설명한 개별필드와 일괄필드로 이루어진다.In FIG. 17A, the CALL (disp, PC), [R10-R15, etc.] instructions are instructions for calling a subroutine and for saving data from a plurality of registers onto a stack above the memory. The operands disp and PC represent the start address of the subroutine (obtained by adding the displacement to the value of the program counter PC (the instruction address of this instruction itself)). Another operand [R10-R15, etc.] represents the register data to be saved on the stack when making a subroutine call, and consists of the individual fields and batch fields already described.

제 17A 도에 있어서, (a0) 부분의 레지스터 트랜스퍼는 프로그램 카운터(PC)의 값(서브루틴으로부터의 복귀 장소의 어드레스)의 스택 세이브를 표시한다.In Fig. 17A, the register transfer in the portion (a0) indicates the stack save of the value of the program counter PC (the address of the return destination from the subroutine).

(a1) 부분은 개별필드로 지정된 레지스터의 스택 세이브를 표시한다. 다만, 제 17A 도에서는 모든 레지스터가 지정되어 있는 경우을 도시하고 있으나, 지정되어 있지 않으면 이 레지스터 데이터는 세이브되지 않는다.Part (a1) shows the stack save of the register specified by the individual field. In FIG. 17A, all registers are designated. However, if not specified, this register data is not saved.

(a2) 부분은 일괄필드로 지정된 레지스터의 스택 세이브를 표시한다. 다만, 제 17A 도에서는 일괄필드가 지정되어 있는 경우를 도시하고 있으나, 지정되어 있지 않으면, R0-R9의 데이터는 세이브되지 않는다.Part (a2) shows the stack save of the register specified in the batch field. 17A shows a case where a batch field is designated, but if not specified, data of R0-R9 is not saved.

(a3) 부분은 스택 포인터의 갱신(스택 확보용)을 표시한다.Part (a3) indicates updating the stack pointer (for stack securing).

(a4) 부분은 프로그램 카운터의 갱신, 즉 서브루틴으로의 분기를 표시한다.The part (a4) indicates the update of the program counter, that is, the branch to the subroutine.

또 제 17B 도에 있어서, RET,[R10-R15, 기타]는 스택으로부터 복수 레지스터로의 데이터 복귀와 서브루틴으로부터의 복귀를 지시하는 명령이다. 오퍼랜드[R10-R15, 기타]는 이미 설명한 개별필드와 일괄필드로 이루어지고, 서브루틴 종료시에스택으로부터 복귀해야할 레지스터 데이터를 나타낸다. 상기의 CALL 명령과 짝지어 사용되므로 CALL 명령과 같은 레지스터가 지정되어야 한다.In Fig. 17B, RET, [R10-R15, etc.] are instructions for instructing data return from the stack to multiple registers and return from the subroutine. The operands [R10-R15, etc.] consist of the individual fields and the batch fields already described, and indicate register data to be returned from the stack at the end of the subroutine. Since it is used in conjunction with the above CALL instruction, the same register as the CALL instruction must be specified.

제 17B 도에 있어서 (b0) 부분은 스택 포인터의 갱신(스택 개방용)을 표시한다.In Fig. 17B, part (b0) indicates an update (for stack opening) of the stack pointer.

(b1) 부분은 프로그램 카운터(PC)의 갱신, 즉 서브루틴으로부터의 복귀를 표시한다.Part (b1) indicates the update of the program counter PC, i.e., the return from the subroutine.

(b2) 부분은 개별필드로 지정된 레지스터로의 스택 복귀를 표시한다. 다만, 제 17B 도에서도 모든 레지스터가 지정되어 있는 경우를 도시하고 있으나, 지정되어 있지 않으면 이 레지스터 데이터는 세이브되지 않는다.Part (b2) shows the stack return to the register designated by the individual field. 17B shows a case where all registers are designated, but if not specified, this register data is not saved.

(b3) 부분은 일괄필드로 지정된 레지스터의 스택 복귀를 표시한다. 다만, 제 17B 도에서는 일괄필드가 지정되어 있는 경우를 도시하고 있으나, 지정되어 있지 않으면 R0-R9의 데이터는 복귀되지 않는다.Part (b3) indicates the stack return of the register designated by the batch field. Although FIG. 17B shows a case where a batch field is designated, the data of R0-R9 is not returned if it is not specified.

본 발명의 바람직한 실시예들은 예시의 목적을 위해 개시된 것이며, 당업자라면 첨부된 특허청구 범위에 개시된 본 발명의 사상과 범위를 통해 각종 수정,변경, 대체 및 부가가 가능할 것이다.Preferred embodiments of the present invention are disclosed for purposes of illustration, and those skilled in the art may make various modifications, changes, substitutions, and additions through the spirit and scope of the present invention as set forth in the appended claims.

Claims (24)

프로그램을 실행하는 정보처리장치에 있어서,In an information processing apparatus for executing a program, 복수의 레지스터로 이루어지는 레지스터군과;A register group composed of a plurality of registers; 프로그램 중의 기계어 명령을 순차적으로 해독하여 소정의 기계어 명령을 검출하는 해독수단으로서, 상기 소정의 기계어 명령에 제 1 오퍼랜드와 제 2 오퍼랜드가 포함되며, 제 1 오퍼랜드로 지정된 복수의 레지스터와 제 2 오퍼랜드로 지정된 메모리 사이의 데이터 전송을 지시하고, 제 1 오퍼랜드가 레지스터를 중의 일부분의 레지스터를 각각 개별적으로 지정하는지의 여부를 나타내는 개별필드와, 레지스터군 중의 다른 일부분의 레지스터를 일괄하여 지정하는지의 여부를 나타내는 일괄필드로 이루어지며, 제 2 오퍼랜드가 메모리의 실효 어드레스를 지정하는 해독수단과;Decoding means for sequentially decoding a machine language instruction in a program to detect a predetermined machine language instruction, wherein the predetermined machine language instruction includes a first operand and a second operand, and includes a plurality of registers and a second operand designated as the first operand. Instructs data transfer between designated memories, and indicates whether the first operand individually specifies a register of a portion of the register individually, and whether to collectively specify a register of another portion of the register group. Decrypting means comprising a batch field, the second operand designating an effective address of the memory; 검출된 기계어 명령의 제 1 오퍼랜드 중의 개별필드와 일괄필드에 대하여 각 비트가 유효인지 무효인지를 판정하는 판정수단과;Judging means for judging whether each bit is valid or invalid for the individual field and the batch field in the first operand of the detected machine language instruction; 개별필드에서 유효로 판정된 비트에 대응하는 레지스터의 레지스터 번호를 생성하는 제 1 생성수단과;First generating means for generating a register number of a register corresponding to the bit determined to be valid in the respective field; 일괄필드에서 유효로 판정된 경우, 상기 다른 일부분의 레지스터의 레지스터 번호를 차례로 생성하는 제 2 생성수단과;Second generating means for sequentially generating register numbers of the other partial registers when it is determined to be valid in the batch field; 상기 제 1 생성수단 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터와 제 2 오퍼랜드로 지정된 실효 어드레스로부터 연속하는 메모리 영역과의사이의 데이터 전송을 실행하는 전송수단을 구비하는 것을 특징으로 하는 정보처리장치.And information transfer means for performing data transfer between a register of a register number generated by said first generation means and said second generation means and an effective address region designated by a second operand. Processing unit. 제 1 항에 있어서,The method of claim 1, 상기 레지스터군은 m+n 개의 레지스터를 구비하고, 상기 개별필드는 m 개의 레지스터에 개별적으로 대응하는 m 비트로 이루어지며, 상기 일괄필드는 n 개의 레지스터를 일괄지정하는 1 비트로 이루어지는 것을 특징으로 하는 정보처리장치.The register group includes m + n registers, the individual field is composed of m bits corresponding to m registers individually, and the batch field is composed of 1 bit which collectively designates n registers. Device. 제 2 항에 있어서,The method of claim 2, 상기 판정수단은,The determination means, 상기 해독수단으로 검출된 기계어 명령의 개별필드의 내용과 일괄필드의 내용을 래치하는 래치수단으로서, 개별필드의 내용을 일괄필드의 내용보다 상위측에 래치하는 래치수단과;A latching means for latching the contents of the individual field and the contents of the batch field of the machine language instruction detected by the decryption means, the latch means for latching the contents of the individual field above the contents of the batch field; 상기 래치수단의 최상위비트(MSB)측으로부터 맨처음으로 유효한 비트를 검출하여, 이 비트위치를 나타내는 위치신호를 상기 제 1 및 제 2 생성수단으로 출력하는 비트 검출수단과;Bit detection means for detecting the first valid bit from the most significant bit (MSB) side of the latch means and outputting a position signal indicating the bit position to the first and second generating means; 상기 전송수단에 의하여 1 레지스터분의 데이터 전송이 이루어졌을 때, 상기 래치수단으로 래치된 비트 중, 상기 비트 검출수단으로 검출된 비트를 리세트하는 비트 리세트수단을 구비하며,And a bit reset means for resetting bits detected by said bit detection means among bits latched by said latch means when data transfer for one register is made by said transfer means, 상기 비트 검출수단은 상기 리세트 후에 다시 상기 검출을 시도하고, 상기제 1, 제 2 생성수단은 1 레지스터분의 데이터 전송 사이클로 하나의 레지스터 번호를 상기 위치신호에 기초하여 생성하는 것을 특징으로 하는 정보처리장치.The bit detecting means attempts the detection again after the reset, and the first and second generating means generate one register number based on the position signal in a data transfer cycle of one register. Processing unit. 제 3 항에 있어서,The method of claim 3, wherein 상기 제 1 생성수단은 상기 위치신호가 개별필드 내의 비트위치를 나타내는 경우에, 상기 m 개의 레지스터 중 해당 비트위치에 대응하는 레지스터의 번호를 생성하는 것을 특징으로 하는 정보처리장치.And said first generating means generates a number of a register corresponding to a corresponding bit position among said m registers when said position signal indicates a bit position in an individual field. 제 4 항에 있어서,The method of claim 4, wherein 상기 제 2 생성수단은,The second generating means, 상기 위치신호가 래치수단 중 일괄필드의 비트위치를 나타내고 있는지의 여부를 판정하는 일괄필드 판정수단과;Batch field determining means for determining whether the position signal indicates a bit position of a batch field among the latch means; 상기 일괄필드의 비트위치를 나타내고 있다고 판정된 경우에, 상기 n 개의 레지스터에 대하여 1 전송 사이클로 하나의 레지스터 번호를 차례로 생성하는 연속 생성수단을 구비하는 것을 특징으로 하는 정보처리장치.And a continuous generating means for sequentially generating one register number in one transfer cycle for the n registers, when it is determined that the bit field of the batch field is indicated. 제 5 항에 있어서,The method of claim 5, wherein 상기 제 2 오퍼랜드는 스택 포인터가 지정되고,The second operand is assigned a stack pointer, 상기 전송수단은 상기 제 1 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터와 상기 스택 포인터에 의하여 지정되는 스택영역과의 사이에서 데이터 전송을 행하는 것을 특징으로 하는 정보처리장치.And said transfer means performs data transfer between a register of a register number generated by said first and second generating means and a stack region designated by said stack pointer. 제 1 항에 있어서,The method of claim 1, 상기 레지스터군은 m+n 개의 레지스터를 구비하고,The register group has m + n registers, 상기 개별필드는 m 개의 레지스터의 각각에 대응하는 m 비트로 이루어지며,The individual field consists of m bits corresponding to each of m registers. 상기 일괄필드는 적어도 2 비트로 이루어지고,The batch field consists of at least 2 bits, 상기 제 2 생성수단은, 일괄필드의 비트패턴에 따라 n 개의 레지스터 중의 소정의 복수 레지스터로 이루어지는 레지스터 그룹에 대응하는 레지스터 번호를 순차적으로 생성하는 것을 특징으로 하는 정보처리장치.And said second generating means sequentially generates a register number corresponding to a register group consisting of a plurality of predetermined registers of n registers according to a bit pattern of a batch field. 제 7 항에 있어서,The method of claim 7, wherein 상기 판정수단은,The determination means, 상기 해독수단으로 검출된 기계어 명령의 개별필드와 일괄필드를 래치하는 제 1 래치수단으로서, 개별필드가 일괄필드보다 상위측에 래치되도록 하는 제 1 래치수단과;A first latching means for latching the individual field and the batch field of the machine language instruction detected by said decrypting means, said first latch means for latching the individual field above the batch field; 상기 해독수단으로 검출된 기계어 명령의 일괄필드를 래치하는 제 2 래치수단과;Second latch means for latching a batch field of a machine language command detected by said decrypting means; 상기 래치수단의 MSB측으로부터 맨처음으로 유효한 비트를 검출하여, 당해 비트위치를 나타내는 위치신호를 상기 제 1 및 제 2 생성수단으로 출력하는 비트 검출수단과:Bit detection means for first detecting a valid bit from the MSB side of the latch means and outputting a position signal indicating the bit position to the first and second generating means; 상기 전송수단에 의하여 1 레지스터분의 데이터 전송이 이루어졌을 때, 상기 제 1 래치수단으로 래치된 비트 중, 상기 비트 검출수단으로 검출된 비트를 리세트하는 비트 리세트수단을 구비하고,And a bit reset means for resetting bits detected by said bit detection means among bits latched by said first latch means when data transfer for one register is made by said transfer means, 상기 비트 검출수단은 상기 리세트 후에 다시 상기 검출을 시도하며, 상기 제 1 생성수단은 1 레지스터분의 데이터 전송 사이클로 하나의 레지스터 번호를 상기 위치신호에 기초하여 생성하고, 상기 제 2 생성수단은 상기 위치신호 및 제 2 래치수단의 내용에 따라 1 레지스터분의 데이터 전송 사이클로 하나의 레지스터 번호를 생성하는 것을 특징으로 하는 정보처리장치.The bit detecting means tries the detection again after the reset, the first generating means generates one register number based on the position signal in a data transfer cycle of one register, and the second generating means And one register number in one data transfer cycle for one register in accordance with the position signal and the contents of the second latching means. 제 8 항에 있어서,The method of claim 8, 상기 제 1 생성수단은 상기 위치신호가 개별필드의 비트위치를 나타내고 있는 경우에, 상기 m 개의 레지스터 중 해당 비트위치에 대응하는 레지스터의 번호를 생성하는 것을 특징으로 하는 정보처리장치.And said first generating means generates a number of a register corresponding to the corresponding bit position among said m registers when said position signal indicates the bit position of an individual field. 제 9 항에 있어서,The method of claim 9, 상기 제 2 생성수단은,The second generating means, 상기 위치신호가 일괄필드 중 어느 하나의 비트위치를 나타내고 있는지의 여부를 판정하는 일괄필드 판정수단과;Batch field determination means for determining whether the position signal indicates any one of the bit positions in the batch field; 상기 일괄필드의 비트위치를 나타내고 있다고 판정된 경우에, 상기 제2 래치 수단의 비트패턴에 따라 상기 레지스터 그룹을 특정하고, 해당 레지스터 그룹 내의복수 레지스터에 대하여 1 전송 사이클로 하나의 레지스터 번호를 순차적으로 생성하는 연속생성수단을 구비하는 것을 특징으로 하는 정보처리장치.When it is determined that the bit field of the batch field is indicated, the register group is specified in accordance with the bit pattern of the second latching means, and one register number is sequentially generated in one transfer cycle for a plurality of registers in the register group. And a continuous generating means. 제 10 항에 있어서,The method of claim 10, 상기 제 2 오퍼랜드는 스택 포인터가 지정되고,The second operand is assigned a stack pointer, 상기 전송수단은 상기 제 1 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터와, 상기 스택 포인터에 의하여 지정되는 스택 영역과의 사이에서 데이터 전송을 행하는 것을 특징으로 하는 정보처리장치.And said transfer means performs data transfer between a register of a register number generated by said first and second generating means and a stack region designated by said stack pointer. 제 1 항에 있어서,The method of claim 1, 상기 기계어 명령은 제 1 오퍼랜드로 지정된 복수의 레지스터 데이터와 제 2 오퍼랜드로 지정된 실행 어드레스로부터 연속하는 메모리 영역의 데이터 사이의 연산을 추가로 지시하고,The machine language instruction further instructs an operation between a plurality of register data designated by a first operand and data in a contiguous memory area from an execution address designated by a second operand, 상기 정보처리장치는,The information processing device, 상기 기계어 명령으로 지시된 연산을 실행하는 연산수단을 추가로 구비하며, 상기 전송수단은 상기 연산수단에 의한 연산결과를 상기 복수의 레지스터 또는 상기 메모리 영역으로 전송하는 것을 특징으로 하는 정보처리장치.And an operation means for executing an operation indicated by the machine language command, wherein the transmission means transmits an operation result of the operation means to the plurality of registers or the memory area. 프로그램을 실행하는 정보처리장치에 있어서,In an information processing apparatus for executing a program, 서브루틴 중에서 데이터가 보존되는 것을 필요로 하는 비파괴 레지스터로서이용되는 m 개의 레지스터와, 서브루틴 중에서 데이터가 보존될 필요가 없는 파괴 레지스터로서 이용되는 n 개의 레지스터를 갖는 레지스터군과;A register group having m registers used as non-destructive registers that require data to be stored in the subroutine, and n registers used as destructive registers in the subroutine which do not need to be stored; 프로그램 중의 기계어 명령을 순차적으로 해독하여 소정의 기계어 명령을 검출하는 해독수단으로서, 상기 소정의 기계어 명령에 제 1 오퍼랜드와 제 2 오퍼랜드가 포함되며, 제 1 오퍼랜드로 지정된 복수의 레지스터와 제 2 오퍼랜드로 지정된 메모리 사이에서의 데이터 전송을 지시하고, 제 1 오퍼랜드가 상기 m 개의 레지스터를 각각 개별적으로 지정하는지의 여부를 나타내는 개별필드와 상기 n 개의 레지스터를 일괄하여 지정하는지의 여부를 나타내는 일괄필드로 이루어지며, 제 2 오퍼랜드가 스택 포인터에 의한 메모리의 실효 어드레스를 지정하는 해독수단과;Decoding means for sequentially decoding a machine language instruction in a program to detect a predetermined machine language instruction, wherein the predetermined machine language instruction includes a first operand and a second operand, and includes a plurality of registers and a second operand designated as the first operand. Instructs data transfer between designated memories, and consists of a separate field indicating whether the first operand individually specifies the m registers and a batch field indicating whether the n registers are collectively designated; Decoding means for the second operand to specify an effective address of the memory by the stack pointer; 검출된 기계어 명령의 제 1 오퍼랜드 중의 개별필드와 일괄필드에 대하여 각 비트가 유효인지 무효인지를 판정하는 판정수단과:Determination means for determining whether each bit is valid or invalid for the individual field and the batch field in the first operand of the detected machine language instruction: 개별필드에서 유효로 판정된 비트에 대응하는 레지스터의 레지스터 번호를 생성하는 제 1 생성수단과;First generating means for generating a register number of a register corresponding to the bit determined to be valid in the respective field; 일괄필드에서 유효로 판정된 경우, 상기 다른 일부분의 레지스터의 레지스터 번호를 차례로 생성하는 제 2 생성수단과;Second generating means for sequentially generating register numbers of the other partial registers when it is determined to be valid in the batch field; 상기 제 1 생성수단 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터와 제 2 오퍼랜드로 지정된 실효 어드레스로부터 연속하는 메모리 영역 사이에서의 데이터 전송을 실행하는 전송수단을 구비하는 것을 특징으로 하는 정보처리장치.And information transfer means for performing data transfer between a register having a register number generated by said first generation means and said second generation means and a memory area contiguous from an effective address designated by a second operand. Device. 제 13 항에 있어서,The method of claim 13, 상기 기계어 명령은 레지스터로부터 메모리로 데이터의 전송을 지시하는 제 1 전송명령과, 메모리로부터 레지스터로 데이터의 전송을 지시하는 제 2 전송명령을 포함하는 것을 특징으로 하는 정보처리장치.And the machine language instruction includes a first transfer instruction for instructing transfer of data from a register to a memory and a second transfer instruction for instructing transfer of data from a memory to a register. 제 14 항에 있어서,The method of claim 14, 상기 판정수단은,The determination means, 상기 해독수단으로 검출된 기계어 명령의 개별필드와 일괄필드를 래치하는 래치수단으로서 개별필드를 일괄필드보다 상위측에 래치하는 래치수단과:Latch means for latching an individual field and a batch field of the machine language instruction detected by the decryption means, the latch means for latching the individual field above the batch field; 상기 래치수단의 MSB측으로부터 맨처음으로 유효한 비트를 검출하여, 당해 비트위치를 나타내는 위치신호를 상기 제 1 및 제 2 생성수단으로 출력하는 비트 검출수단과;Bit detection means for detecting a first valid bit from the MSB side of the latch means and outputting a position signal indicating the bit position to the first and second generating means; 상기 전송수단에 의하여 1 레지스터분의 데이터 전송이 이루어졌을 때, 상기 래치수단으로 래치된 비트 중, 상기 비트 검출수단으로 검출된 비트를 리세트하는 비트 리세트수단을 구비하며,And a bit reset means for resetting bits detected by said bit detection means among bits latched by said latch means when data transfer for one register is made by said transfer means, 상기 비트 검출수단은 상기 리세트 후에 다시 상기 검출을 시도하고, 상기 제 1 및 제 2 생성수단은 1 레지스터분의 데이터 전송 사이클로 하나의 레지스터 번호를 상기 위치신호에 기초하여 생성하는 것을 특징으로 하는 정보처리장치.The bit detecting means tries the detection again after the reset, and the first and second generating means generate one register number based on the position signal in a data transfer cycle of one register. Processing unit. 제 15 항에 있어서,The method of claim 15, 상기 제 1 생성수단은 상기 위치신호가 개별필드의 비트위치를 나타내고 있는 경우에, 상기 m 개의 레지스터 중 해당 비트위치에 대응하는 레지스터의 번호를 생성하는 것을 특징으로 하는 정보처리장치.And said first generating means generates a number of a register corresponding to the corresponding bit position among said m registers when said position signal indicates the bit position of an individual field. 제 16 항에 있어서,The method of claim 16, 상기 제 2 생성수단은,The second generating means, 상기 위치신호가 래치수단 중 일괄필드의 비트위치를 나타내고 있는지의 여부를 판정하는 일괄필드 판정수단과;Batch field determining means for determining whether the position signal indicates a bit position of a batch field among the latch means; 상기 일괄필드의 비트위치를 나타내고 있다고 판정된 경우에, 상기 n 개의 레지스터에 대하여 1 전송 사이클로 하나의 레지스터 번호를 순차적으로 생성하는 연속생성수단을 구비하는 것을 특징으로 하는 정보처리장치.And a continuous generating means for sequentially generating one register number in one transfer cycle for the n registers when it is determined that the bit field of the batch field is indicated. 프로그램을 실행하는 정보처리장치에 있어서,In an information processing apparatus for executing a program, 복수 레지스터로 이루어지는 레지스터군과;A register group consisting of a plurality of registers; 프로그램 중의 기계어 명령을 순차 해독하여 소정의 기계어 명령을 검출하는 해독수단으로서, 상기 소정의 기계어 명령에 적어도 서브루틴 콜 명령과 서브루틴으로부터의 리턴 명령이 포함되고, 각 기계어 명령이 복수 레지스터를 지정하는 오퍼랜드를 포함하며, 이 오퍼랜드로 지정된 복수 레지스터와 메모리 상부의 스택 사이의 데이터 전송을 지시하고, 상기 오퍼랜드가 레지스터군 중 일부분의 레지스터를 각각 개별적으로 지정하는지의 여부를 나타내는 개별필드와 레지스터군 중 다른일부분의 레지스터를 일괄하여 지정하는지의 여부를 나타내는 일괄필드로 이루어지는 해독수단과;Decoding means for sequentially decoding machine language instructions in a program to detect predetermined machine language instructions, wherein the predetermined machine language instructions include at least a subroutine call instruction and a return instruction from the subroutine, each machine instruction specifying a plurality of registers. A separate field of register groups, including an operand, instructing data transfer between the multiple registers designated by this operand and the stack on top of the memory, and indicating whether the operand individually specifies each of a portion of a register group; Decrypting means comprising a batch field indicating whether a part of registers are collectively designated; 검출된 기계어 명령의 오퍼랜드 중 개별필드와 일괄필드에 대하여 각 비트가 유효인지 무효인지를 판정하는 판정수단과;Judging means for judging whether each bit is valid or invalid for the individual field and the batch field among the operands of the detected machine language instruction; 개별필드에서 유효로 판정된 비트에 대응하는 레지스터의 레지스터 번호를 생성하는 제 1 생성수단과;First generating means for generating a register number of a register corresponding to the bit determined to be valid in the respective field; 일괄필드에서 유효로 판정된 경우, 상기 다른 일부분의 레지스터의 레지스터 번호를 차례로 생성하는 제 2 생성수단과;Second generating means for sequentially generating register numbers of the other partial registers when it is determined to be valid in the batch field; 상기 제 1 생성수단 및 제 2 생성수단에 의하여 생성된 레지스터 번호의 레지스터와 메모리 상의 스택 사이에서의 데이터 전송을 실행하는 전송수단을 구비하는 것을 특징으로 하는 정보처리장치.And transfer means for performing data transfer between a register on a memory and a register of a register number generated by said first and second generating means. 제 18 항에 있어서,The method of claim 18, 상기 레지스터군은 m+n 개의 레지스터를 구비하고, 상기 개별필드는 m 개의 레지스터에 개별적으로 대응하는 m 비트로 이루어지며, 상기 일괄필드는 n 개의 레지스터를 일괄지정하는 1 비트로 이루어지는 것을 특징으로 하는 정보처리장치.The register group includes m + n registers, the individual field is composed of m bits corresponding to m registers individually, and the batch field is composed of 1 bit which collectively designates n registers. Device. 제 19 항에 있어서,The method of claim 19, 상기 판정수단은,The determination means, 상기 해독수단으로 검출된 기계어 명령의 개별필드의 내용과 일괄필드의 내용을 래치하는 래치수단으로서 개별필드의 내용이 일괄필드의 내용보다도 상위측에 래치되도록 하는 래치수단과;Latch means for latching the contents of the individual field of the machine language instruction and the contents of the batch field detected by the decryption means, so that the contents of the individual field are latched above the contents of the batch field; 상기 래치수단의 MSB측으로부터 맨처음으로 유효한 비트를 검출하여, 해당 비트위치를 나타내는 위치신호를 상기 제 1 및 제 2 생성수단으로 출력하는 비트 검출수단과;Bit detection means for detecting the first valid bit from the MSB side of the latch means and outputting a position signal indicating the bit position to the first and second generating means; 상기 전송수단에 의하여 1 레지스터분의 데이터 전송이 이루어졌을 때, 상기 래치수단으로 래치된 비트 중, 비트 검출수단으로 검출된 비트를 리세트하는 비트 리세트수단을 구비하며,And a bit reset means for resetting bits detected by the bit detection means among the bits latched by the latch means when data transfer for one register is made by the transfer means, 상기 비트 검출수단은 상기 리세트 후에 다시 상기 검출을 시도하고, 상기 제 1 및 제 2 생성수단은 1 레지스터분의 데이터 전송 사이클로 하나의 레지스터 번호를 상기 위치신호에 기초하여 생성하는 것을 특징으로 하는 정보처리장치.The bit detecting means tries the detection again after the reset, and the first and second generating means generate one register number based on the position signal in a data transfer cycle of one register. Processing unit. 제 20 항에 있어서,The method of claim 20, 상기 제 1 생성수단은 상기 위치신호가 개별필드 내의 비트위치를 나타내는 경우에, 상기 m 개의 레지스터 중 해당 비트위치에 대응하는 레지스터의 번호를 생성하는 것을 특징으로 하는 정보처리장치.And said first generating means generates a number of a register corresponding to a corresponding bit position among said m registers when said position signal indicates a bit position in an individual field. 제 21 항에 있어서,The method of claim 21, 상기 제 2 생성수단은,The second generating means, 상기 위치신호가 래치수단 중의 일괄필드의 비트위치를 나타내고 있는지의여부를 판정하는 일괄필드 판정수단과;Batch field determining means for determining whether the position signal indicates a bit position of a batch field in the latch means; 상기 일괄필드의 비트위치를 나타내고 있다고 판정된 경우에, 상기 n 개의 레지스터에 대하여 1 전송 사이클로 하나의 레지스터 번호를 차례로 생성하는 연속 생성수단을 구비하는 것을 특징으로 하는 정보처리장치.And a continuous generating means for sequentially generating one register number in one transfer cycle for the n registers, when it is determined that the bit field of the batch field is indicated. 레지스터군을 포함하는 정보처리장치에서, 제 1 오퍼랜드와 제 2 오퍼랜드를 갖는 소정의 기계어 명령을 실행하는 정보처리방법에 있어서,In an information processing apparatus including a register group, an information processing method for executing a predetermined machine language instruction having a first operand and a second operand, 상기 제 1 오퍼랜드는 레지스터군 중의 일부분의 레지스터를 각각 개별적으로 지정하는지의 여부를 나타내는 개별필드와 레지스터군 중의 다른 일부분의 레지스터를 일괄하여 지정하는지의 여부를 나타내는 일괄필드로 이루어지고, 레지스터군 중의 일부분의 레지스터가 각각 상기 개별필드에 의하여 개별적으로 지정되고, 레지스터군 중의 다른 일부분의 레지스터가 상기 일괄필드에 의하여 일괄하여 지정되는 제 1 오퍼랜드 지정 단계와;The first operand is composed of a separate field indicating whether or not each register of a part of the register group is individually designated and a batch field indicating whether or not a register of another part of the register group is collectively designated. A first operand designating step in which registers of? Are individually designated by the respective fields, and registers of other portions of the register group are collectively designated by the batch field; 상기 제 2 오퍼랜드에 의하여 메모리의 실효 어드레스가 지정되는 제 2 오퍼랜드 지정 단계와;A second operand designating step in which an effective address of a memory is designated by the second operand; 상기 제 1 오퍼랜드 지정 단계에서 지정되는 복수의 레지스터와 상기 제 2 오퍼랜드 지정 단계에서 지정되는 메모리와의 사이에서 데이터 전송을 실행하는 오퍼레이션 단계를 포함하는 것을 특징으로 하는 정보처리방법.And an operation step of executing data transfer between a plurality of registers specified in said first operand specifying step and a memory specified in said second operand specifying step. 제 23 항에 있어서,The method of claim 23, 상기 레지스터군은 서브루틴 중에서 데이터가 보존되는 것을 필요로 하는 비파괴 레지스터로서 이용되는 m 개의 레지스터와, 서브루틴 중에서 데이터가 보존될 필요가 없는 파괴 레지스터로서 이용되는 n 개의 레지스터를 포함하고,The register group includes m registers used as non-destructive registers that require data to be preserved in subroutines, and n registers used as destructive registers in which data does not need to be preserved among subroutines. 상기 개별필드는 상기 m 개의 레지스터에 대응하는 m 비트의 구성이며, 상기 일괄필드는 상기 n 개의 레지스터를 일괄 지정하는 1 비트의 구성인 것을 특징으로 하는 정보처리방법.And said individual field is composed of m bits corresponding to said m registers, and said batch field is composed of 1 bit for collectively designating said n registers.
KR1019960041278A 1995-09-22 1996-09-20 An information processing apparatus and its information processing method for realizing data transfer of multiple registers with short word length commands KR100413651B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP95-244,757 1995-09-22
JP7244757A JP2889845B2 (en) 1995-09-22 1995-09-22 Information processing device

Publications (2)

Publication Number Publication Date
KR970016973A KR970016973A (en) 1997-04-28
KR100413651B1 true KR100413651B1 (en) 2004-05-20

Family

ID=17123452

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019960041278A KR100413651B1 (en) 1995-09-22 1996-09-20 An information processing apparatus and its information processing method for realizing data transfer of multiple registers with short word length commands

Country Status (7)

Country Link
US (1) US5796970A (en)
EP (1) EP0764900B1 (en)
JP (1) JP2889845B2 (en)
KR (1) KR100413651B1 (en)
CN (1) CN1146784C (en)
DE (1) DE69636268T2 (en)
TW (1) TW430769B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3630804B2 (en) * 1995-11-30 2005-03-23 三洋電機株式会社 Data processing device
US5933627A (en) * 1996-07-01 1999-08-03 Sun Microsystems Thread switch on blocked load or store using instruction thread field
US7529907B2 (en) 1998-12-16 2009-05-05 Mips Technologies, Inc. Method and apparatus for improved computer load and store operations
US7020879B1 (en) 1998-12-16 2006-03-28 Mips Technologies, Inc. Interrupt and exception handling for multi-streaming digital processors
US6389449B1 (en) 1998-12-16 2002-05-14 Clearwater Networks, Inc. Interstream control and communications for multi-streaming digital processors
US7257814B1 (en) 1998-12-16 2007-08-14 Mips Technologies, Inc. Method and apparatus for implementing atomicity of memory operations in dynamic multi-streaming processors
JP2001202243A (en) * 1999-04-30 2001-07-27 Hitachi Ltd Data processor
EP1050797A1 (en) * 1999-05-03 2000-11-08 STMicroelectronics S.A. Execution of instructions in a computer program
JP2001236206A (en) * 1999-10-01 2001-08-31 Hitachi Ltd Method for loading data and method for storing the same and method for loading data word and method for storing the same and method for comparing floating point
AU2001226324A1 (en) * 2000-01-18 2001-07-31 Clearwater Networks, Inc. Method and apparatus for improved computer load and store operations
WO2002006959A1 (en) 2000-07-14 2002-01-24 Clearwater Networks, Inc. Instruction fetch and dispatch in multithreaded system
US6820191B2 (en) * 2000-12-05 2004-11-16 Faraday Technology Corp. Apparatus and method for executing an instruction with a register bit mask for transferring data between a plurality of registers and memory inside a processor
KR100379151B1 (en) * 2001-01-04 2003-04-07 패러데이 테크놀로지 코퍼레이션 Apparatus and method for executing a block data transfer instruction inside processor
GB2397667A (en) * 2003-01-27 2004-07-28 Imagination Tech Ltd Multiple register load using a very long instruction word
GB2402759B (en) * 2003-06-12 2005-12-21 Advanced Risc Mach Ltd Data processing apparatus and method for transferring data values between a register file and a memory
GB2402763B (en) * 2003-06-13 2006-03-01 Advanced Risc Mach Ltd Data access program instruction encoding
US20230051855A1 (en) * 2021-08-13 2023-02-16 Infineon Technologies Ag Call and return instructions for configurable register context save and restore

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02103630A (en) * 1988-10-12 1990-04-16 Nec Corp Data processor
JPH03260727A (en) * 1990-03-09 1991-11-20 Mitsubishi Electric Corp Register designating device
JPH06202866A (en) * 1992-12-29 1994-07-22 Hitachi Ltd Information processor

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4109310A (en) * 1973-08-06 1978-08-22 Xerox Corporation Variable field length addressing system having data byte interchange
US4338663A (en) * 1978-10-25 1982-07-06 Digital Equipment Corporation Calling instructions for a data processing system
US4241399A (en) * 1978-10-25 1980-12-23 Digital Equipment Corporation Calling instructions for a data processing system
JPS6151243A (en) * 1984-08-20 1986-03-13 Toshiba Corp Register type operation processor
JP2545789B2 (en) * 1986-04-14 1996-10-23 株式会社日立製作所 Information processing device
JP2902402B2 (en) * 1987-09-30 1999-06-07 三菱電機株式会社 Data processing device
JPH0353328A (en) * 1989-07-20 1991-03-07 Hitachi Ltd Register saving recoverying method and processor
JP2504235B2 (en) * 1989-11-16 1996-06-05 三菱電機株式会社 Data processing device
JP2669158B2 (en) * 1991-01-22 1997-10-27 三菱電機株式会社 Data processing device
JP3110866B2 (en) * 1992-06-01 2000-11-20 株式会社東芝 Microprocessor
WO1996008767A2 (en) * 1994-09-16 1996-03-21 Philips Electronics N.V. Microcontroller system with a multiple-register stacking instruction

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02103630A (en) * 1988-10-12 1990-04-16 Nec Corp Data processor
JPH03260727A (en) * 1990-03-09 1991-11-20 Mitsubishi Electric Corp Register designating device
JPH06202866A (en) * 1992-12-29 1994-07-22 Hitachi Ltd Information processor

Also Published As

Publication number Publication date
EP0764900A2 (en) 1997-03-26
US5796970A (en) 1998-08-18
KR970016973A (en) 1997-04-28
CN1146784C (en) 2004-04-21
CN1153346A (en) 1997-07-02
EP0764900A3 (en) 2002-11-06
EP0764900B1 (en) 2006-06-21
DE69636268D1 (en) 2006-08-03
TW430769B (en) 2001-04-21
JPH0991134A (en) 1997-04-04
JP2889845B2 (en) 1999-05-10
DE69636268T2 (en) 2006-11-09

Similar Documents

Publication Publication Date Title
KR100413651B1 (en) An information processing apparatus and its information processing method for realizing data transfer of multiple registers with short word length commands
US5167026A (en) Simultaneously or sequentially decoding multiple specifiers of a variable length pipeline instruction based on detection of modified value of specifier registers
US5481734A (en) Data processor having 2n bits width data bus for context switching function
EP0169565B1 (en) Microprocessor compatible with any software represented by different types of instruction formats
EP0011442B1 (en) Data processing system having an integrated stack and register machine architecture
US5142633A (en) Preprocessing implied specifiers in a pipelined processor
US5390307A (en) Apparatus for a multi-data store or load instruction for transferring multiple contiguous storage locations in one transfer operation
US4103329A (en) Data processing system with improved bit field handling
EP0213843A2 (en) Digital processor control
US5522053A (en) Branch target and next instruction address calculation in a pipeline processor
EP0627681B1 (en) Apparatus and method for processing data with a plurality of flag groups
US5682531A (en) Central processing unit
JPH0666051B2 (en) Program counter stack method and apparatus for nested subroutines and instructions
KR100254008B1 (en) Data processor simultaneously executable two instruction
JPH1091443A (en) Information processing circuit, microcomputer and electronic equipment
US4945511A (en) Improved pipelined processor with two stage decoder for exchanging register values for similar operand instructions
JPH08305585A (en) Interruption controller
JPH01310441A (en) Data processor
JPH10207717A (en) Microcomputer
US5564030A (en) Circuit and method for detecting segment limit errors for code fetches
US6757809B1 (en) Data processor having 2n bits width data bus for context switching functions
US5440704A (en) Data processor having branch predicting function
US7003651B2 (en) Program counter (PC) relative addressing mode with fast displacement
US4691282A (en) 16-bit microprocessor system
EP0240606B1 (en) Pipe-line processing system and microprocessor using the system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20131119

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20141117

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20151118

Year of fee payment: 13

EXPY Expiration of term