Processor Report
Processor Report
Contents
Overall Architecture
Instruction Format
Instruction Set
Components of Processor
Running an Example
Overall Architecture
3. Instructions 8
Instruction Format
OOO OP-CODE
AAAAA RA
BBBBB RB
XXXXXXXXXXXXXXXXXXX IMMEDIATE
PAGE 1
Instruction Set
* STORE can only write to the RAM so the IMMEDTIATE value should be of the form
1XXXXXXXXXXXXXXXXXX as Chip-Select has to select RAM otherwise it will try to write on to the ROM and it
will have no effect.
PAGE 2
Components of the Processor
Following are the components along with their figures:
1. Processor Pipeline:
PAGE 3
2. Control Unit
3. Fetch Unit:
Fetch Unit increments the PC or jumps to a new address (Immediate Value) when JUMP command is
given.
PAGE 4
4. Instruction Register and Instruction Decoder:
5. ALU:
Supports Addition, Subtraction, Multiplication and Division.
6. ROM-RAM:
We write our programs on ROM. ROM and RAM are selected based on Chip Select which changes on
different operations.
ROM
PAGE 5
8. Register File (Internal Circuit):
9.
10.
PAGE 6
Running an Example
Let us perform the following example:
Initially:
Stage – 1: Fetch to IR
RA [R6]
PAGE 8
Stage – 5: R5 gets value from RZ
Values Now:
R0: 1 R1: 3 R2: 7 R3: 6 R4: 2 R5: 2 R6: 2
Stage – 1: Fetch to IR
Similar to above
i.e. R1 1 + 3 (=4)
Values Now:
R0: 1 R1: 4 R2: 7 R3: 6 R4: 2 R5: 2 R6: 2
PAGE 9
3. a3200000 in binary is 101 00011 00010 0000000000000000000
i.e. SUB R3, R4 or R4 [R3] - [R4]
Stage – 1: Fetch to IR
i.e. R4 6 - 2 (=4)
Values Now:
Stage – 1: Fetch to IR
i.e. R5 6 * 2 (=12)
Values Now:
Stage – 1: Fetch to IR
i.e. R5 12 / 4 (=3)
Values Now:
Stage – 1: Fetch to IR
i.e. R0 [ [1 + 10] ] which is 0000b location on ROM and the value there is
000000011 , therefore R0 <- 00000011 or 17
PAGE 11
7. 202c0000 in binary is 001 00000 00010 1000000000000000000
i.e. STORE R0, R5, #0 or [R0] + 0 [R5] i.e. RAM gets written at this location by [R5]
Stage – 1: Fetch to IR
Stage – 1: Fetch to IR
Stage – 2: -
Stage – 3: MUX-PCSet is Enabled and IMMEDIATE is Selected
Now the further instructions are executed from this point onwards.
PAGE 12