[an error occurred while processing this directive]
|
-- This process detects the start and stop conditions.
-- by using SDA as a clock.
start_det: process(sda, reset, state)
begin
if reset = RESET_ACTIVE or state = HEADER then
detect_start <= '0';
elsif sda'event and sda = '0' then
if scl /= '0' then
detect_start <= '1';
else
detect_start <= '0';
end if;
end if;
end process;
stop_det: process(sda, reset, detect_start)
begin
if reset = RESET_ACTIVE or detect_start = '1' then
detect_stop <= '0';
elsif sda'event and sda /= '0' then
if scl /= '0' then
detect_stop <= '1';
else
detect_stop <= '0';
end if;
end if;
end process;
E-mail: info@telesys.ru