Horizontal vs. Vertical Microprogrammed Control Units: A Comparison
Understand the key differences between horizontal and vertical microprogrammed control units in computer architecture. This guide compares their approaches to generating control signals, highlighting the trade-offs between parallelism (horizontal) and control word length (vertical) for efficient instruction execution.
Horizontal vs. Vertical Microprogrammed Control Units
Control Units in Computer Architecture
A control unit (CU) is a key component of a CPU (Central Processing Unit). Its job is to generate control signals that direct the operation of other CPU components to execute instructions correctly and in the right sequence. The CU essentially acts as the "traffic controller" within the CPU, coordinating the various parts to carry out computations.
Microprogrammed Control Units
A microprogrammed control unit uses a microprogram stored in a special memory (control store or control memory) to generate control signals. Each instruction in the main program is implemented by a microroutine (a sequence of microinstructions) stored in this control memory. This approach makes it easier to design and modify complex instructions, unlike the hardwired approach.
Horizontal Microprogrammed Control Units
In a horizontal microprogrammed control unit, each bit in the control word directly controls a specific control signal. This means that a single microinstruction can control multiple operations concurrently. Each microinstruction is relatively long (more bits per instruction) because each bit in the microinstruction directly controls a separate control line. While this offers a high degree of parallelism, designing efficient microprograms can be challenging.
(An illustrative diagram of a horizontal microprogram would be included here.)
Vertical Microprogrammed Control Units
In a vertical microprogrammed control unit, the control word uses an encoded format. Each microinstruction specifies a single micro-operation, which is then decoded into individual control signals using a decoder. This results in shorter microinstructions (fewer bits per instruction) but requires additional hardware (decoders). The use of a decoder means there is less parallelism. The design and implementation of microprograms are relatively simple with this type of control unit.
(An illustrative diagram of a vertical microprogram would be included here.)
Comparing Horizontal and Vertical Microprogrammed Control Units
Feature | Horizontal Microprogrammed CU | Vertical Microprogrammed CU |
---|---|---|
Control Word Length | Longer | Shorter |
Additional Hardware | Minimal | Requires decoders |
Flexibility | Less flexible | More flexible |
Speed | Faster | Slower |
ROM Encoding | Less efficient use of ROM | More efficient use of ROM |
Parallelism | High degree of parallelism | Low degree of parallelism (0 or 1) |
Microinstruction Structure | Each bit directly controls a signal | Encoded operation; decoded to control signals |
Microprogram Design | More complex | Simpler |
Example: Calculating Control Memory Size
(The example from the original text calculating the control memory size in bytes and control word size in bits for both horizontal and vertical microprogramming, given a hypothetical control unit with 4K words, 16 flags, and 64 control signals, is included here. The calculations for both horizontal and vertical programming should be clearly shown.)
Further Comparison: Horizontal vs. Vertical
Aspect | Horizontal | Vertical |
---|---|---|
Encoding | One bit per control signal | Encoded format; requires decoders |
Control Word Size | Larger | Smaller |
Design Complexity | More complex | Simpler |
Flexibility | Less flexible | More flexible |
Sequencing | More complex sequencing logic might be needed | Simpler sequencing logic |
Conclusion
Both horizontal and vertical microprogrammed control units offer ways to implement control logic. Horizontal units prioritize speed through parallelism, while vertical units prioritize simplicity and efficiency of ROM usage.
Horizontal vs. Vertical Microprogramming
Microprogrammed Control Units
Microprogrammed control units generate control signals using a microprogram stored in a special memory unit called control store or control memory. Each instruction in the main program is executed using a microroutine (a sequence of microinstructions) from this control store.
Horizontal Microprogrammed Control Units
In a horizontal microprogrammed control unit, each bit in a microinstruction directly controls a specific hardware component or function. Each microinstruction can control several operations concurrently. This approach uses more bits per microinstruction but allows for a high degree of parallelism, leading to potentially faster execution.
Characteristics of Horizontal Microprogramming
- Longer microinstructions (more bits per instruction).
- High degree of parallelism (multiple operations per microinstruction).
- Less efficient use of ROM (read-only memory).
- More complex microprogram design.
- Increased flexibility due to independent control bits.
Vertical Microprogrammed Control Units
In contrast to horizontal microprogramming, vertical microprogramming uses an encoded format for the control signals. Each microinstruction typically specifies a single micro-operation, and a decoder circuit translates that instruction into the individual control signals. This approach results in shorter microinstructions (more efficient use of ROM) but requires additional decoding hardware and limits parallelism.
Characteristics of Vertical Microprogramming
- Shorter microinstructions (fewer bits per instruction).
- Low degree of parallelism (typically only one micro-operation per microinstruction).
- More efficient use of ROM.
- Simpler microprogram design.
- Less flexible than horizontal microprogramming.
Comparing Horizontal and Vertical Microprogramming
Feature | Horizontal Microprogramming | Vertical Microprogramming |
---|---|---|
Control Word Length | Longer | Shorter |
Hardware Complexity | Lower | Higher (decoders needed) |
Flexibility | Higher | Lower |
Speed | Faster (more parallelism) | Slower (sequential execution of micro-operations) |
ROM Efficiency | Lower | Higher |
Parallelism | High (multiple operations per microinstruction) | Low (typically one operation per microinstruction) |
Microinstruction Encoding | No encoding (direct control signals) | Encoded micro-operations; requires decoding |
Microprogram Design Complexity | More complex | Less complex |
Example: Control Memory Size Calculation
(The example from the original text calculating the control memory size and microinstruction length for both horizontal and vertical approaches is given here.)
Additional Differences
Further distinguishing features between horizontal and vertical microprogramming are:
- Sequencing: Horizontal microprogramming might need more complex sequencing logic to control the flow of micro-operations. Vertical microprogramming usually uses simpler relative addressing.
- Encoding: Horizontal microprogramming uses one bit per control signal; Vertical microprogramming employs an encoded format.
Conclusion
Both horizontal and vertical microprogramming are methods for implementing control units, each with advantages and disadvantages. The best approach depends on the specific requirements, weighing speed, flexibility, cost, and complexity.