Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Laboratory Report Cover Sheet

SRM INSTITUTE OF SCIENCE AND


TECHNOLOGY
College of Engineering and Technology
Department of Electronics and Communication
Engineering

18ECC206J VLSI Design


VI Semester, 2021-2022 (Even Semester)

Title of Mini Project : Car Parking System

Date of Submission : 15/04/22

Particulars Max. Marks


Marks Obtained

Name: Akash Soni Name: Shruti Anand

Register No. : Register No. :


RA19110040104 RA19110040104
52 53
Design, HDL Code 25
Demo
10
verification
&viva
Project Report 05

Total 40

REPORT VERIFICATION

Staff Name : Dr. Maria Jossy/Dr. KrishaDayalSukla (DO3)

Signature :
Car Parking System

1. OBJECTIVE
Design and Implementation of Car Parking System in Verilog.

2. ABSTRACT
In today's days, motor vehicle use is increasing day by day, causing noise, traffic congestion,
issues with parking spaces, and finding a vacant parking space is becoming increasingly
difficult. In this project, we proposed a safe car parking management framework using Verilog
HDL. This machine has main modules Module-1: Password entry and exit. Our execution time is
very faster by using field-programmable gate arrays (FPGA). This is about designing an efficient
system that takes over the task of identifying free slots in a parking area that keeps parked
vehicle records. Parking a vehicle also requires a password. With the rapid increase in the
availability and use of cars in recent years, finding a vacant car park is a little complicated. It
creates the issue of traffic congestion, and emissions (noise and air), as the number of vehicles
increases day by day. AnFPGA-based parking system has been proposed to conquer this
problem.

3. PROJECT DESCRIPTION
At the entrance of the parking system, there is a sensor that is activated to detect a vehicle
coming. Once the sensor is triggered, a password is requested to open the gate. If the entered
password is correct, the gate would open to let the vehicle get in. Otherwise, the gate is still
locked. If the current car is getting into the car park being detected by the exit sensor and another
car comes, the door will be locked and requires the coming car to enter passwords.

Sensors such as IR (Infrared) are used in order to identify the entry and exit of the car at the
parking slot. The password required for car entry and exit is done using FPGA. The number of
slots available was identified by fixing cameras. The details of the number of vehicles parked are
not stored. The existing system provides information about the vacant slots. It doesn’t give
information about the exact location of the vacant parking slot in such a big area.
To solve and sort out the problems in the parking system, here is a solution. A sensor is at the
entrance of the parking system which is activated to detect a vehicle coming. When a car
enters in, a password is needed. If the password entered is correct the gate will open or else it
will be locked. This is also the same for the exit process. And with the help of an ultrasonic
sensor, the distance is measured inwhich the next car is available, the number of vacant slots,
and the number of cars parked already will be given in the form of a message.
The proposed smart car parking system into the following module.
● Car entering and exiting module.
Entering Module:- In Entering Module it is sensed by the IR Sensors when the car enters the lot.
The IR Sensors give the FPGA the pulse which considers an input to be detected. The vehicle is
allowed into the parking lot only if the password is entered. If the entered password is correct
then the vehicle is preceded to park or else the gate will remain closed.
Exiting Module:- In Exiting Module it is detected by the IR Sensors as the vehicle moves out of
the lot. The IR Sensors provide the pulse to the FPGA which assumes that input is detected and
that the car is only exited from the parking lot after the password has been entered correctly. And
the gate is closed when the next car tries to exit the lot.

4. RESULT AND OBSERVATION


