Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

COMPUTER SYSTEM

ARCHITECTURE

A PRESENTATION ON HOW TO MAKE A MACHINE IN CPUSIM

SUBMITTED TO :: DR ANUJA SONI

ANKITA SAHA 19HCS4069


INTRODUCTION
CPU SIM is a software development
environment for the simulation of simple
computers.. With this application the user is
able to simulate new or existing simple CPUs.
Users can create new virtual CPUs with custom
machine language instructions, which are
implemented by a sequence of micro
instructions. CPU Sim allows the user to edit
and run assembly language programs for the
CPU being simulated.
Allocating memory
 Computer instruction are normally stored in
consecutive memory locations and are executed
sequentially one at a time.
 The memory unit has capacity of 4096 words and
each word contains 16 bits if memory is defined as
4096×16
 12 bits of an instruction word are needed to specify
the address of an operand.
 This leaves 4 bits for operation part (op code ) of the
instruction in unsinged bit format and 3 for operation
part of instruction in singed bit format one bit is to
specify a direct and indirect address.
INSTRUCTION CYCLE

CPU Simulator executes the series of instructions through the


repeated execution of fetch sequence and instruction cycle
INSTRUCTION CYCLE CONSISTS OF :
* FETCH
* DECODE
* CHECK FOR THE DIRECT AND INDIRECT ADDRESS
* EXECUTE THE INSTRUCTION
FLOWCHART OF INSTRUCTION CYCLE
STEPS FOR ADDING
TWO INTEGERS IN
CPU SIM
Before starting
REGISTERS ARE DEFINED
RAM and CONDITION BIT are defined
Write the text file
MICRO-INSTRUCTIONS are provided
FETCH SEQUENCE is provided
MACHINE INSTRUCTION FOR EACH
COMMAND IN TEXT FILE
DEFINING FIELDS
FORMAT FOR FIELD ALLOCATION
HOW TO SAVE THE FILE
 Text file shoul be saved with the extension .a
 Machine shoul be saved with the extension .cpu
in the compute.
 INDEXING:

 In this program indexing is done from left to


right. One should be careful while mentioning
indexes in the instructions as it should match the
direction Set up in the machine.
POST EXECUTION
THANK YOU

SUBMITTED BY

ANKITA SAHA
19HCS4069

You might also like