11unit 3 Data Path Implementation
11unit 3 Data Path Implementation
Stages of a Datapath
• Problem: a single, atomic block which “executes an
instruction” (performs all necessary operations
beginning with fetching the instruction) would be too
bulky and inefficient.
• Solution: break up the process of “executing an
instruction” into stages, and then connect the stages
to create the whole datapath
– Smaller stages are easier to design.
– Easy to optimize (change) one stage without touching the
others.
Stages of a Datapath (2)
• There is a wide variety of MIPS instructions:
so what general steps do they have in common?
• Stages
1. Instruction Fetch
2. Instruction Decode
3. ALU
4. Memory Access
5. Register Write
Stages of a Datapath (3)
• Stage 1: Instruction Fetch.
• No matter what the instruction is, the 32-bit
instruction word must first be fetched from
memory (the cache-memory hierarchy).
• Opcode example
• ADD,SUB MUL,DIV,LOAD, STORE
Instruction Type
• Data processing:
– Arithmetic and logic instructions
• Data storage:
– Movement of data into or out of register and or
memory locations
• Data movement:
– I/O instructions
• Control:
– Test and branch instructions
Number of Addresses
• Three Address Instruction
• Instruction Comment
– SUB Y, A, B Y A - B
– MPY T, D, E TDxE
– ADD T, T, C TT+ C
– DIV Y, Y, T Y Y / T
Number of Addresses
• Two-address instructions
• Instruction Comment
• MOVE Y, A Y A
• SUB Y, B Y Y-B
• MOVE T, D T D
• MPY T, E T TxE
• ADD T, C T T+C
• DIV Y, T YY/T
Number of Addresses
• One-address instructions
• Instruction Comment
• LOAD D AC D
• MPY E AC AC x E
• ADD C AC AC + C
• STOR Y Y AC
• LOAD A AC A
• SUB B AC AC - B
• DIV Y AC AC / Y
Utilization of Instruction Addresses
(Nonbranching Instructions)