KR100602374B1 - Risc processor for raising code density using stack architecture - Google Patents

Risc processor for raising code density using stack architecture Download PDF

Info

Publication number
KR100602374B1
KR100602374B1 KR1020000051312A KR20000051312A KR100602374B1 KR 100602374 B1 KR100602374 B1 KR 100602374B1 KR 1020000051312 A KR1020000051312 A KR 1020000051312A KR 20000051312 A KR20000051312 A KR 20000051312A KR 100602374 B1 KR100602374 B1 KR 100602374B1
Authority
KR
South Korea
Prior art keywords
stack
mode
arm
processor
register
Prior art date
Application number
KR1020000051312A
Other languages
Korean (ko)
Other versions
KR20020017798A (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 어보브반도체 주식회사
Priority to KR1020000051312A priority Critical patent/KR100602374B1/en
Publication of KR20020017798A publication Critical patent/KR20020017798A/en
Application granted granted Critical
Publication of KR100602374B1 publication Critical patent/KR100602374B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • G06F9/3012Organisation of register space, e.g. banked or distributed register file
    • G06F9/30134Register stacks; shift registers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30007Arrangements for executing specific machine instructions to perform operations on data operands
    • G06F9/3001Arithmetic instructions
    • 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/30105Register structure

Abstract

본 발명은 오퍼랜드가 항상 탑(top)에 존재하는 스택 구조를 이용하여 명령어의 오퍼랜드에 대한 정보가 필요없도록 함으로써 명령어의 길이를 줄여 코드 집적도를 높일 수 있는, 스택 구조를 사용하여 코드 집적도를 높인 리스크 프로세서를 제공하기 위한 것으로, 이를 위해 본 발명은 리스크 프로세서에 있어서, 원형 구조의 스택; 레지스터 파일; 프로그램 상태 레지스터의 임의의 1 비트 값에 응답하여 ARM(Advanced RISC Machine) 모드 또는 스택 모드에 따라서 상기 스택의 스택 탑 또는 상기 레지스터 파일의 임의의 레지스터에 저장된 오퍼랜드 중 어느 하나를 선택하여 산술논리연산유닛으로 보내지는 제1 및 제2 오퍼랜드로 출력하는 제1 및 제2 선택 수단을 포함한다.
The present invention uses a stack structure in which an operand is always in the top so that information on operands of an instruction is not needed, thereby reducing the length of instructions and increasing the degree of code integration. A processor for a risk processor comprising: a stack of a circular structure; Register file; In response to an arbitrary 1-bit value of the program status register, selects either the stack top of the stack or the operand stored in any register of the register file in accordance with the Advanced RISC Machine (ARM) mode or the stack mode, To the first and second operands sent to the second operand.

리스크 프로세서, ARM 프로세서, 레지스터 파일, 원형 구조의 스택, 스택 모드Risk processor, ARM processor, register file, stack of circular structures, stack mode

Description

스택 구조를 사용하여 코드 집적도를 높인 리스크 프로세서{RISC PROCESSOR FOR RAISING CODE DENSITY USING STACK ARCHITECTURE} (RISC PROCESSOR FOR RAISING CODE DENSITY USING STACK ARCHITECTURE)             

도 1은 본 발명의 일실시예에 따른 ARM 프로세서에서 원형 구조를 갖는 8 ×32비트 스택을 간략히 도시한 도면.BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 schematically illustrates an 8x32 bit stack with a circular structure in an ARM processor according to one embodiment of the present invention.

도 2는 PSR(Program Status Register)의 내부 구성도.2 is an internal configuration diagram of a PSR (Program Status Register).

도 3은 레지스터 파일과 원형 구조의 스택을 포함하는 본 발명의 일실시예에 따른 ARM 프로세서의 일부 블록도.
3 is a block diagram of some portions of an ARM processor in accordance with one embodiment of the present invention that includes a register file and a stack of circular structures.

* 도면의 주요 부분에 대한 설명Description of the main parts of the drawings

100 : 원형 스택100: Circular stack

120 : 레지스터 파일120: Register file

140, 160 : 멀티플렉서
140, 160: multiplexer

본 발명은 마이크로프로세서에 관한 것으로, 특히 명령어 길이가 고정되어 있는 리스크(RISC, Reduced Instruction Set Computer) 프로세서에 관한 것이다.The present invention relates to a microprocessor, and more particularly, to a reduced instruction set computer (RISC) processor having a fixed instruction length.

일반적으로, 마이크로프로세서 중 내장형(embedded)으로 사용되는 마이크로프로세서는 대부분 리스크의 형태를 가지고 있다. 이 리스크 프로세서는 명령어의 길이가 고정되어 있고(ARM:32, 16비트 ;; SH3 : 16비트 …), 그 명령어 안에 각 명령어가 수행해야 하는 데 필요한 모든 정보가 들어가야 하기 때문에 명령어의 길이를 짧게 하는 것이 어렵다.Generally, a microprocessor used as an embedded microprocessor is mostly in the form of a risk. This risk processor has a fixed length of instruction (ARM: 32, 16 bits ;; SH3: 16 bits ...) and it shortens the length of the instruction because it contains all the information needed to be executed by each instruction It is difficult.

따라서, 리스크 프로세서는 모든 정보가 포함된 긴 명령어를 프로그램하고 그것을 메모리에 저장해야하기 때문에 코드 집적도가 낮다.
Thus, the risk processor has a low degree of code integration because it must program long instructions containing all information and store them in memory.

본 발명은 상기 문제점을 해결하기 위하여 안출된 것으로, 오퍼랜드가 항상 탑(top)에 존재하는 스택 구조를 이용하여 명령어의 오퍼랜드에 대한 정보가 필요없도록 함으로써 명령어의 길이를 줄여 코드 집적도를 높일 수 있는, 스택 구조를 사용하여 코드 집적도를 높인 리스크 프로세서를 제공하는데 그 목적이 있다.
SUMMARY OF THE INVENTION The present invention has been made in order to solve the above problems, and it is an object of the present invention to provide a method and a program which can increase the degree of code integration by reducing the length of a command by making use of a stack structure in which an operand is always in the top, The purpose of this work is to provide a risk processor that uses stack structure to increase code density.

상기 목적을 달성하기 위한 본 발명은 리스크 프로세서에 있어서, 원형 구조의 스택; 레지스터 파일; 프로그램 상태 레지스터의 임의의 1 비트 값에 응답하여 ARM(Advanced RISC Machine) 모드 또는 스택 모드에 따라서 상기 스택의 스택 탑 또는 상기 레지스터 파일의 임의의 레지스터에 저장된 오퍼랜드 중 어느 하나를 선택하여 산술논리연산유닛으로 보내지는 제1 및 제2 오퍼랜드로 출력하는 제1 및 제2 선택 수단을 포함하여 이루어진다.According to an aspect of the present invention, there is provided a risk processor comprising: a stack having a circular structure; Register file; In response to an arbitrary 1-bit value of the program status register, selects either the stack top of the stack or the operand stored in any register of the register file in accordance with the Advanced RISC Machine (ARM) mode or the stack mode, To the first and second operands sent to the second operand.

이하, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 정도로 상세히 설명하기 위하여, 본 발명의 가장 바람직한 실시예를 첨부된 도면을 참조하여 설명하기로 한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings, in order to facilitate a person skilled in the art to easily carry out the technical idea of the present invention. do.

일반적으로, ARM(Advanced RISC Machine) 프로세서는 코드 집적도를 높이기 위해 2가지 모드, 즉 ARM 모드(32비트 명령어) 및 썸(Thumb) 모드(16비트 명령어)로 동작하며, 프로세서는 ARM 모드로 동작하다가 썸 모드로 동작할 수도 있고, 썸 모드에서 ARM 모드로의 스위칭도 가능하다. 이와 같이, 썸 모드를 쓰는 것은 16비트로 된 명령어를 사용함으로써 코드 집적도를 좋게 하려는 것이다.In general, an Advanced RISC Machine (ARM) processor operates in two modes, ARM mode (32-bit instruction) and Thumb mode (16-bit instruction) to increase code density and the processor operates in ARM mode It is possible to operate in the thumb mode or switch from the thumb mode to the ARM mode. Thus, the thumb mode is used to improve the degree of code integration by using 16-bit instructions.

본 발명의 ARM 프로세서는 기존의 레지스터 파일 이외에 도 1에 도시된 것과 같은 원형 구조를 갖는 스택을 더 구비한다.The ARM processor of the present invention further includes a stack having a circular structure as shown in Fig. 1 in addition to the existing register file.

도 1은 본 발명의 일실시예에 따른 ARM 프로세서에서 원형 구조를 갖는 8 ×32비트 스택을 간략히 도시한 것으로서, 초기상태에서는 스택 탑(Stack_top)과 스택 바텀(Stack_bottom)이 일치하며, 스택에 값이 라이트됨에 따라 스택 탑(Stack_top)은 4씩 증가하게 된다.1 schematically illustrates an 8x32 bit stack having a circular structure in an ARM processor according to an embodiment of the present invention. In the initial state, a stack top (Stack_top) and a stack bottom (Stack_bottom) The stack top (Stack_top) is increased by 4.

그리고, ARM 모드에서 스택 모드로의 스위칭은, ARM 모드에서 썸 모드로 스위칭할 때와 같이 BX 명령어로 하되, "BX Rn"에서 레지스터 Rn의 하위 2비트의 값이 "11"로 셋되었을 때에 스위칭이 일어나게 한다. Switching from the ARM mode to the stack mode is performed by the BX instruction as when switching from the ARM mode to the thumb mode. When the value of the lower two bits of the register Rn is set to "11" in "BX Rn" .                     

스택 모드에서 ARM 모드로의 스위칭은 종래의 썸 모드에서 ARM 모드로의 스위칭과 같은 방법으로 하고, 모드가 바뀌었다는 것을 도 2의 PSR(Program Status Register)의 예약된 부분 중에서 한 비트(도면에서는 비트 8)를 설정하여 모드를 나타낸다. 예를 들어, 비트 8(S)이 "1"일 때 스택 모드, "0"일 때 ARM 모드를 각각 나타낸다.The switching from the stack mode to the ARM mode is performed in the same manner as switching from the conventional thumb mode to the ARM mode, and one bit among the reserved portions of the PSR (Program Status Register) of Fig. 2 8) to indicate the mode. For example, it indicates a stack mode when bit 8 (S) is "1" and an ARM mode when it is "0".

