Beruflich Dokumente
Kultur Dokumente
The BASIC COMPUTER consists of Memory and Ports interfaced and interconnected to the CPU through the SYSTEM BUS. Such a
basic computer can execute Programs that are somehow loaded into the memory. Such a system needs a mechanism to sense the external
world and to communicate with it. The I/O subsystems provide such a function. I/O devices are interfaced to the basic computer via their
respective INTERFACES (adopters), which are connected to the basic computer through the LOCAL BUS and a respective PORT. (As an
example, these local busses on the Workstation and PC domain are: Legacy ISA, EISA, PCI, SCSI,...).
To provide a Long term Storage of DATA and PROGRAMS, the Storage sub-systems are also interfaced to the basic system.
Fig 1 and 2 represent a basic computer and a complete computer system respectively.
Display
CPU &Control RAM CPU & RAM
Sub System Memory Control
Subsystem
Disk
ROM
Memory ROM Keyboard
SYSTEM
BUS SYSTEM
BUS I / O and
Storage I / O & Storage
Fig 1: The basic Computer Ports Interfaces and
Consisting CPU, Short Term RAM Memory and Adopters
ROM Fig 2: A complete Computer System Local Bus
1.2 The Main Functionality of a CPU
A CPU is micro-programmed to carry out some primitive instructions, one-at-a-time. These instructions form the Instruction Set
of a particular CPU and it usually includes the following main categories:
• Input / Output and Data movement Instructions (for example: MOV AX,BX or MOV BL,10 or IN 208 or OUT
30F,etc..)
• Arithmetic Operations Instructions (such as ADD AH,BH or SUB AX, BX, etc..)
• Logical Operations Instructions (such as AND AX,A600 or SHR AL, etc..)
• Branch and Control Transfer Instructions (such as JNZ 200 or JMP [SI] or INT 21 or, CALL 300, etc..)
As one can conclude these instructions alone and on their own do not offer much in terms of real world data processing demand.
However, orderly arrangement of them into a sequence of instructions to form a program produces a functional routine that can
achieve something useful when executed.
Therefor, the CPU is connected to a memory subsystem by a computer vendor and some essential programs are written into ROM
and added to it as the Firmware (ROM BIOS). This is to enable the basic computer to execute the program which is already in the
ROM when it is turned-on and also can be further utilised to load other programs into RAM. Such a Wired-In program is called
The Instruction Cycle. It is the infinite loop that a computer goes through over and over and as the result the resident programs
are executed.
Interpret the
Fetch the Next Increment the Instruction’s OP- Execute the
Start Instruction CODE and Generate Decoded
Instruction Pointer
(Turn On) From Memory the needed Micro-Code Instruction
Signals for Execute
this Instruction
Once the computer is turned on, the System Clock starts ticking and provides the time base for each stage of the instruction cycle
that stops only after the computer is turned off.
During each cycle of this simple instruction cycle, one instruction is fetched from the memory and brought to the CPU and is
executed there.
Here we look at this process in more details. We look at the role of the system bus in the cycle.
In figure 1 and 2 we observe the system bus interconnects the memory, ports and the CPU.
In the following figure. (Fig. 4 ), the system bus is broken down into 3 buses. They are:
1. FETCH ==> Get the instruction addressed by IP in the memory and load it into MBR , thus:
1.1 IP ==>MAR
1.2 [MAR] ==> DATA BUS
1.3 DATA BUS ==> MBR
2. INCREMENT ==> Increment the IP by the increment factor interpreted from the instruction’s OPERATION
CODE (OP CODE) to get ready for next fetch, thus:
2.1 IP = IP + <INCREMENT FACTOR>
3. DECODE ==> Send the Instruction code in the MBR to IR so that IR interpret it and generate the
EXECUTION CONTROL SIGNALS needed for its execution, thus:
3.1 MBR ==> IR
3.2 IR ==> <Produce the micro code needed for the execution control at the IR’s output>
4. EXECUTE ==> Send the IR’s Output to the Seuencer to starts the execution sequence, thus:
4.1 IR ==> Sequencer
Fig. 4 A SIMPLIFIED BUS ARCITECTURED COMPUTER SYSTEM NNNN:0000
SEQUENCER
DISPLA
Display Y UNIT
Adapter
Display Port
The Simplified View of the
internal bus and main registers
of an INTEL-LIKE Micro Disk Port
Disk
Processor
Interface DISK
UNIT
INPUT / OUTPUT Keyboard
BI-DIRECTIONAL PORTS Port
DATA BUS
Local Bus Keyboard KEYBOARD
( ISA, PCI,...) Interface UNIT
Now let's view the whole process of the execution of this resident program on the following event vs entity diagram. The System Clock starts ticking and each tick is a CLK pulse (signal) that initiate the START of an EVENT. Each
event lasts a fraction of a second and termination of it is pulsed by the next CLK tick which in -turn is the start of the next event in the cycle. In the given notes titled: Notes On the Instruction Cycle, these events are enumerated as
1.1, 1.2, 1.3 for FETCH, 2.1 for INCREMENT, 3.1 and 3.2 for Decode and finally 4.1 for EXECUTE. Note that the following diagram represents 2 full cycle for execution of 2 instructions.
BL 25
AL ???? 20
CLK
FETCH DECODE
2.1 INC.
EXECUTE