Hardware Reference
In-Depth Information
72
if remt='0' then
73
nx_state <= armed;
74
else
75
nx_state <= wait1;
76
end if;
77
when armed =>
78
siren <= '0';
79
tmax <= 0;
80
if sen='1' then
81
nx_state <= alarm;
82
elsif remt='1' then
83
nx_state <= chirp3;
84
else
85
nx_state <= armed;
86
end if;
87
when alarm =>
88
siren <= '1';
89
tmax <= 0;
90
if remt='1' then
91
nx_state <= chirp2;
92
else
93
nx_state <= alarm;
94
end if;
95
when chirp2 =>
96
siren <= '0';
97
tmax <= chirpOFF-1;
98
if t=tmax then
99
nx_state <= chirp3;
100
else
101
nx_state <= chirp2;
102
end if;
103
when chirp3 =>
104
siren <= '1';
105
tmax <= chirpON-1;
106
if t=tmax then
107
nx_state <= chirp4;
108
else
109
nx_state <= chirp3;
110
end if;
111
when chirp4 =>
112
siren <= '0';
113
tmax <= chirpOFF-1;
114
if t=tmax then
115
nx_state <= chirp5;
116
else
117
nx_state <= chirp4;
118
end if;
119
when chirp5 =>
120
siren <= '1';
121
tmax <= chirpON-1;
122
if t=tmax then
123
nx_state <= wait2;
124
else
125
nx_state <= chirp5;
126
end if;
127
when wait2 =>
128
siren <= '0';
Search WWH ::




Custom Search