한편, ARM 모드에서 사용되던 레지스터 파일들은, 스택 모드에서는 기본적으로 디스에이블(disable)되며, ARM 코어의 산술논리연산유닛으로 가는 오퍼랜드들은 원형 스택으로부터 나가게 된다.On the other hand, the register files used in ARM mode are disabled by default in stack mode, and the operands to the arithmetic logic unit of the ARM core will exit the round stack.

도 3은 레지스터 파일과 원형 구조의 스택을 포함하는 본 발명의 일실시예에 따른 ARM 프로세서의 일부 블록도이다.3 is a block diagram of some portions of an ARM processor in accordance with one embodiment of the present invention including a register file and a stack of circular structures.

도 3을 참조하면, ARM 프로세서는 상술한 바와 같은 원형 구조의 스택(100), 레지스터 파일(120), PSR 레지스터의 임의의 1 비트(도 2에서는 비트 8) 값에 응답하여 ARM 모드 또는 스택 모드에 따라서 산술논리연산유닛으로 보내지는 오퍼랜드(operandA, operandB)를 원형 스택(100) 또는 레지스터 파일(120)의 오퍼랜드 중에서 선택하여 출력하는 멀티플렉서(140, 160)를 구비한다.Referring to Figure 3, an ARM processor is operative to write to either the ARM mode or the stack mode in response to any one bit (bit 8 in Figure 2) value of the stack 100, the register file 120, and the PSR register, (OperandA, operandB) to be sent to the arithmetic and logical operation unit according to the instruction from the operand of the circular stack 100 or the register file 120 and outputting the selected operand.

