Problem 4.
Q
P3
Shift_load
QO
CLK
Q
Write the complete hierarchical VHDL code for the four-bit shift register shown above. Use the signal names shown. When shift_load is 1, parallel data is loaded. When shift_load is 0, data is shifted from left to right, i.e., serial data is shifted into the most significant bit.
Write the complete behavioral code for one stage of the shift register.
[10]
Page 6 of 7
Prob.4 (cont) b. Write the complete hierarchical code for the four-bit shift register by creating a component for one stage of the register and connecting the four stages using PORT MAP statements. [15]