Chargement…
Chargement…
The module selects one 4-bit operand, adds i_carry, then outputs a 5-bit sum.
Behaviour
i_sel = "00": use i_a;i_sel = "01": use i_b;i_sel = "10": use i_c;i_sel = "11": use 0;The starter code infers a latch because one case path does not assign the operand. Fix the process without adding a clock.
| Signal | Direction | Width | Description |
|---|---|---|---|
i_sel | Input | 2 bits | Operand select |
i_a, i_b, i_c | Input | 4 bits | Unsigned operands |
i_carry | Input | 1 bit | Carry added to the operand |
o_sum | Output | 5 bits | Combinational sum |