Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
of operation To use the method first postulate an initial version of the EU with operational rules of EU.
Clock gen
Bus controller
Control store
1
State sequencer
5
Inst- 3 Decoder
Execution unit
BITS Pilani, Pilani Campus
0.
With architecture specification as input begin with initial execution unitrefinement- final execution unit
Once flowcharts are fairly complete derive control word format using flowchart states. After defining control word formats assign bit patterns to the control fields that minimizes control word decoders between control store and execution unit Instruction decoders are defined by flowcharts and architecture specification Completed flowcharts, control word format and initial bus specification bus controller Define logic of state sequencer (which tells what to do next)
BITS Pilani, Pilani Campus
1.
2.
3. 4.
5.
Specifications of a Processor
-Programmers Registers ( Index and pointer registers, GPRs)
-Instruction Types (data movement instructions, arithmetic and logic instructions, program control instructions)
-Addressing Modes (immediate addressing, direct addressing, register addressing, implied addressing.)
MIN Processor
Instruction Format
Opcode
displacement
Rx
Mode
Ry
Rx- First operand register Ry- second operand register Mode- Second operand addressing mode.
Addressing Modes
AB - Base ( RY) plus displacement A I - Register Indirect. RY holds the operand address AR Register Direct. Result stored in RY, for two operand instructions RY is an operand source
R0 R1 R2 R3 R4 : : RN
BITS Pilani, Pilani Campus
Operations
ADD, AND, SUB, AND, OR, XOR BZ Branch if zero bit set LOAD Second operand source and RX destination STORE POP - Post increment with register indirect only PUSH- Pre decrement with register indirect only TEST
BITS Pilani, Pilani Campus
Execution Unit
IRE Internal A Bus IRF
DO
A0
PC
T2
R0
RN
T2
ALU
DI Internal B Bus
rx a alu ry b alu
Time
t1 b ry
Parallel tasks are listed in alphabetical order In a micro coded implementation each state is one micro cycle
BITS Pilani, Pilani Campus
edb di ry b ao
di b alu rx a alu
Time
ry b ao t1 a do
Flow charts till now does not show PC incrementing and Instruction fetch
t1 b ry
pc a alu +1 alu
PC Incrementing
t1 b pc
In a microcoded controller the control word specifies the tasks in a single state Tasks are commands to external bus controller, the execution unit and state sequencer Flowcharts usually emphasize changes in sequence and concurrency for whatever the controller is doing Flowcharts show sequential state flow made up of concurrent tasks Shows address calculation sequences and operation sequences.
BITS Pilani, Pilani Campus
RM
ADD
edb irf pc b ao
edb di ry b ao di b alu rx a alu ry b ao t1 a do pc a alu +1 alu t1 b pc
Rules of Operation
-A transfer from source to bus to destination takes one state time -A source can drive upto three destination loads. For ex: the task T1 B ALU, AO, PC has three destination loads -Input to ALU are from the A (internal) bus and either K (values 0, +1, -1) or the B bus -When ALU is destination T1 automatically loaded from the ALU output at the end of state time -A transfer to AO bus activates on-chip external bus controller.
BITS Pilani, Pilani Campus
Level 1 flowcharts
Separate an instructions execution into operation tasks and house keeping tasks.
House keeping tasks, such as PC increment, next instruction fetch are common to all instructions.
ADD RX AR RY
RR ADD edb irf pc b ao pc a alu +1 alu
rx a alu ry b alu
t1 b ry
Operation tasks
ADD RX AI (RY) RM edb di ry b ao di b alu rx a alu ry b ao t1 a do Operation tasks ADD edb irf pc b ao pc a alu +1 alu
irf ire t1 b pc
House keeping tasks
Level 2 Flowcharts
Housekeeping tasks merged with the operation tasks to form level 2 flowcharts.
RR
rx a alu ry b alu
ADD
RM
ADD
edb irf pc a alu, ao +1 alu edb di ry b ao, t2 t1 a pc di b alu rx a alu irf ire t1 a do t2 b ao
In the register to register ADD example, if AO had not been accessible from A bus feedback on the EU
Feedback on controller design doing flowcharts for entire instruction set - 20 address mode sequences - 50 instruction types - 8 states per instruction 50 * 20 * 8 - size.
BITS Pilani, Pilani Campus
Divide the sequence into address mode sequence ( calculates address mode ) Execution sequence ( completes the instruction ) Share the address mode sequence Pay for time
di b alu ry a alu
edb di t1 b ao, t2
At the beginning of instruction execution, IRE is assumed to contain the current instruction. It must be loaded by the previous instruction, each instructions control word sequence fetch the next instruction.
Instruction execution begins with address mode sequence and implicitly branches into execution sequence
ADD rx a alu ry b alu edb irf pc a alu, ao +1 alu irf ire t1 a pc SUB rx a alu ry b alu edb irf pc a alu, ao +1 alu irf ire t1 a pc
BITS Pilani, Pilani Campus
t1 a ry
t1 a ry
Execution sequence for standard dual operand instructions ( ADD, AND, SUB ) are identical except for the (implied) ALU function.
They can use a common execution sequence if the opcode directly specifies the ALU operation
ADD
di b alu rx a alu t1 a do t2 b ao edb irf pc a alu, ao +1 alu irf ire t1 b pc AND edb irf pc a alu, ao +1 alu irf ire t1 a pc
BITS Pilani, Pilani Campus
di b alu rx a alu
t1 a do t2 b ao
LOAD ry a alu, rx edb irf pc a alu, ao 0 alu +1 alu irf ire t1 a pc STORE EXECUTION SEQUENCE FOR REG-REG OPERATIONS
LOAD
STORE
LOAD di b rx, t2 edb irf pc a alu, ao +1 alu irf ire t1 a pc EXECUTION SEQUENCE WITH MEMORY OPERANDS
LOAD
STORE
rx a alu, do t2 b ao 0 alu
POP edb di edb irf ry a alu,ao pc a alu, ao +1 alu +1 alu di b rx t1 a ry irf ire t1 a pc
PUSH ry a alu -1 alu rx a do t1 b ao,ry edb irf pc a alu, ao +1 alu irf ire t1 a pc
t1 b pc
BITS Pilani, Pilani Campus
PUSH ry a alu -1 alu rx a do t1 b ao, ry edb irf pc a alu , ao +1 alu irf ire t1 b pc
BITS Pilani, Pilani Campus
Branch Instruction
edb irf ry a alu,ao +1 alu Z =1 (branch) Z =0 (no branch) edb irf pc a alu, ao +1 alu irf ire t1 b pc
BITS Pilani, Pilani Campus
irf ire t1 a pc
TEST di b t2 t2 a alu 0 alu edb irf pc a alu, ao +1 alu irf ire t1 b pc EXECUTION SEQUENCE WITH MEMORY OPERANDS