Question

1. Assume that individual stages of the datapath have the following latencies: IF ID EX MEM...

1. Assume that individual stages of the datapath have the following latencies:

IF

ID

EX

MEM

WB

250 ps

350 ps

150 ps

300 ps

200 ps

Also, assume that instructions executed by the processor are broken down as follows:

alu

beq

lw

sw

45%

20%

20%

15%

  1. What is the total latency of an ?w instruction in a pipelined and non-pipelined processor?
  2. Instead of a single-cycle organization, we can use a multi-cycle organization where each instruction takes multiple cycles but one instruction finishes before another is fetched. In this organization, an instruction only goes through stages it actually needs (e.g., ST only takes 4 cycles because it does not need the WB stage). Compare clock cycle times and execution times with single cycle, multi-cycle, and pipelined organization.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-----------

a).
Total latency of lw instruction in a non-pipelined processor
is equal to the clock cycle time:
===> 250 + 350 + 150 + 300 + 200 = 1250 ps.

Total latency of lw instruction in a pipelined processor is the clock cycle multiplied by the number of stages:
===> 350 x 5 = 1750 ps.

b).

single cycle multi-cycle pipelined
clock cycle time 1280 ps 380 ps 380 ps
execution time (cycles) 5 X 3.9 X ~ X

Where X is the total number of instructions of the program and for pipe-lined, we assume no data dependency and no stalls.

Add a comment
Answer #2

To calculate the total latency of an instruction in a pipelined and non-pipelined processor, we need to consider the latencies of each stage in the datapath and the breakdown of instructions executed by the processor.

Given the following latencies for each stage in the datapath: IF (Instruction Fetch): 250 ps ID (Instruction Decode): 350 ps EX (Execute): 150 ps MEM (Memory Access): 300 ps WB (Write Back): 200 ps

And the breakdown of instructions executed by the processor: ALU: 45% BEQ: 20% LW: 20% SW: 15%

Let's calculate the total latency for each organization:

  1. Single-Cycle Organization: In a single-cycle organization, all instructions take the same amount of time to complete, regardless of their type. Therefore, the total latency for any instruction is the sum of the latencies of all stages.

Total latency for an instruction = IF + ID + EX + MEM + WB = 250 ps + 350 ps + 150 ps + 300 ps + 200 ps = 1250 ps

  1. Multi-Cycle Organization: In a multi-cycle organization, each instruction takes a variable number of cycles based on its type. From the given breakdown, we can determine the number of cycles needed for each instruction type.

ALU: 45% of instructions = 0.45 * Total Instructions BEQ: 20% of instructions = 0.20 * Total Instructions LW: 20% of instructions = 0.20 * Total Instructions SW: 15% of instructions = 0.15 * Total Instructions

To determine the total latency, we multiply the number of cycles needed for each instruction type by the corresponding latencies of the stages involved.

Total latency for an instruction = (ALU cycles * (IF + ID + EX + MEM + WB)) + (BEQ cycles * (IF + ID + EX + MEM)) + (LW cycles * (IF + ID + EX + MEM + WB)) + (SW cycles * (IF + ID + EX + MEM))

Assuming the total instructions executed is 100 (for easy calculation purposes), we can substitute the percentages and calculate the total latency.

Total latency for an instruction = (0.45 * 100 * (250 + 350 + 150 + 300 + 200)) + (0.20 * 100 * (250 + 350 + 150 + 300)) + (0.20 * 100 * (250 + 350 + 150 + 300 + 200)) + (0.15 * 100 * (250 + 350 + 150 + 300))

Total latency for an instruction = 100,000 ps (or 100 ns)

  1. Pipelined Organization: In a pipelined organization, multiple instructions can be in different stages simultaneously, overlapping their execution. However, the first instruction still experiences the full latency, while subsequent instructions benefit from pipeline parallelism.

Assuming an ideal pipeline without any stalls or hazards, the clock cycle time in a pipelined processor is determined by the longest stage latency, which is MEM (300 ps) in this case.

Clock cycle time in a pipelined processor = MEM latency = 300 ps

To calculate the total latency of an instruction, we can assume that each instruction takes the number of cycles equal to the number of stages it needs to pass through, including the WB stage.

Total latency for an instruction = MEM latency = 300 ps

Comparing the Clock Cycle Times and Execution Times:

  1. Single-Cycle Organization: Clock cycle time


