ChipCenter Questlink
SEARCH CHIPCENTER
Search Type:
Search for:




Knowledge Centers
Product Reviews
Data Sheets
Guides & Experts
News
International
Ask Us
Circuit Cellar Online
App Notes
NetSeminars
Careers
Resources
FAQ
EE Times Network
Electronics Group Sites

Answer1


Circuit Cellar Online
THE MAGAZINE FOR COMPUTER APPLICATIONS
Circuit Cellar Online offers articles illustrating creative solutions
and unique applications through complete projects, practical
tutorials, and useful design techniques.

Archive

WHAT'S YOUR ENGINEERING QUOTIENT?

Test Your EQ•Step up to the Plate.

Problem 1—What is a delayed branch and why is it important for a programmer to know about?


Answer:

The concept of delayed branching is very common in pipelined RISC architectures. Originally, pipelined architectures simply flushed the prefetched contents of the pipeline upon encountering a branch. But RISC designers realized that by the time a branch instruction is decoded and the decision to branch is made, one or more instructions following the branch instruction have also been decoded and partially executed. RISC designers realized that they could simplify the pipeline design and increase performance by executing the next instruction or two following the branch instruction regardless of whether the branch would be taken or not. These subsequent instructions are called delay slots. If you are programming in assembly language on a processor with delayed branching, you will need to know how many delay slots exists.

Initially, you may want to code your assembly language loops with NOP instructions in the delay slots. Then, you can take a second pass at the code, moving instructions from above the branch instruction into the delay slots. Once you become more comfortable with the concept, you can skip the first step.

12-99


For questions or comments about
Test Your EQ, e-mail eq@circuitcellar.com
.
Click here to get your listing up.

Copyright © 2003 ChipCenter-QuestLink
About ChipCenter-Questlink  Contact Us  Privacy Statement   Advertising Information  FAQ