Why is the PC incremented by 4 for superscalar pipelines?

Click For Summary

Discussion Overview

The discussion revolves around the increment of the Program Counter (PC) in superscalar pipelines, specifically in the context of MIPS assembly language. Participants explore the mechanics of how the PC operates in relation to instruction execution and the implications of instruction length.

Discussion Character

  • Technical explanation, Conceptual clarification

Main Points Raised

  • One participant seeks clarification on why the PC is incremented by 4 in a superscalar pipeline that executes two instructions simultaneously.
  • Another participant asks for the specific architecture being discussed.
  • A later reply identifies the architecture as MIPS and explains that the PC increments by bytes rather than instructions, noting that MIPS instructions are 32 bits (4 bytes) long.
  • Another participant agrees with the explanation, suggesting that if MIPS were a 16-bit machine, the increment would be 2 bytes per instruction instead of 1.

Areas of Agreement / Disagreement

Participants generally agree on the mechanics of the PC increment in MIPS, but there is a lack of consensus on the implications for different architectures, as one participant introduces a hypothetical scenario involving a 16-bit machine.

Contextual Notes

The discussion does not address potential variations in other architectures or the implications of different instruction lengths beyond MIPS.

Who May Find This Useful

Readers interested in computer architecture, specifically those studying instruction execution in pipelines and the behavior of the Program Counter in different architectures.

Jusamyth
Messages
2
Reaction score
0
Hello. I need some help with this question involving Pipelines. Any help would definatley be appreciative.

Why is the PC (Program Counter) is incremented by 4 for a superscalar pipeline which executes TWO instructions at a time

Thanks in Advance!
 
Computer science news on Phys.org
What architechture ?
 
MIPS assembly language
 
In MIPS, the program counter counts instructions in "bytes" instead of "instructions". In most implementations, PC<--PC+1 would move to next instruction but in MIPS, PC<--PC+1 moves to next byte.

In MIPS , each instruction is of fixed length of 32 bits or 4 bytes, which probably explains your question.

-- AI
 
That seems pretty logical. If MIPS is a 16-bit machine its "words" would consist of two bytes, so it has to skip ahead 2 per instruction and not 1.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 102 ·
4
Replies
102
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
1
Views
4K
  • · Replies 40 ·
2
Replies
40
Views
5K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K