MOV 명령어에 의해 스택(100)에서 레지스터 파일(120)로 갈 때는 스택 탑(Stack_top)에 있는 항목이 각각의 ARM 레지스터(R0 내지 R15)로 갈 수 있으며, 레지스터 파일(120)에서 스택(100)으로 갈 때는 ARM 레지스터들이 스택 탑(Stack_top)으로 들어간다. An entry in the stack top can go to each ARM register R0 through R15 when moving from the stack 100 to the register file 120 by the MOV instruction and the stack 100 in the register file 120, The ARM registers go into the stack top (Stack_top).

그리고, 스택 모드에서는 명령어 폭을 8비트로 제한하는 데, 명령어 폭이 8 비트이면 256개의 명령어를 수용할 수 있으나 명령어 디코딩 논리부를 간편하게 하고, 로드/스토어 시 약간의 옵셋을 연산코드(Opcode) 내에 수용할 수 있도록 아래 표 1과 같은 명령어만으로 제한한다.
In the stack mode, the instruction width is limited to 8 bits. If the instruction width is 8 bits, 256 instructions can be accommodated. However, the instruction decoding logic is simplified, and some offsets are stored in the opcode The following commands are restricted as shown in Table 1 below.

산술논리명령어Arithmetic logic instruction ADC(Add with carry), ADD(Add), AND(And), CMN(Compare negative), CMP(compare), EOR(Exclusive OR), NEG(Negate), OR(OR), MUL(Multiply)ADC (add with carry), ADD (add), AND (AND), CMN (compare negative), CMP (compare), EOR (exclusive OR), NEG (negate) 이동명령어Move command MOV stack_bottom, R0~R15, MOV R0~R15, stack_topMOV stack_bottom, R0 to R15, MOV R0 to R15, stack_top 로드/스토어 명령어Load / store instructions LDR, LDRB, LDRH, STR, STRB, STRHLDR, LDRB, LDRH, STR, STRB, STRH

즉, 표 1에서와 같이, 산술논리명령어, 이동명령어, 로드/스토어 명령어로 제한한다.That is, as shown in Table 1, it is limited to an arithmetic logic instruction, a movement instruction, and a load / store instruction word.

이와 같이, 연산코드를 8비트로 함으로써 종래의 ARM 모드(32비트)보다는 1/4, 썸 모드보다는 1/2로 코드 집적도를 향상시킬 수 있다.As described above, by making the operation code 8 bits, the degree of code integration can be improved to 1/4 of the conventional ARM mode (32 bits) and 1/2 of the thumb mode.

본 발명의 기술 사상은 상기 바람직한 실시예에 따라 구체적으로 기술되었으나, 상기한 실시예는 그 설명을 위한 것이며 그 제한을 위한 것이 아님을 주의하여야 한다. 또한, 본 발명의 기술 분야의 통상의 전문가라면 본 발명의 기술 사상의 범위 내에서 다양한 실시예가 가능함을 이해할 수 있을 것이다.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. In addition, it will be understood by those of ordinary skill in the art that various embodiments are possible within the scope of the technical idea of the present invention.

상기와 같이 이루어지는 본 발명은, ARM 모드에서는 32비트, 썸 모드에서는 16비트의 명령어를 각각 쓰지만, 스택 모드에서는 8비트의 명령어를 사용함으로써 ARM 모드에 비해서 1/4, 썸 모드에 비해서 1/2의 코드 절감 효과가 있어 코드 집적도를 높일 수 있다. According to the present invention as described above, a 32-bit instruction is used in the ARM mode and a 16-bit instruction is used in the thumb mode. However, in the stack mode, 1/4 of the ARM mode and 1/2 The code reduction effect of the code can increase the degree of integration.

Claims (2)

리스크 프로세서에 있어서,A risk processor comprising: 원형 구조의 스택;A stack of circular structures; 레지스터 파일;Register file; 프로그램 상태 레지스터의 임의의 1 비트 값에 응답하여 ARM(Advanced RISC Machine) 모드 또는 스택 모드에 따라서 상기 스택의 스택 탑 또는 상기 레지스터 파일의 임의의 레지스터에 저장된 오퍼랜드 중 어느 하나를 선택하여 산술논리연산유닛으로 보내지는 제1 및 제2 오퍼랜드로 출력하는 제1 및 제2 선택 수단In response to an arbitrary 1-bit value of the program status register, selects either the stack top of the stack or the operand stored in any register of the register file in accordance with the Advanced RISC Machine (ARM) mode or the stack mode, To the first and second operands sent to the first operand 을 포함하여 이루어지는 리스크 프로세서. And a risk processor. 제 1 항에 있어서, 상기 스택 모드의 명령어는,2. The method of claim 1, 8비트 명령어인 것을 특징으로 하는 리스크 프로세서.8-bit < / RTI > instructions.
KR1020000051312A 2000-08-31 2000-08-31 Risc processor for raising code density using stack architecture KR100602374B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020000051312A KR100602374B1 (en) 2000-08-31 2000-08-31 Risc processor for raising code density using stack architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020000051312A KR100602374B1 (en) 2000-08-31 2000-08-31 Risc processor for raising code density using stack architecture

Publications (2)

Publication Number Publication Date
KR20020017798A KR20020017798A (en) 2002-03-07
KR100602374B1 true KR100602374B1 (en) 2006-07-14

Family

ID=19686549

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020000051312A KR100602374B1 (en) 2000-08-31 2000-08-31 Risc processor for raising code density using stack architecture

Country Status (1)

Country Link
KR (1) KR100602374B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970016953A (en) * 1995-09-01 1997-04-28 이데이 노부유키 RISC type microprocessor and information processing unit
KR20010072490A (en) * 1999-06-15 2001-07-31 롤페스 요하네스 게라투스 알베르투스 Data processor comprising a register stack
KR100328162B1 (en) * 1996-05-22 2002-06-29 구사마 사부로 Information Processing Circuits and Microcomputers and Electronic Devices
KR100462951B1 (en) * 1997-03-27 2004-12-23 아트멜 코포레이숀 Eight-bit microcontroller having a risc architecture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR970016953A (en) * 1995-09-01 1997-04-28 이데이 노부유키 RISC type microprocessor and information processing unit
KR100328162B1 (en) * 1996-05-22 2002-06-29 구사마 사부로 Information Processing Circuits and Microcomputers and Electronic Devices
KR100462951B1 (en) * 1997-03-27 2004-12-23 아트멜 코포레이숀 Eight-bit microcontroller having a risc architecture
KR20010072490A (en) * 1999-06-15 2001-07-31 롤페스 요하네스 게라투스 알베르투스 Data processor comprising a register stack

Also Published As

Publication number Publication date
KR20020017798A (en) 2002-03-07

Similar Documents

Publication Publication Date Title
JP2004506263A (en) CPU accessing extended register set in extended register mode
EP2273377A1 (en) Interrupt control apparatuses and methods
US20110082999A1 (en) Data processing engine with integrated data endianness control mechanism
US6317822B1 (en) Instruction encoding techniques for microcontroller architecture
JP3546980B2 (en) Data processing device
JP3781519B2 (en) Instruction control mechanism of processor
JPH0232659B2 (en)
KR19990036893A (en) Processor Architecture for Execution of Multiple Addressing Modes and Its Design Method
KR100602374B1 (en) Risc processor for raising code density using stack architecture
EP0703529B1 (en) Microprocessor executing instruction having operand field including portion used as part of operation code
JPH03233630A (en) Information processor
JP2007500394A (en) Microcontroller with interrupt structure having programmable priority levels associated with different register sets for each priority level
JP2009526300A (en) Instruction set for microprocessors
KR100308211B1 (en) Micro computer system with compressed instruction
JPH04104350A (en) Micro processor
JP3678330B2 (en) Microprocessor
JP2008234270A (en) Information processing device and controlling method of information processing device
JP2004094807A (en) Instruction cache, microprocessor, and design method for same
JP2005275703A (en) Processor, and context switching method
JPS5920049A (en) Arithmetic processor
JP2003256066A (en) Clock supply controller
KR100209233B1 (en) Decoder unit of high super-scalable microprocessor
JP2004355383A (en) Memory control circuit
JP2004151915A (en) Data processor
JPH03253955A (en) Memory arranging system

Legal Events

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

Payment date: 20130425

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20140609

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20150701

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee