Performs a Shift Right operation on the input value A. The following listing shows the VDHL description of the SHR operation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
entity SHR8Bit is Port ( Input : in BIT_VECTOR(7 downto 0); -- 8-bit input value Output : out BIT_VECTOR(7 downto 0); -- 8-bit output value Cout : out BIT -- Carry-out flag ); end SHR8Bit; architecture Behavioral of SHR8Bit is begin Cout <= Input(0); Output(0) <= Input(1); Output(1) <= Input(2); Output(2) <= Input(3); Output(3) <= Input(4); Output(4) <= Input(5); Output(5) <= Input(6); Output(6) <= Input(7); Output(7) <= '0'; end Behavioral; |