co2
co2
co2
Computer Instructions
Computer Instructions
Computer Instructions
Computer Instructions
To execute an instruction, the control unit of the CPU must generate the required control signal
in the proper sequence. There are two approaches used for generating the control signals in
proper sequence as Hardwired Control unit and the Micro-programmed control unit.
Hardwired Control Unit: The control hardware can be viewed as a state machine that
changes from one state to another in every clock cycle, depending on the contents of the
instruction register, the condition codes, and the external inputs. The outputs of the state
machine are the control signals. The sequence of the operation carried out by this machine is
determined by the wiring of the logic elements and hence named “hardwired”.
•Fixed logic circuits that correspond directly to the Boolean expressions are used to generate
the control signals.
•Hardwired control is faster than micro-programmed control.
•A controller that uses this approach can operate at high speed.
•RISC architecture is based on the hardwired control unit
Computer Instructions
Micro-programmed Control Unit –
The control signals associated with operations are stored in special memory units
inaccessible by the programmer as Control Words.
Control signals are generated by a program that is similar to machine language
programs.
The micro-programmed control unit is slower in speed because of the time it takes
to fetch microinstructions from the control memory.
Control Word: A control word is a word whose individual bits represent various
control signals.
Micro-routine: A sequence of control words corresponding to the control sequence
of a machine instruction constitutes the micro-routine for that instruction.
Micro-instruction: Individual control words in this micro-routine are referred to as
microinstructions.
Micro-program: A sequence of micro-instructions is called a micro-program, which
is stored in a ROM or RAM called a Control Memory (CM).
Control Store: the micro-routines for all instructions in the instruction set of a
computer are stored in a special memory called the Control Store.
Computer Instructions
Hardwired Control
The following image shows the block diagram of a Hardwired Control organization.
Computer Instructions
Hardwired Control
•A Hard-wired Control consists of two decoders, a sequence
counter, and a number of logic gates.
•An instruction fetched from the memory unit is placed in the
instruction register (IR).
•The component of an instruction register includes; I bit, the
operation code, and bits 0 through 11.
•The operation code in bits 12 through 14 are coded with a 3 x 8
decoder.
•The outputs of the decoder are designated by the symbols D0
through D7.
•The operation code at bit 15 is transferred to a flip-flop designated
by the symbol I.
•The operation codes from Bits 0 through 11 are applied to the
control logic gates.
•The Sequence counter (SC) can count in binary from 0 through 15.
Computer Instructions
Computer Instructions
•The Control memory address register specifies the address of the
micro-instruction.
•The Control memory is assumed to be a ROM, within which all
control information is permanently stored.
•The control register holds the microinstruction fetched from the
memory.
•The micro-instruction contains a control word that specifies one or
more micro-operations for the data processor.
•While the micro-operations are being executed, the next address
is computed in the next address generator circuit and then
transferred into the control address register to read the next
microinstruction.
•The next address generator is often referred to as a micro-program
sequencer, as it determines the address sequence that is read from
control memory.
Registers Involved In Each Instruction Cycle:
• Memory address registers(MAR) : It is connected to the address lines of
the system bus. It specifies the address in memory for a read or write
operation.
system bus. It contains the value to be stored in memory or the last value
fetched.