954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Normal and delayed branch

hi there,
i was currently given a task as shown above....
however what i had was juz a small program code (in assembly) between the two..
i need something longer where i can further look into its pipelining,
becoz i still need to analyze each of the instruction cycle...
Thanks for those can help.

evios
Junior Poster in Training
60 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

Since no one has answered this...

In a normal branch, the branch test is performed and the next opcode fetched depends on the result of the test. It might be the next opcode or it might be the opcode at the address indicated by the branch.

The net result is that the next opcode to actually be executed is not fetched until after the branch test is performed. This breaks the rhythm of the processer's fetch-execute loop, meaning that time is wasted.

A delayed branch tries to speed things up by fetching (and sometimes executing) a certain number of opcodes following the branch opcode regardless of the test result.

For simple tests this can speed things up a little, and when working with assembly instructions every little bit counts.

In order to avoid nasty side-effects, the assembler will typically insert a requisite number of no-ops after the branch opcode.

Duoas
Postaholic
2,043 posts since Oct 2007
Reputation Points: 1,140
Solved Threads: 229
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You