// Verilog project: Verilog code for car parking system
`timescale 1ns / 1ps
module parking_system(
input clk,reset_n, input sensor_entrance, sensor_exit, input [1:0] password_1,
password_2,output wire GREEN_LED,RED_LED,output reg [6:0] HEX_1, HEX_2);
parameter IDLE = 3'b000, WAIT_PASSWORD = 3'b001, WRONG_PASS = 3'b010,
RIGHT_PASS = 3'b011,STOP = 3'b100;
// Moore FSM : output just depends on the current state
reg[2:0] current_state, next_state;
reg[31:0] counter_wait;
reg red_tmp,green_tmp;
// Next state
always @(posedge clk or negedgereset_n)
begin
if(~reset_n)
current_state = IDLE;
else
current_state = next_state;
end
// counter_wait
always @(posedge clk or negedgereset_n)
begin
if(~reset_n)
counter_wait<= 0;
else
if(current_state==WAIT_PASSWORD)
counter_wait<= counter_wait + 1;
else
counter_wait<= 0;
end
// change state
always @(*)
begin
case(current_state)
IDLE: begin
if(sensor_entrance == 1)
next_state = WAIT_PASSWORD;
else
next_state = IDLE;
end
WAIT_PASSWORD: begin
if(counter_wait<= 3)
next_state = WAIT_PASSWORD;
else
begin
if((password_1==2'b01)&&(password_2==2'b10))
next_state = RIGHT_PASS;
else
next_state = WRONG_PASS;
end
end
WRONG_PASS: begin
if((password_1==2'b01)&&(password_2==2'b10))
next_state = RIGHT_PASS;
else
next_state = WRONG_PASS;
end
RIGHT_PASS: begin
if(sensor_entrance==1 &&sensor_exit == 1)
next_state = STOP;
else if(sensor_exit == 1)
next_state = IDLE;
else
next_state = RIGHT_PASS;
end
STOP: begin
if((password_1==2'b01)&&(password_2==2'b10))
next_state = RIGHT_PASS;
else
next_state = STOP;
end
default: next_state = IDLE;
endcase
end
// LEDs and output, change the period of blinking LEDs
here always @(posedge clk) begin
case(current_state)
IDLE: begin
green_tmp = 1'b0;
red_tmp = 1'b0;
HEX_1 = 7'b1111111; //
off HEX_2 =
7'b1111111; // off end
WAIT_PASSWORD: begin
green_tmp = 1'b0;
red_tmp = 1'b1;
HEX_1 = 7'b000_0110; //
E HEX_2 =
7'b010_1011; // n
end
WRONG_PASS: begin
green_tmp = 1'b0;
red_tmp = ~red_tmp;
HEX_1 = 7'b000_0110; //
E HEX_2 =
7'b000_0110; // E
end
RIGHT_PASS: begin
green_tmp = ~green_tmp;
red_tmp = 1'b0;
HEX_1 = 7'b000_0010; //
6 HEX_2 =
7'b100_0000; // 0
end
STOP: begin
green_tmp = 1'b0;
red_tmp = ~red_tmp;
HEX_1 = 7'b001_0010; // 5
HEX_2 = 7'b000_1100; // P
end
endcase
end
assign RED_LED = red_tmp ;
assign GREEN_LED = green_tmp;

endmodule

//Test Bench - car parking system


module parking_system_test;

// Inputs
reg clk;
reg reset_n;
reg sensor_entrance;
reg sensor_exit;
reg [1:0] password_1;
reg [1:0] password_2;

// Outputs
wire GREEN_LED;
wire RED_LED;
wire [6:0] HEX_1;
wire [6:0] HEX_2;
// fpga4student.com FPGA projects, Verilog projects, VHDL projects
// Instantiate the Unit Under Test (UUT)
parking_systemuut (
.clk(clk),
.reset_n(reset_n),
.sensor_entrance(sensor_entrance),
.sensor_exit(sensor_exit),
.password_1(password_1),
.password_2(password_2),
.GREEN_LED(GREEN_LED),
.RED_LED(RED_LED),
.HEX_1(HEX_1),
.HEX_2(HEX_2)
);
initial begin
clk = 0;
forever #10 clk =
~clk; end
initial begin
// Initialize Inputs
reset_n = 0;
sensor_entrance = 0;
sensor_exit = 0;
password_1 = 0;
password_2 = 0;
// Wait 100 ns for global reset to
finish #100;
reset_n = 1;
#20;
sensor_entrance = 1;
#1000;
sensor_entrance = 0;
password_1 = 1;
password_2 = 2;
#2000;
sensor_exit =1;

// Add stimulus here


end

endmodule

Fig. Simulation waveform of Car Parking System

5. CONCLUSION
The goal of this project was to develop the most effective smart car parking system. This was the
key impetus in deciding to incorporate the FPGA method. With the support of Xilinx ISE Design
Suite, a smart car parking system is implemented using Verilog HDL.The system built can be
used for many applications, and can easily increase the number of slot choices and increase
parking protection. Through using the above-implemented program parking becomes simple.
The car is correctly identified and parking safety will be stressed. Even the drivers can easily
pick the slot.
The arrival of autonomous vehicles (AVs) threatens to exploit the future of the smart parking
program. Urban cities around the world have already started experimenting with self-parking
cars, and advanced AV parking lots. But it is easy to use this device that is not only unique to a
private car park-like malls, business parking, etc. But multiple sites, such as public parking, can
also be built and the functionality can be added by giving parking information. Purging the need
for human labor will make parking space management more efficient.

6. REFERENCES

1. Gongjun Yan, Weiming Yang, Rawat, D.B.,Olariu, S., (2011). SmartParking: A Secure and Intelligent Parking
System. Intelligent Transportation Systems Magazine, IEEE, 3(1), 18-30.
2. Tosung_hua_Hsu et al, “Development of an Automatic parking system for vehicle”, IEEE vehicle power
& propulsion conference (VPPC), 3-5 September 2008.
3. Liu Liang; Zhang Lei; Xiao Jin; ,(2011) "The simulation of an auto-parking system," 6th IEEE Conference
on Industrial Electronics and Applications (ICIEA), 2011, pp.249-253
4. Ramneet Kaur and Balwinder Singh, “Design And Implementation Of Car Parking System On FPGA”,
International Journal of VLSI design & Communication Systems (VLSICS) Vol.4, No.3, June 2013, pp. 69-77.
5. Du Shaobo et al, “The Research and Design of Intellectual Parking System Based on RFID”, 9th
International Conference on Fuzzy Systems and Knowledge Discovery, 2012, PP 2427- 2430

You might also like