S
Schüle Daniel
Guest
Hello,
first of all I am newbie to vhdl
I am playing with ghdl, learning syntax and
basic features of vhdl
since it creates a runnable executable for
simulation I was looking for a way to
let my simulation run 20 clock cycles
and then stop it (otherwise it would stay in
forever loop)
here are 2 tries, which are identical from my point of view
but the first doesn't stop simulation
architecture testbench of tb is
-- some code ..
signal run: bit := '1';
signal clk: std_logic := '0';
begin
-- first try
process
begin
wait for 20 ns; -- 1
run <= '0'; -- 2
end process;
-- second try
--run <= '0' after 20 ns; -- 3
process(clk)
begin
if run = '1' then
clk <= not clk after 1 ns;
end if;
end process;
end;
doesn't 1 block the process for 20 ns?
(and then assign '0' to run)
Regards, Daniel
first of all I am newbie to vhdl
I am playing with ghdl, learning syntax and
basic features of vhdl
since it creates a runnable executable for
simulation I was looking for a way to
let my simulation run 20 clock cycles
and then stop it (otherwise it would stay in
forever loop)
here are 2 tries, which are identical from my point of view
but the first doesn't stop simulation
architecture testbench of tb is
-- some code ..
signal run: bit := '1';
signal clk: std_logic := '0';
begin
-- first try
process
begin
wait for 20 ns; -- 1
run <= '0'; -- 2
end process;
-- second try
--run <= '0' after 20 ns; -- 3
process(clk)
begin
if run = '1' then
clk <= not clk after 1 ns;
end if;
end process;
end;
doesn't 1 block the process for 20 ns?
(and then assign '0' to run)
Regards, Daniel