Differentiate between hardwired and micro programmed control unit. Explain each component of hardwired control unit organization.
Differentiate between hardwired and micro programmed control unit. Explain each component of hardwired control unit organization.
Quick answer
In a hardwired unit, a fixed circuit takes the instruction and the clock and produces the control signals.
Difference between hardwired and microprogrammed control
| Point | Hardwired control | Microprogrammed control |
|---|---|---|
| Method | Control signals are made by logic gates and flip-flops | Control signals are read from a control memory |
| Speed | Fast | Slower, as it needs memory reads |
| Design | Complex, uses logic design and state tables | Simple and regular, like writing a program |
| Changes | Hard, the wiring must change | Easy, just change the microprogram |
| Cost | Costly for large instruction sets | Cheaper for complex instruction sets |
| Used in | RISC processors | CISC processors |
| Error fixing | Difficult | Easy |
Components of the hardwired control unit
- Instruction register (IR): holds the instruction being run. Its opcode bits go to the decoder.
- Instruction decoder: a decoder, for example 3 to 8, turns the opcode into one active line $D_0$ to $D_7$. Each line means one instruction.
- Timing unit: it has a clock, a sequence counter (SC) and a 4 to 16 decoder. It gives timing signals $T_0, T_1, T_2$ and so on, one per clock pulse, so each step gets its own time slot.
- Flag and condition inputs: the status flags such as zero, carry and overflow also go into the circuit, because some signals depend on them.
- Control logic gates (combinational circuit): AND, OR and NOT gates combine the decoder lines, the timing signals and the flags. The output is the set of control signals that go to the ALU, registers, buses and memory.
- Control signal outputs: these signals open the paths and tell the units what to do in that clock pulse.
For example, the signal to load AR from PC happens in the fetch step at $T_0$ of every instruction:
$$AR\text{ load} = R'T_0 + R'T_2 , D_7 I'$$
This kind of Boolean equation is written for each signal and then built with gates.
IR --> [Decoder] --D0..D7--+
v
Clock -> [SC] -> [T0..T15]-> [Control logic ] --> control signals
^ [ gates ]
Flags ---------------------+
Because the signals come straight from gates, the unit works at the speed of the hardware. But the design must be done again if an instruction is added.
Which one to choose. A hardwired unit gives the highest speed, so it is the choice for RISC machines with a small and fixed set of instructions. A microprogrammed unit costs less to design and modify, so it suits CISC machines with hundreds of complex instructions. Many real processors use a mix: simple instructions are hardwired and rare, complex ones are microcoded.
Note on the sequence counter. When an instruction finishes, the sequence counter is cleared by a control signal. This makes the timing signals start again at $T_0$ for the next instruction. Without this reset the timing would run on into the wrong time slots.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.
Up nextCalculate the page fault for a given string with the help of LRU & FIFO page replacement a