04-10-2017, 05:34 AM
Hi am Narayanan i would like to get details on parking lot occupancy counter in verilog. My friend Justin said parking lot occupancy counter in verilog will be available here and now i am living at bangalore and i need help on this.
Parking lot occupancy counter
Consider a parking lot with a single entry and exit gate. Two pairs of photo sensors are used to monitor the activity of cars, as shown in figure below. When an object is between the photo transmitter and the photo receiver, the light is blocked and the corresponding output is asserted to 1. By monitoring the events of two sensors, we can determine whether a car is entering or exiting or a pedestrian is passing through. For example, the following sequence indicates that a car enters the lot:
• Initially, both sensors are unblocked (i.e., a and b signals are "00").
• Sensor a is blocked (i.e.,a and b signals are " 10").
• Both sensors are blocked (i.e.,a and b signals are "1 1 ").
• Sensor a is unblocked (i.e., a and b signals are "01 ").
• Both sensors becomes unblocked (i.e.,a and b signals are "00").
Similar logic can be formulated for car exit.
Design a parking lot occupancy counter as follows:
1. Design a digital system with two input signals, a and b, and two output signals, e n t e r and e x i t. The e n t e r and e x i t signals assert one clock cycle when a car enters and one clock cycle when a car exits the lot, respectively.
2. Derive the HDL code.
3. Design a counter with two control signals, i n c and d e c, which increment and decrement the counter (counting cars in parking lot) when asserted. Derive the HDL code
Thanks
Narayanan Ponnusamy
pnarayanaa[at]gmail.com