Practical 7
Practical 7
Practical-7
Theory:
At the top level a computer consists of a CPU (central processing unit), memory, I/O
components, with one or more modules of each type. These modules are interconnected in a
specific manner to achieve the basic functionality of a computer i.e. executing programs. At
the top level a computer system can be described as followes:
describing the external behavior of each component i.e the data and the control signals
that ir exchanges with other components
describing the interconnection structure and the controls required
We are considering the Von Neumann architecture. Some of the basic features of this
architecture are as follows:
CPU exchanges data with memory. For this CPU uses two internal resisters.
Following is a block diagram of a basic computer system:
Memory address register (MAR) which specifies the address for the next read or write
2CEIT507: Computer Architecture & Organization Practical-6
Memory buffer register (MBR) which contains the data to be written into memory or
receives the data read from memory
I/O buffer (I/O BR) register is used for the exchange of data between an I/O module and
the CPU
An I/O module transfers data from external devices to CPU and memory and vise versa
After fetching an instruction, processor execute the instruction by doing some processing on
the data which may involve arithmetic and logic unit (ALU), specified by the instruction, then
processor writes back the result (if any) to the memory.
Procedure:
Procedure to perform the experiment:CPU Design
1. Start the simulator as directed.This simulator supports 5-valued logic.
2. To perform the experiment on the given modules, we need the CPU, the working memory
with a program and data loaded, a clock input, Bit switch(to give input,which will toggle its
value with a double click), Bit displays(for seeing output), wires.
3. Load memory: click on the load memory button in the left pane. you can either load the
memory by filling the form or you can directly load the program form a text file. The memory
provides 4-bit address space and 12 bit data word, thus providing 16 memory address starting
from 0000 to 1111. For loading from file, the file should contain only binary values, it must
contain 16 lines, each line containing the content to be stored in the corresponding memory
address. For example, content of first line will be loaded to the 0000 address of the memory,
similarly, the second line will correspond to the 0001 address and so on, finally the content of
last line will be fed to the 1111 address. The progrm should use self loop for halting, for
example, the instruction stored at address 1010 will cause self loop execution, if it content of a
2CEIT507: Computer Architecture & Organization Practical-6
has -1 in binary format (in 2'scomplement), the content of b has 0 and c is 1010, then once the
execution reaches to this 1010 address, it will finally point to itself.
4. Instantiating the memory: after loading the memory, click on the memory component from
the computer design drawer in the palette of the simulator then click on the position of the
design editor where you want to put the component(no drag and drop, simple click will serve
the purpose).
5. The pin configuration of the component is shown whenever the mouse is hovered on any
canned component of the palette or pressing the show pin configuration button on the toolbar
will show it constantly in the left pane. Pin numbering starts from 1 and from the bottom left
corner(indicating with the circle) and increases anticlockwise.
7. Instantiate the CPU from the computer design drawer in the palette of the simulator then
click on the position of the design editor where you want to put the component.
8. To connect any two components select the Connection menu of Palette, and then click on
the Source terminal and click on the target terminal. According to the following diagram
connect all the components. Connect the memory outputs to the input terminals of the CPU,
specified datapath outputs to the inputs of the controller, the clock input, Bit switches with the
inputs and Bit displays component with the outputs (from Display and Input drawer of the
pallet,if it is not seen scroll down in the drawer). After the connection is over click the
selection tool in the pallete.
9. Start clock and observe the behavior of the CPU.See the content of memory by clicking
show memory button in the left pane. Observe how the program is executing sequentially and
modify the data content as per the program.
2CEIT507: Computer Architecture & Organization Practical-6
Objective:
Our main objective for this experiment is to show the basic top level functionality,
organizationand architecture of a computer.This top level structure and function of a basic
computer isimportant because of its explanatory power in understanding the nature of a
computer. A graspon these basic structure and functionality will provide insight into system
bottolnecks,alternative pathways. Because in many cases, requirement of greater system
power and failsafecapabilities are achieved by changing the system design rather than
changing the speedand reliability of individual components. So we have designed a single
instruction CPU whichcontains a controller. A working memory has been given to examine
the behavior of the CPU.The memory will contain the program in binary format which will be
executed by the CPU.Through this, students can observe the behavior of a basic CPU and as
well as a computer. The I/O modules have not been included in the system for the purpose of
symplicity.
Test plan :
Load the memory according to the following figure, then start clock and observe the behavior
of the CPU. See the content of memory by clicking show memory button in the left pane.
Observe how the program is executing sequentially and modify the data content as per the
program.
2CEIT507: Computer Architecture & Organization Practical-6
2) Loading Memory :
2CEIT507: Computer Architecture & Organization Practical-6