KR19980083442A - 분기예측회로 - Google Patents

분기예측회로 Download PDF

Info

Publication number
KR19980083442A
KR19980083442A KR1019970018744A KR19970018744A KR19980083442A KR 19980083442 A KR19980083442 A KR 19980083442A KR 1019970018744 A KR1019970018744 A KR 1019970018744A KR 19970018744 A KR19970018744 A KR 19970018744A KR 19980083442 A KR19980083442 A KR 19980083442A
Authority
KR
South Korea
Prior art keywords
instruction
branch
signal
memory
branch prediction
Prior art date
Application number
KR1019970018744A
Other languages
English (en)
Other versions
KR100244472B1 (ko
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 KR1019970018744A priority Critical patent/KR100244472B1/ko
Publication of KR19980083442A publication Critical patent/KR19980083442A/ko
Application granted granted Critical
Publication of KR100244472B1 publication Critical patent/KR100244472B1/ko

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3867Concurrent instruction execution, e.g. pipeline or look ahead using instruction pipelines
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K19/00Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits
    • H03K19/20Logic circuits, i.e. having at least two inputs acting on one output; Inverting circuits characterised by logic function, e.g. AND, OR, NOR, NOT circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)

Abstract

본 발명은 분기예측회로에 관한 것으로, 종래의 분기예측회로에서는 예측된 값이 실행단계의 결과와 상이한 경우 전체 파이프라인을 정지시키고 새로운 어드레스와 명령어를 받아 파이프라인을 구동시키게 되는데, 이때 패치(fetch) 파이프라인 단계에서 실행단계까지의 명령어가 취소됨으로 시스템의 성능이 저하되는 문제점이 있었다. 따라서 본 발명은 상기와 같은 문제점을 해결하기 위하여 창안한 것으로 분기예측의 결과를 하드웨어 뿐만아니라 소프트웨어에서도 수행함으로써 예측오류의 확률을 줄여 시스템의 성능을 개선하는 효과가 있다.

Description

분기예측회로
본 발명은 분기예측회로에 관한 것으로, 특히 마이크로 프로세서의 파이프라인을 이용할때 분기명령어 예측오류의 확률을 줄일 수 있는 분기예측회로에 관한 것이다.
도1은 종래의 분기예측회로의 구성도로서, 이에 도시한 바와 같이 명령어를 저장하는 메모리(T1)와, 상기 메모리(T1)의 오피코드(OP code)신호를 받음과 아울러 다른 파이프라인 단계로부터 신호를 입력받는 분기예측부(T2)와, 다음 명령어의 주소를 저장하고 있는 프로그램 카운터(T3)와, 상기 프로그램 카운터(T3)의 값과 1의 값을 합하는 인크리먼트(increment)회로(T4)와, 상기 분기예측부(T2)의 출력신호를 선택신호(SEL)로 입력받아 상기 메모리(T1)의 오퍼랜드(operand)신호 또는 상기 인크리먼트(increment) 회로(T4)의 출력신호를 선택하여 다음 어드레스 신호로 전달하는 멀티플랙서(T5)로 구성된다.
이하, 상기와 같이 구성된 종래의 분기예측회로의 동작을 설명한다.
분기예측부(T2)는 오피코드(OP code)를 메모리(T1)의 명령어로부터 입력받고, 파이프라인 실행단계로부터 이 명령어의 과거 히스토리(history)를 저장한 값을 메모리로부터 입력받아 다음 어드레스를 예측하는 자료로 이용되는데, 이 로직의 결과는 최종적으로 명령어의 오퍼랜드(operand)값 (실질적으로 분기 명령어인 경우 어드레스 값)과 프로그램 카운터에 1을 더한 값을 선택하여 다음 어드레스를 구하는데 이용된다. 즉, 분기예측부(T2)의 출력신호에 따라 메모리(T1)의 오퍼랜드값 또는 프로그램 카운터(T3)의 카운터값에 1을 더한 인크리먼트 회로(T2)의 출력신호값이 멀티플렉서(T5)에서 선택되어 다음 어드레스로 출력된다.
그러나 종래의 분기예측회로에서, 예측된 값이 실행단계의 결과와 상이한 경우 전체 파이프라인을 정지시키고 새로운 어드레스와 명령어를 받아 파이프라인을 구동시키게 되는데 이때 패치(fetch) 파이프라인 단계에서 실행단계까지의 명령어가 취소되므로 시스템의 성능이 저하되는 문제점이 있었다.
따라서 본 발명은 상기와 같은 문제점을 해결하기 위하여 창안한 것으로 분기예측의 결과를 하드웨어 뿐만아니라 소프트웨어에서도 수행함으로써 예측오류의 확률을 줄여 시스템의 성능을 개선하는데 그 목적이 있다.
도1은 종래의 분기예측회로의 구성블록도.
도2는 본 발명의 분기예측회로의 구성블록도.
*도면의 주요 부분에 대한 부호의 설명*
T10 : 메모리 T2 : 분기예측부
T3 : 프로그램 카운터T4 : 인크리먼트(increment)회로
T5 : 멀티플렉서 T6 : 앤드게이트
이와 같은 목적을 달성하기위한 본 발명 분기예측회로는 그의 구성도인 도2에 도시한 바와 같이 명령어를 저장하고 명령어가 분기 명령인 경우 분기인에이블신호(BEN)를 출력하는 비트(bit)가 있는 메모리(T10)와, 상기 메모리(T10)의 오피코드(OP code)신호를 입력받음과 아울러 파이프라인 단계로부터 신호를 입력받아 분기를 예측하는 분기예측부(T2)와, 상기 분기예측부(T2)의 출력신호와 상기 메모리(T10)의 분기인에이블신호(BEN)를 앤드조합하는 앤드게이트(T6)와, 다음 명령어의 주소를 저장하고 있는 프로그램 카운터(T3)와, 상기 프로그램 카운터(T3)의 값과 1의 값을 합하는 인크리먼트(increment)회로(T4)와, 상기 앤드게이트(T6)의 출력신호를 선택신호(SEL)로 입력받아 상기 메모리(T10)의 오퍼랜드(operand)신호 또는 상기 인크리먼트(increment)회로(T4)의 출력신호를 선택하여 다음 어드레스 신호로 출력하는 멀티플렉서(T5)로 구성된다.
이하, 이와 같이 구성된 본 발명의 동작을 명령어의 예를 들어 종래의 기술과 비교하여 상세히 설명한다.
1 add c,a,b
2 add d,a,b
3 JZ codeφ
4 mov e,φ
····
codeφ: add f,c,d
····
상기 명령어와 같이 종래에는 3번 라인의 JZ명령어를 수행할때 분기예측부(T2)에 의해서 4 또는 codeφ 라인으로 점프(Jump)하게 되는데, 이때 4 라인으로 점프할 확률은 50%이고 codeφ 라인으로 점프할 확률이 50%가 된다. 그러나 본 발명에서는 메모리(T10)에 분기예측부(T2)의 인에이블(enable)을 두게 되면 JZ명령어가 두종류 즉, 분기예측부(T2)를 인에이블(enable)시키는 JZE명령어와 분기예측부(T2)를 디스에이블(disable)시키는 JZD명령어로 구분되는데 상기 JZD명령어를 이용하는 경우에는 분기명령어의 뒤에 NOOP( No Operation)명령어나 분기명령어에 영향을 주지 않는 다른 명령어를 추가하여 수행시키면 된다. 그리고 상기 명령어의 배치는 컴파일러가 수행하므로 하드웨어를 추가할 필요가 없게 된다. 한편 분기예측과 명령어를 수행하는 것이 파이프라인에서 1클럭이라고 하면 분기명령어가 디스에이블(disable)인 경우 분기명령어 다음에 1개의 명령어만이 분기 명령어와 무관한 것을 배치하면 된다.
2 add d,a,b
3 JZD codeφ
1 add e,φ
····
codeφ: add f,c,d
····
또한, 본 발명은 상기 명령어와 같이 JZD명령어를 이용하여 명령어의 순서를 바꿈으로써 분기예측부(T2)를 이용할 필요가 없게된다. 그러나 컴파일러가 명령어의 순서를 바꿈으로써 분기예측부(T2)를 사용하지 않아도 되는 경우가 아닌 경우 종래에는 NOOP명령어를 사용하였으나 본 발명은 JZE명령어를 이용함으로써 NOOP명령어를 사용하지 않아도 된다. 그리고 JZE명령어와 JZD명령어를 구별하기 위해서 오피코드(OP code)에 이를 구별하기 위한 비트를 두며, 최종 어드레스를 구하는 부분에서도 이 비트가 디스에이블인 경우 프로그램 카운터(T3)의 값+1의 값을 다음 어드레스로 선택하도록 한다. 즉, 분기인에이블신호(BEN)가 디스에이블 상태인 저전위 상태인 경우에는 분기 예측부(T2)의 출력신호에 상관없이 엔드게이트(T6)에서 저전위 신호가 출력되어 멀티플렉서(T5)의 선택신호가 인가되고, 이에 따라 프로그램 카운터(T3)의 카운트값에 1을 더한 인크리먼트회로(T4)의 출력신호값이 그 멀티플렉서(T5)에서 선택되어 다음 어드레스로 출력된다.
이상에서 상세히 설명한 바와 같이 분기예측의 결과를 하드웨어 뿐만아니라 소프트웨어에서도 수행함으로써 예측오류의 확률을 줄여 시스템의 성능을 개선하는 효과가 있다.

Claims (2)

  1. 명령어를 저장하고 명령어가 분기 명령인 경우 분기인에이블신호를 츨력하는 비트가 있는 메모리(T10)와, 상기 메모리(T10)의 오피코드(OP code)신호를 입력받음과 아울러 다른 파이프라인 단계로부터 신호를 입력받아 분기를 예측하는 분기예측부(T2)와, 다음 명령어의 주소를 저장하고 있는 프로그램 카운터(T3)와, 상기 프로그램 카운터(T3)의 값과 1의 값을 합하는 인크리먼트회로(T4)와, 상기 분기예측부(T2)의 출력신호와 상기 메모리(T10)의 분기인에이블신호를 엔드조합하는 엔드게이트(T6)와, 상기 엔드게이트(T6)의 출력신호에 따라 상기 메모리(T10)의 오퍼랜드(operand)신호 또는 상기 인크리먼트회로(T4)의 출력신호를 선택하여 다음 어드레스 신호로 출력하는 멀티플렉서(T5)로 구성하여 된 것을 특징으로 하는 분기예측회로.
  2. 제 1항에 있어서, 메모리(T10)의 분기인에이블 신호를 출력하는 비트는 오피코드(OP code)의 한 비트로 할당하여 구성된 것을 특징으로 하는 분기예측회로.
KR1019970018744A 1997-05-15 1997-05-15 분기예측회로 KR100244472B1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970018744A KR100244472B1 (ko) 1997-05-15 1997-05-15 분기예측회로

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970018744A KR100244472B1 (ko) 1997-05-15 1997-05-15 분기예측회로

Publications (2)

Publication Number Publication Date
KR19980083442A true KR19980083442A (ko) 1998-12-05
KR100244472B1 KR100244472B1 (ko) 2000-08-01

Family

ID=19505910

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970018744A KR100244472B1 (ko) 1997-05-15 1997-05-15 분기예측회로

Country Status (1)

Country Link
KR (1) KR100244472B1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100404257B1 (ko) * 2000-02-04 2003-11-03 인터내셔널 비지네스 머신즈 코포레이션 파이프라인 프로세서 아키텍처, 모든 인라인 및 분기인스트럭션을 정확한 구조적인 시퀀스로 프로세서파이프라인에 제공하는 시스템, 및 분기 처리 유닛

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100404257B1 (ko) * 2000-02-04 2003-11-03 인터내셔널 비지네스 머신즈 코포레이션 파이프라인 프로세서 아키텍처, 모든 인라인 및 분기인스트럭션을 정확한 구조적인 시퀀스로 프로세서파이프라인에 제공하는 시스템, 및 분기 처리 유닛
US6728872B1 (en) 2000-02-04 2004-04-27 International Business Machines Corporation Method and apparatus for verifying that instructions are pipelined in correct architectural sequence

Also Published As

Publication number Publication date
KR100244472B1 (ko) 2000-08-01

Similar Documents

Publication Publication Date Title
KR101503554B1 (ko) 에일리어스 어드레싱을 이용한 가변 길이 인스트럭션 인코딩의 구현
US7437543B2 (en) Reducing the fetch time of target instructions of a predicted taken branch instruction
US5606670A (en) Method and apparatus for signalling a store buffer to output buffered store data for a load operation on an out-of-order execution computer system
US20010021974A1 (en) Branch predictor suitable for multi-processing microprocessor
US5522053A (en) Branch target and next instruction address calculation in a pipeline processor
KR100233220B1 (ko) 파이프라인 처리기
JP2004533695A (ja) 分岐目標を予測する方法、プロセッサ、及びコンパイラ
US20050050372A1 (en) Microcontroller unit controlling plurality of registers in accordance with precision of data to be operated, and compiler thereof
US7017030B2 (en) Prediction of instructions in a data processing apparatus
US8473727B2 (en) History based pipelined branch prediction
US20040225870A1 (en) Method and apparatus for reducing wrong path execution in a speculative multi-threaded processor
US20090319760A1 (en) Single-cycle low power cpu architecture
US20040158694A1 (en) Method and apparatus for hazard detection and management in a pipelined digital processor
US20060095746A1 (en) Branch predictor, processor and branch prediction method
KR100317240B1 (ko) 분기 예측 정확도 히스토리를 이용한 분기 예측기
EP1369776B1 (en) Information processor having delayed branch function
US7519799B2 (en) Apparatus having a micro-instruction queue, a micro-instruction pointer programmable logic array and a micro-operation read only memory and method for use thereof
KR100980076B1 (ko) 저전력 분기 예측 시스템 및 분기 예측 방법
KR100244472B1 (ko) 분기예측회로
US5361338A (en) Pipelined system for decomposing instruction into two decoding parts and either concurrently generating two operands addresses of merging decomposing decoding codes based upon the second operand
US7149879B2 (en) Processor and method of automatic instruction mode switching between n-bit and 2n-bit instructions by using parity check
US6842846B2 (en) Instruction pre-fetch amount control with reading amount register flag set based on pre-detection of conditional branch-select instruction
US20040019772A1 (en) Microprocessor
US8255672B2 (en) Single instruction decode circuit for decoding instruction from memory and instructions from an instruction generation circuit
US7124281B1 (en) Processing system having sequential address indicator signals

Legal Events

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

Payment date: 20051021

Year of fee payment: 7

LAPS Lapse due to unpaid annual fee