Preview

Branch Delay

Good Essays
Open Document
Open Document
1747 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Branch Delay
Delayed Branch
A technique for minimizing the effect of control dependencies is to separate the point where the branch operation takes effect from the branch tests. The branch instruction performs a test on a branch condition. If the test succeeds, the PC is modified, but the modification does not take effect immediately. This delayed branch allows one or more instructions following the branch to be executed in the pipeline whether the branch is taken or not.
In the MIPS CPU, the branch operation is delayed by one instruction. The MAL assembler hides the delayed branch by inserting an instruction after each branch or jump. The instruction following a branch or jump is called the delay slot. By default the assembler inserts an instruction which does nothing, a no-op.
In previous sections describing the branch instruction, it was stated that the PC was incremented when the branch was fetched and therefore the branch offset is relative to the instruction after the branch. The delayed branch means that the instruction following the branch is always executed before the PC is modified to perform the branch.

The delayed branch is a difficult topic to grasp. In the DLX 5-stage pipeline we have found it easy to misunderstand the purpose of filling the branch delay slot with a single necessary instruction. Our focus is to remove the mystery of delayed branches with examples and explanations that clarify the topic. We will consider the case where machines with delayed branches have a single instruction delay, as the Hennessey and Patterson book explains in great detail.
In some examples, it is hard to figure out why certain instructions should be placed after the branch. Also, it might be confusing to some that only one instruction would absorb the stall that would normally occur while a branch instruction is executed.
With the help of key term definitions, it will be easier to learn how to unroll a loop as well as reschedule it. Then, determine which instruction

You May Also Find These Documents Helpful

  • Good Essays

    What are the two ways in which Tier 3 instruction differs from that provided in…

    • 526 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    SD1230 Lab 1

    • 239 Words
    • 2 Pages

    2. What type of instruction is used to execute different code based on a condition? -Jumps…

    • 239 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The second category of fault changes individual instructions in the text segment. These faults are intended to approximate the assembly-level manifestation of real C-level programming…

    • 285 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Nt1310 Unit 1 Study Guide

    • 378 Words
    • 2 Pages

    The term _________________ is used to denote when instructions from only one thread can be issued at a time.…

    • 378 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 1&2 Discussion

    • 379 Words
    • 2 Pages

    Access control is typically achieved by reserving a collection of bits within the general “Flag Register” to indicate the current “access control level”. Certain instructions are restricted so that they are only legal if the “access control level” is at least some minimum value; otherwise the instruction generates an “illegal operation” interrupt.…

    • 379 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Bio208 Genetics Lab

    • 1750 Words
    • 7 Pages

    Greater reproducibility is ensured, by reducing the number of pipetting steps that can lead to…

    • 1750 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Prg 211

    • 393 Words
    • 2 Pages

    Branching is controlled by conditional test statements. The statement is executed once the test condition is met. The branch will flow in a certain direction depending on the criteria that was input. Otherwise, sequential flow of statement will be directed to other area of the program.…

    • 393 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Lab 7 Student

    • 1242 Words
    • 7 Pages

    A condition-controlled loop uses a true/false condition to control the number of times that it repeats.…

    • 1242 Words
    • 7 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Sheet01

    • 1045 Words
    • 5 Pages

    4. What is the result of the following code and where is it kept? LDAA #$15 ADDA #$13 5. Which of the following instructions is (are) illegal? a- LDAA #500 b- LDAA #50 c- LDAA #00 d- LDAA #$255 e- LDAA #$25 f- LDAA #$F5 g- ADDA mybyte , #$25 6. Which of the following instructions is (are) illegal? a- ADDA #$300 b- ADDA #$50 c- ADDA #$500 d- ADDA #$255 e- ADDA #12 f- ADDA#$F5 g- ADDA #$25 7. 8. 9. 10. Show a simple code to load values 30H and 97H into locations 805H and 806H, respectively. Show a simple code to load value 55H into locations 300H and 308H. Show a simple code to load value 5FH into Port B. Which of the following is an invalid use of the immediate addressing mode? a- LDDA #$24 b- LDAA $30 c- LDAA #$60…

    • 1045 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    To apply the stored-program concept, central processing unit (CPUs) are designed to recognize instructions encoded as bit patterns. This collection of instructions along with the encoding system is called the machine language. An instruction expressed in this language is called a machine-level instruction or, more commonly, a machine instruction.…

    • 458 Words
    • 2 Pages
    Good Essays
  • Better Essays

    In addition, assembly language allows programmers to utilize symbolic addresses to replace numeric memory addresses in binary bits to execute a command or input data. Computer specialist can link symbolic labels to an instruction or piece of data in the program. In other words, the symbolic label turns into a permanent tag for the instruction or piece of data disregarding where it populates in the program or where it relocates in the memory. However, machine language is more complicated. To perform an instruction or input data in the memory in a specific location, the computer specialist must specify the direct address. For example, “In machine language, to jump to the instruction stored in memory location 18, you must specify directly to address 18 (write JUMP…

    • 2002 Words
    • 9 Pages
    Better Essays
  • Satisfactory Essays

    Chapter 2: Data Manipulation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright © 2012 Pearson Education, Inc. Chapter 2: Data Manipulation • • • • • • 2.1 Computer Architecture 2.2 Machine Language 2.3 Program Execution 2.4 Arithmetic/Logic Instructions 2.5 Communicating with Other Devices 2.6 Other Architectures Copyright © 2012 Pearson Education, Inc. 0-2 1 Computer Architecture • Central Processing Unit (CPU) or processor – Arithmetic/Logic unit versus Control unit – Registers • General purpose • Special purpose • B Bus • Motherboard Copyright © 2012 Pearson Education, Inc. 0-3 Figure 2.1 CPU and main memory connected via a bus…

    • 783 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    The Little Man Computer

    • 752 Words
    • 4 Pages

    This instruction sets the instruction counter to the number xx, thus effectively branching to mailbox xx See the note for instruction BP…

    • 752 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    8255 INTERFACING

    • 386 Words
    • 4 Pages

    15-2 is a repeat of Program 15-1 with the checking of the busy flag. Notice that no DELAY is used the main…

    • 386 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    memory system

    • 5335 Words
    • 22 Pages

    (10−12 A). The voltage across the capacitor when it is fully charged is equal to 4.5 V.…

    • 5335 Words
    • 22 Pages
    Satisfactory Essays