90.Implementation of Carparking System using VHDL
90.Implementation of Carparking System using VHDL
Abstract— The growing population in India has created many problems - one of the challenging ones being carparking troubles which
we confront everyday.This has created a specific need for a system whichcan control and guide the process of car parking. We are
implementing car parking system which are muchin vogue – a method of automatically[5]parking and retrieving cars that typically use
a system of slots and signalling objects for theretrieve. They serve advantages like safety, saving space,time and fuel as one does not have
todrive around for finding empty space . One can design a car parking system using many domains but we have chosen
VHDL(VHSIC-HDL) - Very High Speed Integrated Circuit Hardware Description Language domain as it allows the user to
implement complex functions and this tool converts described function to logic gates so that one can realize the output better.
VHDL is more verbose than similar tools.
The information underneath the line in the circle represents the output value when in each state.
The arrow coming from "nowhere" to the A indicates that A is the initial state.
This fully defined state machine can very easily be converted into VHDL. It is important to remember that
when writing the VHDL code, what you are doing is describing how you want the hardware (i.e., the digital
gates) implemented. So, for example, when you define a set of states like A, B, C, and D in this system,
those states are going to be represented by bits, and more specifically by the output of flip flops. In a system
with four states, like this one, it would be possible to represent those four states with 2 bits (2 flip flops).
There are other ways that the states could be represented too. One of those ways would be to use four bits,
where each bit represents a state, but only one bit can be on at a time. So A would be represented by 0001,
B by 0010, C by 0100 and D by 1000. One of the good things about using a high level hardware description
language is that you can often ignore this level of detail.Figure 2 shows the general idea of the hardware
circuitry that will be created when the VHDL code is synthesized to create the hardware.
This diagram indicates that there is a set of n flip flops that represent the state. There is also some logic
that uses the output of the flip flops and the inputs to the system to determine the next state. Finally, there is
some logic that decodes the output values of the flip flops to create the m output signals.
Again, when using a HDL, you can often ignore this level of detail in your design. It is still important to
understand what kind of circuitry is created by your HDL because there may come a time when you have to
count and minimize the number logic gates in your design. With an understanding of what is created by
your HDL statements you can then design to minimize gate creation.
2.From the ―Select Source Type‖ options select ―VHDL Test Bench‖
3. In the ―File name‖ field choose a name that signifies the test bench and adheres to the naming
conventions mentioned earlier.Type ―testorgate‖
4. For the ―Location‖ field, click the browse icon to navigate to the appropriate folder, which should be
the same one used forcreating the project.
5. Click ―Next‖
6. The following window allows you to select which design you want to create a test bench for, in our
case ―ORgate‖ since it is the only module we have; however, for your future designs, you can make
test benches for individual components of yourdesigns as well as the top-level design which ties it all
together.
7. Click ―Next‖.
8. A summary window like the one shown below will appear, click ―Finish‖
9. Now you will view the test bench file (testorgate.vhd), shown below, that Xilinx has generated in the
workspace window.
● Now going to our test bench file, we can see that it consists of the same two main parts of a normal
VHDL design, which is the entity and architecture. The entity is left blank because we are simply
supplying inputs and observing outputs to the design in test. The architecture part will consist of the
design we are testing as a component, input and output signals, a port map of the component for the
UUT (Unit Under Test), a process to run the clock and a stimulus process, which will be responsible
for running the tests that are written to test the design
10. Let’s modify the default code by removing the highlighted code shown below, which is the clock
process that is generated by default, which divides the clock period by two. We also want to remove the
stimulus process.
11. Replace the deleted code with the following code segment, which will perform a very simple initial test
of the design for simulation by giving different values of inputs. In our modified code, we have chosen
to wait for 100 ns, which means the time delay for which the input has to maintain the current value; i.e.,
after 100 ns have elapsed the next set of values can be assigned to the inputs
12. The test bench file does not appear in the “Hierarchy” Pane of the “Design‖ Panel. This is because
there is a separate view for implementation and test files. In order to view test files, select the box of
“Simulation‖ in the “View Pane” of the “Design” panel. In the “Process Pane,‖ double click on the
―Behavioral Check Syntax” to make sure that you didn’t make any syntax errors while making
changes.
13. Save your work.
14. Double click on “Simulate Behavioral Model” in the ―Process Pane‖, which will open the ISim
software with your test bench loaded.
15. ISim simulator window will open with your simulation executed, where you are able to simulate your
designs and check for errors. You can step through your VHDL designs and check the states of signals
and set the simulation to run for specific period of time. Make sure to check the results of the simulation
output against your truth table results to verify the correctness of the design. The resolution of the
simulation is set to 1 picoseconds to ensure correct processing of your design.
16. Toget a better view of the simulation waveforms, from the tool bar, click on View Zoom Full View or
use F6 or click on the shortcut ―Zoom to Full View‖ icon . This will give you a better view of what your
simulation is doing
17. In the text box located near the run button, you may specify amount of time for the simulation to run; the
button to the left of the box will execute the simulationfor the time you have specified. After setting the
new simulation time, click on Re-Start to clear the previous simulation result and then click on Run to
start simulating with new time setting. Below is an example of 2us of simulation time:
IV. RESULTS
The above figure shows the RTL Schematic view of car parking system, passwords 1 &2 ,back_sensor,
front_sensor are input signals. Reset_n is control signal,clk is system clock signal.LEDGreen_LED
,Red_LED are output signals, which shows entering the car in the slots.
A. Output Waveform
The above figure shows the Output Waveform of car parking system.
V. CONCLUSION
The present parking system is implemented using FSMs with the help of Xilinx ISE Design Suite 14.7.
The design is verified. State machines increase productivity, reduces cost[4], and accelerates time to market.
The designed system can be used for many applications and can easily enhance the number of slot
selections. Parking becomes easy by the use of Designed system.The present FSM based parking system
using VHDL can be implemented in FPGA with the help of Xilinx ISE Design Suite 14.7 the design is
verified on Virtex 5 FPGA kit. State machines increase productivity, reduces cost, and accelerates time to
market. FPGA based parking system, gives fast response. The designed[1] system can be used for many
applications and can easily enhance the number of slot selections. Parking becomes easy by the use of
Designed system
REFERENCES
[1] Du Shaobo; Sun Shibao;,(2012) "The research and design of intellectual parking system based on RFID," Fuzzy Systems and
Knowledge Discovery (FSKD), 2012 9th International Conference on, pp.2427-2430.
[2] Gongjun Yan; Weiming Yang; Rawat, D.B.; Olariu, S.,(2011) "SmartParking: A Secure and Intelligent Parking System,"
Intelligent Transportation Systems Magazine, IEEE , vol.3, no.1, pp.18- 30.
[3] Liang; Zhang Lei; Xiao Jin; ,(2011) "The simulation of an auto-parking system," Industrial Electronics and
Applications (ICIEA), 2011 6th IEEE Conference on , pp.249-253.
[4] Soh Chun Khang; Teoh Jie Hong; Tan Saw Chin; Shengqiong Wang;(2010) , "Wireless Mobile-Based Shopping Mall Car
Parking System (WMCPS)," Services Computing Conference (APSCC),2010 IEEE Asia-Pacific , pp.573-577.
[5] Gupta, A.; Divekar, R.; Agrawal, M.; ,(2010) "Autonomous parallel parking system for Ackerman steering four wheelers,"
Computational Intelligence and Computing Research (ICCIC), 2010 IEEE International Conference on , pp.1-6.