Practical Workbook
CS-221
Computer Organization & Design
Name : _____________________________
Year : _____________________________
Batch : _____________________________
Roll No : _____________________________
Department: _____________________________
Department of Computer & Information Systems Engineering
NED University of Engineering & Technology
Practical Workbook
CS-221
Computer Organization & Design
Prepared by:
Ms. Anita Ali, Ms. Ramish Fatima, Ms. Mehwish Raza
Revised in:
February 2021
Revision 2
Department of Computer & Information Systems Engineering
NED University of Engineering & Technology
INTRODUCTION
This workbook has been compiled to assist the conduct of labs for CS-221 Computer Organization
and Design. Practical work relevant to this course aims at providing students a chance to interact with
various simulation tools to practice and learn various aspects of Instruction Set Architectures and
Computer Organization. This workbook assists instructor and student in practical realization of
theoretical concepts of the course, and provides in-depth understanding and elaborate system
programming experience. The labs are intended to be thought provoking so that students can think
out-of-the- box and have their own way of solving a problem rather than following the traditional
footsteps. This is what makes the most exciting area of Computer Organization and Design!
The Course Profile of CS-221 Computer Organization and Design lays down the following
Course Learning Outcome:
the use of simulation tools for various Instruction Set Architectures (C3, PLO-
All labs of this workbook have been designed to assist the achievement of the above CLO. A
rubric to evaluate student performance has been provided at the end of the workbook.
In the first seven labs, QtSPIM is used to give students firm grasp of assembly language of MIPS
processor, an essential component of many embedded systems. MIPS is an example of RISC
(Reduced Instruction Set Computer) design wherein every feature of ISA (e.g. number of instructions
in the instruction set, instruction formats, addressing modes) is reduced leading to a simple processor.
In next five labs, LogiSim has been introduced, which is a simulation tool for designing and
simulating digital logic circuits. It is used to construct and simulate entire CPUs for educational
purposes. Using LogiSim students can simulate datapath of MIPS processor (or its subset) and
manipulate the design for them, thus getting a profound insight of processor design according to its
Instruction Set Architecture. The last lab incorporates a cache simulator Cache 351, to help students
better understand cache mapping techniques and write policies.
CONTENT
Lab Title Page Date
Session No. Signature
No.
1 Explore data transfer instructions of MIPS assembly 1
2 Explore system calls for convenient user input/output 12
3 Practice with MIPS arithmetic & logic instructions 17
4 Explore multiplication & division operations in MIPS assembly 23
5 Explore decision making in MIPS assembly 29
6 Employ concept of looping structures in MIPS assembly 34
7 Apply modular approach & developing functions in MIPS 40
assembly
8 Simulate write port and read ports of register file in MIPS 48
datapath using LogiSim tool
9 Simulate instruction fetch module with register file and 59
ALU Module
and verify simulation results using LogiSim
10 Simulate instruction fetch module with register file and 66
ALU Module
and verify simulation results using LogiSim
11 Simulate data memory module for MIPS datapath and integrate 70
it with previously designed sub-circuit using LogiSim
12 Simulate control unit for MIPS datapath and integrate it with 73
previously designed sub-circuit using LogiSim
13 Extract various fields of real number stored in IEEE 754 binary 81
32 format
14 Illustrate cache mapping techniques & write polices using 351 87
Cache simulator
Appendix A: MIPS architecture 94
Appendix B: QtSpim (Quick referemce)
Rubrics