Forum Discussion
Altera_Forum
Honored Contributor
14 years agostore LSB after shift right - vhdl
Hi, In my project I need to right shift an input vector by one. For example I have A=0101. Then right shift by one I get Q=0010. Now, I want to store the LSB of the input vector in this case is...
Altera_Forum
Honored Contributor
14 years ago --- Quote Start ---
signal cnt : unsigned(1 downto 0) := "00";
process(clk)
begin
if rising_edge(clk) then
store( to_integer(cnt) ) <= A(A'low);
cnt <= cnt + 1;
end if;
end process;
--- Quote End --- Hi Tricky, Thanks for give an idea. I will try the code. Many thanks