How would I go about doing the following in Verilog Design

How would I go about doing the following in Verilog:

   •   Design a system that will turn on the light as the first person enters a room and turn off the light as the last person leaves. Assume that there is a single door and only one person can enter or leave the room at a time. Use photocells (or similar sensors) to detect a person entering or leaving the room.

*For the sensors I have sensor_in and sensor_out.

Solution

It is better to use a motion sensor over here than a photocell as we need to track the people in the room. Hence let sensor_in and sensor_out be the input and output of the motion sensor.

Then create a verilog module whoes output wll drive the light in the room.

Algorithm:

if (~sensor_in)

sensor_out = 1;

else

sensor_out=0;

end if

How would I go about doing the following in Verilog: • Design a system that will turn on the light as the first person enters a room and turn off the light as t

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site