Thursday, November 4, 2021

Implementing the Car Park Occupied Slot Counting System

 Car Park Occupied Slot Counting System

Problem definition:

There is a car park with three slots and we would like to know how many of its slots are occupied at a given time. Within the design, occupied slot locations are not important.

Solution:

We can design a combinational circuit for this purpose. 

Assume that we placed a sensor over each slot which gives output logic level 1 when the slot is occupiedIf the slot is empty, sensor gives output logic level 0.

 Let’s label output of sensors as binary variables s0, s1, and s2

The designed combinational circuit will provide the output as a two-bit binary number c1 (MSB) and c0 (LSB). Therefore, we should cover all input combinations in terms of a truth table


                                Truth Table of the Car Park Occupied Slot Counting System

logic functions for c0 and c1 in the SOP form as follows:



Verilog Description of the Car Park Occupied Slot Counting System code:1


Synthesization result of the car park occupied slot counting system



-----------------------------------------------------------------------------------








Implementing the Car Park Occupied Slot Counting System

We can also implement the car park occupied slot counting system on Basys3 board. As in
previous applications, we provide Verilog description in which LEDs and switches on the board are connected in code:2. Here, we use Verilog description of the system in code:1 as an IP block. Therefore, we expect the reader has generated the corresponding IP block.
Car Park Occupied Slot Counting System Implemented
 on the Basys3 Board in Verilog

Improving the Car Park Occupied Slot Counting System


We can improve the car park occupied slot counting system in two ways.

First, we can extend the number of slots to be examined to nine. We provide the modified Verilog description for the car park occupied slot counting system in Listing 8.30. We should form an IP block for this part to be used in the project.

Verilog Description of the Car Park Occupied Slot Counting System for Nine Cars code:3


Second, we can display the number of occupied slots on the rightmost seven-segment display of the Basys3 board. To do so, we should add the seven-segment display decoder module in code:4. Based on these modifications, the Verilog description of the top module for car park occupied slot counting system will be as in code:5.

Verilog Description of the Seven-Segment Display Decoder Module code:4



Improved Car Park Occupied Slot Counting System Implemented on the Basys3 Board in Verilog code:5












         πŸ‘‰ back to combination blocks

2 comments:

  1. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. ν† ν† μ‚¬μ΄νŠΈ

    ReplyDelete
  2. An impressive share, I recently given this onto a colleague who was simply performing a little analysis for this. And then he actually bought me breakfast because I ran across it for him.. smile. So well then, i’ll reword that: Thnx for any treat! But yeah Thnkx for spending some time to discuss this, Personally i think strongly concerning this and enjoy reading much more about this topic. If you can, as you grow expertise, could you mind updating your blog site with a lot more details? It is actually extremely of great help for me. Large thumb up in this blog post! this page

    ReplyDelete

COMPARISON TREE

  Difference between Full and Complete Binary Tree A   binary tree  is a type of data structure where each node can only have  two offspring...