ENTITY edemo IS
port(
S1:inout bit:= '0';
S2:inout bit:= '0';
OUT1:out bit;
OUT2:out bit;
OUT3:out bit;
OUT4:out bit
);
END ENTITY edemo;
ARCHITECTURE ademo OF edemo IS
BEGIN
p1: PROCESS IS
begin
WAIT for 10 ps;
S1 <= '1'; -- This assignment is the driver for S1
S2 <= '1'; -- This has no effect because of the assignment later in this process
OUT1 <= S1; -- Assigns ’1’, the value assigned above
OUT2 <= S2; -- Assigns ’0’, the value assigned below
S2 <= '0'; -- This assignment overrides the previous one since it is the last assignment to this signal in this process
OUT3 <= S1; -- Assigns ’1’, the value assigned above
OUT4 <= S2; -- Assigns ’0’, the value assigned above
WAIT ON S1, S2;
end process;
END ARCHITECTURE ademo;