CPU DESIGN
A
CPU contains three main section: the register section, Arithmetic/logic unit (ALU)
and control unit. These section work together to perform the sequences of
micro-operations needed to perform the fetch , decode and execute cycles of
every instruction in the CPU’s instruction set.
In this tutorial we Specifying A CPU
1)
The first step in designing a CPU is to
determine its applications.
2)
A simple 4-bit processor would be powerful
enough to handle this job.
3)
Once we have determined the tasks a CPU will
perform, we must design an instructions set architecture capable of handling
these tasks. We select the instructions
a programmer could use to write the application programs and the registers these instructions
will use.
4)
We design the state diagram for the CPU. We show
the micro-operations performed during each state and the conditions that cause
the CPU to go from one state to another. A CPU is just a complex finite state
machine. By specifying the state and their micro-operations, we specify the
steps the CPU must perform in order to fetch, decode and execute every
instructions in its instruction set.
GENERIC
CPU STATE DIAGRAM
In general, a CPU perform the following sequence of operations.
·
Fetch
cycle: Fetch an instruction from memory, then go to the decode cycle.
·
Decode
cycle: Decode the instruction-that is, determine which instruction has been
fetched-then go the execute cycle for that instruction.
·
Execute
cycle: Execute the instruction, then go to the fetch cycle and fetch next
instruction.
Note : that the decode cycle does not have any states. Rather the decode
cycle is actually the multiple branches from the end of the fetch routine to
each individual execute routine.
In next tutorial we will learn about "design and implementation of a very simple cpu".