s3034585
Full Member level 4
hi guys
i have a dought on how to perform multiple operations on a vector which is declared as signal in a architecture.
to give a clear idea the code is as follows;
if ( clk'event and clk ='1') then
if (load = '0' and load_r ='1') then
r3(22) <=r1(18) xor r2(21) xor ref_vec (63);
r3 <= r3(21 downto 0) & '0';
elsif (c3 = c1) or (c3 = c2) then
r3(22) <= r1(18) xor r2(21) xor ref_vec (63);
r3 <= r3(21 downto 0) & '0';
r3(2) <= x xor y;
end if;
i know it wont work properly because i am refering to the new value in the signal even before it is updated as it is a signal. i want to perfrom these operations one clock cycle so what is the best way to do it. becaues there are 2 left shift registers also which are updated along with r3 in the same clock cycle. but as now some addition operations has to be done on r3 how can i manage to do in the same cycle so that it is in synch with other registers....
if any further clarification is required please let me know.
thanks in advance for your help.
tama
i have a dought on how to perform multiple operations on a vector which is declared as signal in a architecture.
to give a clear idea the code is as follows;
if ( clk'event and clk ='1') then
if (load = '0' and load_r ='1') then
r3(22) <=r1(18) xor r2(21) xor ref_vec (63);
r3 <= r3(21 downto 0) & '0';
elsif (c3 = c1) or (c3 = c2) then
r3(22) <= r1(18) xor r2(21) xor ref_vec (63);
r3 <= r3(21 downto 0) & '0';
r3(2) <= x xor y;
end if;
i know it wont work properly because i am refering to the new value in the signal even before it is updated as it is a signal. i want to perfrom these operations one clock cycle so what is the best way to do it. becaues there are 2 left shift registers also which are updated along with r3 in the same clock cycle. but as now some addition operations has to be done on r3 how can i manage to do in the same cycle so that it is in synch with other registers....
if any further clarification is required please let me know.
thanks in advance for your help.
tama