answered by: Mayre Yıldırım
Add a comment
Know the answer?
Add Answer to:
1. Assume that individual stages of the datapath have the following latencies: IF ID EX MEM...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 01. The logic latencies for individual stages in a processor are listed in the following table....

    01. The logic latencies for individual stages in a processor are listed in the following table. IF ID EXE MEM WB 350 ps 400 ps|370 ps450 ns 200 ps (a) What is the minimum clock period for a pipelined and a non- pipelined processor using these parameters? Please show all work. (b) What is total latency of a MIPS lw instruction in a pipelined processor? What is the throughput of a large series of lw instructions with no stalls or...

  • In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise as...

    In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath have the following latencies: IF | ID | EX | MEMIwB 200ps 400ps 150ps 250ps 200ps Also, assume that instructions executed by the processor are broken down as follows: alu beqIwSW 45% 20% 20% 15% 3.1 What is the clock cycle time in a pipelined and non-pipelined processor? 3.2 What is the total latency...

  • In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems...

    In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath have the following latencies: [17pts] 3. IF ID EEX MEM | WB 250ps 350ps 150ps300ps200ps a. what is the clock cycle time in a pipelined and non-pipelined (ie, single cycle) processor? what is the total latency of one lw instruction in a pipelined and non-pipelined (i.e., single cycle) processor? b. What is the total...

  • (Pipelining 20%) The 5 stages of a processor have the following latencies: Fetch Decode Execute Memory...

    (Pipelining 20%) The 5 stages of a processor have the following latencies: Fetch Decode Execute Memory Write-back 250 350ps 300ps 500ps 80ps a. If the processor is non-pipelined: what is the clock cycle time for the processor? What is the latency of an R-type instruction in the processor? b. If the processor is pipelined: What is the clock cycle time for the processor? What is the latency of an R-type instruction in the processor? C. If you could split one...

  • Assume that individual stages of the data path have the following latencies What is the clock...

    Assume that individual stages of the data path have the following latencies What is the clock cycle time in a non-pipelined and pipelined system respectively? EX RAIE WB IF ID 250 ps 320 ps 500 ps 120 ps 150 ps

  • 4.10 In this exercise, we examine how resource hazards, control hazards, and Instruction Set Arch...

    4.10 In this exercise, we examine how resource hazards, control hazards, and Instruction Set Architecture (ISA) design can affect pipelined execution. Problems in this exercise refer to the following fragment of MIPS code: sw r16,12(r6) lw r16,8(r6) beq r5,r4,Label # Assume r5!=r4 add r5,r1,r4 slt r5,r15,r4 Assume that individual pipeline stages have the following latencies: (NOTE THESE ARE DIFFERENT VALUES THAN THE ONES IN OTHER SIMILAR QUESTIONS) IF ID EX MEM WB 250ps 100ps 175ps 150ps 200ps 4.10.4 [10] <§4.5>...

  • The latencies of individual stages in five-stage MIPS (Microprocessor without Interlocked Pipeline Stages) Architecture are given...

    The latencies of individual stages in five-stage MIPS (Microprocessor without Interlocked Pipeline Stages) Architecture are given below. Instruction Instruction Fetch Register Read Arithmetic Logic Unit (ALU) Memory Access Register Write Latency 200ps 100ps 200ps 300ps 100ps a. (10 pts) What is the clock cycle time in a pipelined and non-pipelined processor? Pipelined version : ______________ Non-pipelined version : ______________ b. The classic five-stage pipeline MIPS architecture is used to execute the code fragments. Assume the followings: Register write is done...

  • (60 points) The following instructions are executed on the 5-stage MIPS pipelined datapath. add r...

    Computer architecture help: (60 points) The following instructions are executed on the 5-stage MIPS pipelined datapath. add r5,r2, r1 lw r3, 4(r5) lw r2, 0(r2) or r3, r5, r3 sw r3, 0(r5) (a) (20 points) List the data hazards in the above code. For each data hazard identified, clearly mark the source and the destination. For example you can say, there is a data hazard from instruction X to instruction Y on register Z. (b) (20 points) Assume there is...

  • The datapath for 5-stage MIPS pipelined architecture is given below. IF/D ID/EX EX/MEM MEM/WB >Add Add...

    The datapath for 5-stage MIPS pipelined architecture is given below. IF/D ID/EX EX/MEM MEM/WB >Add Add Add result Shift left 2 Address Instruction memory Read Read register 1 data Read register "Registers Read Write data 2 register Write data SALU ALU result Address Read data Data memory Write data 16 Sign- 32 extend Choose all the components that generate a useful result during the execution of the following instruction: Choose all the components that generate a useful result during the...

  • The datapath for 5-stage MIPS pipelined architecture is given below. IFAID ID/EX EX/MEM MEM/WB > Add...

    The datapath for 5-stage MIPS pipelined architecture is given below. IFAID ID/EX EX/MEM MEM/WB > Add Add Add result Shift left 2 Lo-o PC Address Read register 1 Read Read data Instruction memory register Registers Read SALU Zero ALU result Read Address data data 2 Write register Write data Data memory Write data 16 Sign- extend Choose all the components that generate a useful result during the execution of the following instruction: ADD R1, R2, R3 O 1. Program Counter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT