Write a VHDL program to create an n-bit register with the following specificatio
ID: 1715420 • Letter: W
Question
Write a VHDL program to create an n-bit register with the following specifications.
The input signals must be...
1) select 2) clock 3) enable_out 3) date_in
The output signal is data_out
The enable_out signal enables the contents of the register to be placed on the data_out bus. If enable_out is 0 then the register is disconnected from the data_out bus (high impedance).
The data_in and data_out busses are of size n.
The select lines control the register operations. The register must perform the following operations, which are all synchronous with the clock. These operations are performed regardless of the value of enable_out.
Operations 1)load 2) shift_left 3)shift_right 4) rotate_left 5) rotate_right
To accomplish this you should create a new data type that can have the following 5 values
Values: 1) Load 2) shift_left 3) shift_right 4)rotate_left 5) rotate_right
The select input should be a signal of the data type you create.
To accomplish this task you should create two VHDL files
1) a file that is a package which contains the new data type you created
2) the file with the multifunction register code. (In the entity the select input can be listed as having the data type you created in your package).
The architecture should have one process that will generate the flip-flops (i.e. a registered process). In that same process you should use a case statement that implements the five different operations.
Note: Do not use bit as a data type, instead use STD_LOGIC