Altera_Forum
Honored Contributor
7 years agoQUESTION on Signal Assignment of same signal and measuring times in FPGA.
Dear all,
can you tell me if the following is an illegal statement in VHDL 2008. I want to count up a signal read_pointer synchronously but I am not sure if the signal assignment of the same signa plus 1 will correctly synthesized:
address_pointer : process(CLK, RESET_H)
begin
if (RESET_H = '0') then
read_pointer <= (others => '0');
elsif (rising_edge(CLK)) then
read_pointer <= read_pointer + '1';
end if;
end process address_pointer;
Or do I have to make a buffering signal like this read_pointer <= read_pointer_mem + 1 and then behind the process read_pointer_mem <= read_pointer? And I do have one further question: What is the best way to measure a span of time in FPGA. I want to measure the span of time between two data packets. My idea was to count just the clk_cycles between the packets. Are the other ways? Thank you.