677adcc290db7CA Lab11 Fall2024
677adcc290db7CA Lab11 Fall2024
Lab -11
Student’s Name
Roll No.
Date Performed
Marks Obtained
1|Page
Fall 2024 CA Lab-11
Document History
Rev. Date Comment Author
1.0 23/10/2023 Initial draft Engr. Maria Rehman
1.1 06/10/2024 Modified Engr. Majid Ali
Instructions
Objectives
1. Understand the transition from single-cycle to pipelined processor architecture.
2. Implement the ID/EXE & EXE/MEM stages of the RISC-V pipeline:
3. Simulate and verify the functionality of the implemented pipeline stages.
Learning Outcomes
This lab satisfies the following learning outcomes of the course:
CLO2: Assembles components of microprocessors using various tools.
CLO3: Present concise and comprehensive technical reports.
2|Page
Fall 2024 CA Lab-11
Introduction
In modern processors, pipelining is a fundamental technique used to improve instruction
throughput by overlapping the execution of multiple instructions. Unlike single-cycle
processors, where each instruction is executed in a single clock cycle, pipelining divides the
instruction execution process into multiple stages. Each stage handles a specific part of the
instruction execution, allowing several instructions to be processed simultaneously, one in
each stage.
1. Instruction Fetch (IF): The instruction is fetched from memory using the Program
Counter (PC).
2. Instruction Decode (ID): The fetched instruction is decoded, and necessary control
signals are generated. Registers are also read in this stage.
3. Execution (EX): Arithmetic or logical operations are performed, and the effective
address is calculated for memory operations.
4. Memory Access (MEM): Data is read from or written to memory for load and store
instructions.
5. Write-Back (WB): The results of the instruction are written back to the register file.
In this lab, we begin the transition from a single-cycle processor to a pipelined design by
implementing the instructions decode and execution stage (ID/EXE) and execution and
Memory stage (EXE/MEM)..
Laundry Example
3|Page
Fall 2024 CA Lab-11
Aisha, Bilal, Fatima and Hamza each have dirty clothes to be washed, dried, folded and put
away. The washer, dryer, folder and storer each take 30 minutes for their task. Sequential
laundry takes 8 hours for four loads of washing, while pipelined laundry takes just 3.5 hours.
We illustrate the pipeline stages of different loads over time by showing copies of the four
resources on this two-dimensional timeline, though in reality, we have just one of each
resource.
Important Notes
5|Page
Fall 2024 CA Lab-11
Conclusion
6|Page
Fall 2024 CA Lab-11
7|Page
Fall 2024 CA Lab-11
Domain Criteria Excellent (10) Good (8-9) Satisfactory (6- Improvement(4-5) Marks
7) Obtained
Successfully Successfully Had difficulty Did not complete tasks
Building completed tasks with completed tasks completing tasks and and struggled with lab
Psychomotor Processor understanding and but with some used lab equipment equipment
(P4) (CLO-2) good use of understanding with errors.
equipment. gaps
Presented outstanding Presented Provided basic Unable to answer
Report and detailed reports. comprehensive answers in reports questions and had
Writing
reports with some with limited significant knowledge
Affective (A2)
(CLO-3)
minor gaps. knowledge gaps. gaps.
8|Page