US5394530A

Arrangement for predicting a branch target address in the second iteration of a short loop

Claim Score by NHIP

Read claim 4, the broadest

Abstract

Improved techniques for predicting a branch target address using a branch history table (BHT), is disclosed. The BHT stores a plurality of pairs of a branch address and corresponding branch target address. In order to eliminate or effectively reduce loss of machine cycles in the branch target address prediction, a prefetched address data is compared with an incoming new branch instruction address before being applied to a BHT (branch history table) for the purpose of updating same. When the coincidence is detected, a selector selects a new branch target address before being applied to the BHT. The selected new branch target address is fed to an instruction address prefetch register.

US5394530A, drawing sheet 1
Sheet 1 of 8

Term

Term ended

Expired 22 February 2014, 12.6 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

6 claims: 2 independent, 4 dependent

  1. 1
    A device for predicting a branch target address, comprising:a prefetch unit operative to prefetch instruction addresses of a given instruction sequence;a memory for storing a branch history table, said memory having a first memory section for storing a plurality of branch instruction addresses and a second memory section for storing a plurality of branch target addresses, each of said branch target addresses corresponding to one of said branch instruction address on a one to one basis, said branch history table receiving prefetched branch instruction addresses from said prefetch unit;an execution unit executing instructions under pipeline control, said executing unit supplying a new branch instruction address and a corresponding new branch target address to said branch history table when a prediction of a branch target address fails upon execution of a branch instruction corresponding to said branch target address in said execution unit;a first comparator coupled to said prefetch unit and said branch history table, said first comparator comparing a prefetched branch instruction address from said prefetch unit with a branch instruction address from said first memory section and outputting a first control signal when said prefetched branch instruction address from said prefetch unit matches said branch instruction address from said first memory section;a second comparator coupled to said prefetch unit and said executing unit, said second comparator comparing a branch instruction address from said prefetch unit with said new branch instruction address being supplied to said branch history table and being used to update said branch history table and outputting a second control signal when said branch instruction address from said prefetch unit matches said new branch instruction address being supplied to said branch history table and being used to update said branch history table;and a selector receiving a branch target address from said second memory section and said new branch target address being supplied to said branch history table from said execution unit for outputting one of said branch target address from said second memory section and said new branch target address being supplied to said branch history table from said execution unit in response to said second control signal, wherein said prefetch unit selects said output from said selector in response to said first control signal.
  2. 4
    Broadest claimClaim Score 27, narrow(NHIP)An arrangement for predicting a branch target address in a digital data processing system, comprising:first means for prefetching an instruction address of a given instruction sequence;second means for storing a plurality of branch instruction addresses, said second means being coupled to receive a prefetched instruction address from said first means, said prefetched instruction address also being utilized to index a branch instruction address, said second means being supplied with a new branch instruction address upon failure of a branch target prediction;third means for storing a plurality of branch target addresses corresponding to said branch instruction addresses memorized in said second means on a one to one basis, said third means being coupled to receive said prefetched instruction address which is utilized to derive said branch target address corresponding to said branch instruction address coincident with said prefetched instruction address in said second means, said third means being supplied with a new branch target address when said second means is updated;fourth means being arranged to compare an instruction address outputted from said second means with said prefetched instruction address applied from said first means, and for outputting a comparison result of said fourth means as a control signal to said first means to control instruction address prefetching by said first means;fifth means being arranged to compare a prefetched instruction address applied from said first means with said new branch instruction address being supplied to said second means and for generating a match/miss-match signal indicative of whether said prefetched instruction address applied from said first means and said new branch instruction address match or miss-match;and sixth means being arranged to receive a branch target address from said third means and said new branch target address being supplied to said third means and being coupled to receive said match/miss-match signal from said fifth means, said sixth means selecting said new branch target address when said match/miss-match signal from said fifth means indicates a match, and selecting said branch target address from said third means when said match/miss-match signal from said fifth means indicates a miss-match, said output of said sixth means being applied to said first means.