wrote:
> I'm glad you don't see the same problem, because that would've puzzled
> others as well.
>
> Would you mind posting what your testbench looks like? I initially
> suspected my clock generation as Zara suggested, but that doesn't quite
> make sense to me. I'll use process of elimination on differences and
> see what's causing this. I'll post the result as well.
>
> TIA.
>
Watch out for line wrap...
library ieee ;
use ieee.std_logic_1164.all ;
use ieee.std_logic_textio.all ;
use std.textio.all ;
entity test is
end entity test;
architecture tester of test is
constant CLK_PRD : Time := 10 nS;
signal Clk : std_logic;
signal sig1 : std_logic;
begin
tester_p: process is
file output : text open write_mode is "test.out";
variable L : line;
begin
sig1 <= '0';
wait for 1 uS;
wait until rising_edge(clk);
write (L, string'("1st rising edge : " & time'image(now)));
writeline (output, L);
sig1 <= '1';
write (L, string'("1st rising edge (again) : " & time'image(now)));
writeline (output, L);
-- Wait for the next rising edge, and bring 'sig1' low
wait until rising_edge(clk);
write (L, string'("2nd rising edge : " & time'image(now)));
writeline (output, L);
sig1 <= '0';
-- Wait for the 3rd rising edge
wait until rising_edge(clk);
write (L, string'("3rd rising edge : " & time'image(now)));
writeline (output, L);
end process tester_p;
-- Generate the clock.
clk_gen: process
begin
loop
Clk <= '1' after CLK_PRD/2, '0' after CLK_PRD;
wait for CLK_PRD;
end loop;
end process clk_gen ;
end architecture tester;