-- $Id$ 

-- Copyright (C) 2008-2009 FAUmachine Team <info@faumachine.org>.
-- This program is free software. You can redistribute it and/or modify it
-- under the terms of the GNU General Public License, either version 2 of
-- the License, or (at your option) any later version. See COPYING.

ENTITY test_bench IS
END ENTITY test_bench;

ARCHITECTURE tb of test_bench is
	signal s1 : boolean;
	signal s2 : boolean;
begin
	p : process
	begin
		s2 <= false;
		wait for 100 ms; -- timeout at 100 ms
		s2 <= true;
		wait on s1 until s1; -- should be at 150ms
		s2 <= false;
		wait on s1 for 100 ms; -- timeout at 250ms
		s2 <= true;
		wait on s1 until s1 for 100 ms; -- timout at 350ms
		s2 <= false;
		wait for 10 ms; -- timeout at 360 ms
		s2 <= true;
		wait on s1 until s1 for 100 ms; -- s1 at 410 ms
		s2 <= false;
		assert false report "simulation finished" severity note;
		wait;
	end process p;

	p2 : process
	begin
		s1 <= false;
		wait for 150 ms;
		s1 <= true;
		wait for 200 ms;
		s1 <= false;
		wait for 60 ms;
		s1 <= true;
		wait;
	end process p2;

END ARCHITECTURE tb;
