Hardwired control unit
hardwired control unit is very difficult to design and it is very
costly. Now CAD tools is used for logic design. Therefore almost all processors of today use
hardwired control unit.
Starting with a behavioral description of the control unit,
the state diagram of
micro-operations is constructed. Most states are simply driven by clock
and only transition to the next state. Some states branch to different
states depend on conditions such as testing conditional codes or decoding the
instruction.
The control circuit is implemented using Programmable
Logic Array (PLA). In general, any sequential circuit (which can
implement any state machine) can be constructed from combinational circuits
with feedback. The feedback information is the states. If the
feedback path uses no clock, the circuit is called asynchronous. If the
feedback path uses a latch with clock, the circuit is called
synchronous. Synchronous circuits are used almost exclusively for
sequential circuits today as they are easier to design and can be implemented
reliably. Most of the CAD tools handle synchronous circuits.
Asynchronous circuit has been used for the reason of speed as in
many early computer designs, for example, ILLIAC and many computers in the
class called supercomputer. But it is difficult to implement reliably
and it is still much more difficult to do systematic design of a complex
machine using asynchronous circuits. The combinational part of the control
circuit can be regarded as a memory where its content is the map of the inputs
to the outputs (states are considered to be a part of the outputs). This view
of combination circuit as a memory is called Random Access Memory model (RAM)
of computation machines.
Microprogrammed control unit
a control unit can be implemented as a
memory which contains patterns of the control bits and part of the flow
control for sequencing those patterns. Microprogram control unit is
actually like a miniature computer which can be "programmed" to
sequence the patterns of control bits. Its "program" is called
"microprogram" to distinguish it from an ordinary computer program.
Using microprogram, a control unit can be implemented for a complex
instruction set which is impossible to do by hardwired.
Microprogram approach for control unit has several advantages:
1. One computer model can be microprogrammed to
"emulate" other model.
2. One instruction set can be used throughout different
models of hardware.
3. One hardware can realised many instruction sets.
Therefore it is possible to choose the set that is most suitable for an
application.
How microprogram work
Like the RAM model, a microprogrammed control unit consists of
microPC, micromemory, output buffer and a sequencing unit. A
micromemory (sometimes called microstore) contains bit patterns that are used
to control the datapath. Each word of the micromemory is called
"microword". Each word of the micromemory is separated
into several fields used for internal control, external control, conditional
and specifies the next address. Internal control bits are the signals
that control the datapath. External control bits are the signals that
control external units such as memory (read, write), interrupt acknowledge
etc. Conditionals are the bits that are used to determine the flow
of microprogram; loop, branching, next instruction etc. Its input comes from
the datapath (usually from the conditional code register). Next address
determines the next microword to be executed.
A microprogram is executed as follow
1. a word from microprogram at the location specified by
the microPC is read out, control bits are latched at the output buffer which
is connected to the datapath.
2. if conditional field is specified and the test for
conditional is true, the next address of microprogram will come from the next
address field otherwise the microPC will be incremented (execute the next
microword).
What that has been described is called horizontal microprogram in which there
is a one-to-one relationship between internal/external control bits and the
actual control signal of the datapath (hence it is wide or
"horizontal"). The microword can have other formats. There are
several possibilities :
1. single format - one address, as just described
above.
2. single format - two addresses, each microword
contains two next addresses field, one for result of test true, the other for
result of test false.
3. multiple format, such as, one format for the control
bits without the next address field and another format for "jump on
condition" with the address field. The advantage is that the
microword can be shorter than the single format. The disadvantage is
that to "jump" will take one extra clock.
Horizontal microprogram allows each control bit to be independent
from other therefore enables maximum simultaneous events and also offers great
flexibility. It is also waste a lot bit.
For each field of microword, there may be a group of bits that
are not activated at the same time therefore they can be "encoded"
to use a fewer bit. A decoder is required to "decode"
these bits and to connect them to the datapath. This approach is
called vertical microprogram.
There are many possibilities to compact the micromemory to be as small as
possible, sometime trading off speed for space, for example, two-level
microprogram. The first level is "vertical" i.e. maximally
encoded, the microword of the level one is pointed to the "horizontal
word" of the second level. This is rather like the first level is
composed entirely from "subroutine call" and the second level is the
subroutine.
Microprogram becomes obsolete mainly because the present design
emphasizes the performance and microprogram is slower than hardwired.
The change in instruction set design toward a minimum number of clock per
instruction simplifies the instruction set to the point that microprogram is
not really required. Also the design of hardwired control unit can be
mostly automated as opposed to microprogram which must be written and
debug. Hence, for the current instruction set architecture, hardwired
control unit offers a lower engineering cost.
Equivalence of hardware and software
The definition of microprogramming is due to Wilkes, who in
1953 suggested a method for designing the control unit of a processor, based
on the use of sequence of microwords - a
microprogram - held in a read only memory
(ROM). In this context, microprogramming is generally understood as
the technique of producing interpreters for high-level language.
At that time random access memory (RAM) that was available was
much slower than the processor, leads to CISC (Complex Instruction Set
Computer) to achieve high speed the microprogram of CISC are
organised horizontally; the need to control a complex processing unit requires
each microword to consist of a large number of bits, often over 100.
Firmware, specification of a microprogram, is not an
interpretation algorithm but a logic system. The concept of
vertically organised microprogram follows that each microword is of fewer bits
than in horizontally organised microprogram. The resulting
simplicity enables a true optimization of the software to be
achieved. Firmware is the transformation and equivalence between
hardware (logic systems) and software (microprogram). This hardware-software
equivalence is a particular case of the equivalence between space and time
Micro
programmed control
Micro
programmed control is a control mechanism to generate control signals by using
a memory called control storage (CS), which contains the control signals.
Although micro programmed control seems to be advantageous to CISC
machines, since CISC requires systematic development of sophisticated control
signals, there is no intrinsic difference between these 2 control mechanisms.
Hard-wired
control
Hardwired
control is a control mechanism to generate control signals by using
appropriate finite state machine (FSM). The pair of
"microinstruction-register" and "control storage address
register" can be regarded as a "state register" for the
hardwired control. Note that the control storage can be regarded as a kind of
combinational logic circuit. We can assign any 0, 1 values to each output
corresponding to each address, which can be regarded as the input for a
combinational logic circuit.
No comments:
Post a Comment