Escolar Documentos
Profissional Documentos
Cultura Documentos
Fetch
Instruction
Interpret
Instruction
Process Data
Write Data
End
Architectural Attributes
Instruction Set
Number of bits used to represent various data
I/O mechanisms
Techniques for addressing memory
Data Processing
Data Storage
Data Movement
Control
Control Mechanism
Structure
The way in hic the components are interrelated
The computer interacts in some fashion with its external environment
In general all of its linkages to the external environment can be classified
as peripheral devices or communication lines
Simple Description of a computer
Peripherals Computer storage, processing Communication lines
Main Memory
System Interconnection
CPU
CPU
Registers
ALU
Internal Interconnection
Control Unit
Control Unit
Sequential Logic
Control Memory
SAP-1 (Simple as possible) all registers outputs to the W-bus are three state; this
allows orderly communication and data transfer. All register outputs not connected
to the W-bus are two states, these output continuously drive the boxes they are
connected to.
-
Program Counter (PC) counts from 0000 to 1111, equivalent to 0 through F. the pc
reset to 0 before each run
Memory Address Registers (MAR) receive binary address from the program
counter
Read Only Memory (ROM) you can store any 16 words of 8 bits of data or
instructions
Instruction Registers (IR) gets the data or information from the ROM and then
loaded into the IR
Control Unit (CON) an automatic data processing machine which instruct all of the
registers
Accumulator (A) it has two outputs, one directly goes to the ALU while the other
output goes to the W-bus
ALU (Arithmetic Logic Unit) it performs all of the operation such as addition and
subtraction
B-register (B) temporary storage when accumulator has a data/information. H is
also connected to the ALU
Output Registers (O) it gets the answer to the accumulator then shows it to the
binary display
Binary Display (D) shows the answer in binary form of LEDS
PC
8
A
8
MAR
4
8
4
RO
M
ALU
8
8
8
IR
O
8
CON
12
Instruction Set step by step instructions into the memory before the start of a
computer run
LDA means load the accumulator
Ex. LDA R8; R8=1111 0000
Then A=1111 0000
ADD means to add a specific content to the content of the accumulator
Ex. ADD R9; R9 = 0000 0011; A=0000 0010 then the content of R9 will go to the B
register; B=0000 0011 then ALU forms the sum of A and B: ALU=0000 0101 Lastly
ALU contents are loaded into the accumulator A=0000 0101
SUB means subtract a specific content to the content of the accumulator
Ex. SUB Rc; Rc=0000 0011; A=0000 0111 then the content of Rc will go to the B
register B=0000 0011 then ALU forms the subtraction of A and B ALU=0000 0100
lastly ALU contents are loaded into the Accumulator A=0000 0100
OUT tells the computer to transfer the accumulator contents to the output
registers
HLT stands for Halt
-
0000
ADD
0001
SUB
0010
OUT
1110
HLT
1111
Machine Cycle
*Cycle
takes place every time a program runs
- an instruction need 6 cycles to be completed
*Fetch Cycle
- is the first 3 cycle that takes place every time an instruction was executed
*Execution Cycle
- the last 3 cycles which takes place after the fetch cycle
Ring Counter
-
The ring counter which is part of SAP1s control unit has an output of
T=T6T5T4T3T2T1 at the beginning of the computer run, the ring word is
T=000001
T1: 000 001
T4: 001 000
T2: 000 010Fetch T5: 010 000 Execution
T3: 000 100Code T6: 100 000 Code
Then the ring resets to 000001 and the cycle repeats. Each ring word
represents one machine phase
Each instruction is fetched and executed during the 6 phases
Fetch Cycle
address
Field
field
Assuming that the instruction register (IR) has been loaded with LDA R9
IR = 0000 1001
The instruction field goes to the control unit (CON) where it is decoded
The address field goes w/ MAR
Note: Ei and Lm are active > after this state the contents of the registers will
be:
CON : 0010 0100 0000 (Base 2)
CON : 240H
IR: 0000 1001
MAR: 1001
>LDA Runtime (T5)
> Er and La go low. This means the addressed data word in the ROM will be
loaded into the accumulator (A)
> after this state the contents of the register will be:
CON: 0001 0010 0000
CON 120H
A: 0000 1001
Instruction Cycle
The # of T states needed to fetch and execute and instruction
WBU
S
ALU
D
>retrieves
B
the data from
8 the
registers
O
L=load
8
8
>opens the
registers to
receive data
E= enable
8
12
Data transfer between the main memory and the CPU registers
Arithmetic and logic operations on data
Program sequencing and control
I/O transfers
*Fields the bits of binary instructions that are divided into groups
- common fields found in instruction format
> Operation Code Field that specifies the operation to be performed
> Address Field that designates either a memory address or a code for
choosing a processor registers
> The operation code field of an instruction is a group of bits that define
various processor operations
*Address Field operators specified by computer instructions are executed on some
data stored memory or in processor registers
- Operands rending in memory are specified by their addresses
- The number of address field in the instruction format of a computer depends on
the internal organization of its registers
Types of Organization
Single accumulator organization
Multiple accumulator organization
Stack organization
*Single Accumulator Organization > all operations are performed with the implied
accumulator registers
> The instruction format in the type of computer uses one memory address field
Ex. ADDX
*Multiple Accumulator Organization > a processor unit with multiple register usually
allows for greater programming flexibility
> The instruction format in the type of computer needs B register
*Stack Organization > computers with stack organization have instructions that
require one address field for transferring data to and from the stack
Ex. PUSH, POP
>Notations<
OPER 1
Data Source 1
OPER 2
Data Source 2
OPER 3
OPER 1
Data Source
OPER 2
Destination
OPER 1
Data Source