You are on page 1of 12

SBqM mini-project

Supervised by Dr. Ahmed Shalaby

Team name: Design architects


Team members:
1- Eslam Mahmoud Abd El
Gawad (Team leader).
2- Ahmed Abdel.
3- Mohammed Essam Abd El
Samee.

SBqM mini-project

Contents
1.

Table of inputs & outputs..................................................................................... 1

2.

System Icon:........................................................................................................ 2

3.

Block structure diagram:...................................................................................... 2

4.

The FSM module:.................................................................................................. 3

5.

The Test plan:....................................................................................................... 3

6.

The simulation results:......................................................................................... 4

7.

Test benches results............................................................................................. 6

8.

The transcript :..................................................................................................... 7

SBqM mini-project

1. Inputs and outputs table:


Inputs
Signal
name
Tcount
Reset
E_phcell
O_phcell
Clk

Widt
h
2
bits
1 bit
1 bit
1 bit
1 bit

Description

5
bits
1 bit
1 bit
1 bit

Determines the waiting time of customer

Determines the number of tailers


Active low signal to reset the system
Active low sensor at entrance
Active low sensor at exit
10 MHz clk signal

Outputs
Wtime
Empty
Full
alarm

Determines when the queue is empty


Determines when the queue is full
Determines when the queue is full and another customer
wants to enter

2. System Icon:

SBqM mini-project

3. Block structure diagram:

4. The FSM module:

State
S0
S1
S2

Description
The queue is empty initial state
The queue is occupied but not full
The queue is full.

SBqM mini-project

5. The Test plan:


1 Test the number of customers till the full queue while the entrance sensor is
hit
2 Test the full flag when the queue is full
3 During the test the work of the entrance sensor for more than one cycle to
ensure that it increments only once.
4 Try to add an extra customer to test the alarm signal
5 Test the number of customers till the empty queue while the exit sensor is hit
6 During the test, the waiting time was being tested for different cases

6. The simulation results:


During Empty:

SBqM mini-project

Full Case:

SBqM mini-project

7. Test benches results

SBqM mini-project
8.

The transcript :

Control Block

The block is the main FSM responsible of mapping the persons counted in the
queue and outputs to the interface an empty and full signal that indicates
the status of the queue.

SBqM mini-project

Port
Clk
Reset

width
1
1

Type
Input
Input

pcount

Input

empty

Input

full

Output

description
Clock of the system
Reset signal for
resetting the system
and initializing it.
Persons count in the
queue
Empty flag indicating
the states of the
queue
Full flag indicating
the states of the
queue

Control Sensor
The block is a FSM responsible of mapping the sensors value to an output that
drives the persons counter block.

SBqM mini-project

Port
Clk
Reset

width
1
1

Type
Input
Input

e_phcell

Input

o_phcell

Input

Phcell

Output

description
Clock of the system
Reset signal for
resetting the system
and initializing it.
Active low sensor at
entrance
Active low sensor at
exit
Mapped Sensors
value

Wtime Block
The block is mainly responsible for calculating the waiting time for customers in a
queue. It was supposed that that the time is calculated according to equation:

Wtime (Pcount 0,Tcount) = 3*(Pcount+Tcount-1)/Tcount


But it was decided to use a look-up table representing values for different values
of customers and tellers available.
The block consists of a ROM and another block required for selecting the
equivalent waiting time according to number of customers and tellers.

Port
Clk
Reset

Type
Input
Input

description
Clock of the system
Reset signal for resetting
9

SBqM mini-project

tcount
pcount

Input
Input

Wtime

Output

the system and


initializing it.
Number of tellers
Number of customers in
queue
Waitng time.

Pcounter block

We built the (Pcounter) to count the number of customer in a queue according


the status of the entrance and exit sensors and we make an alarm signal to
detect when an extra customer tries to enter when the queue is full.
We used a sequential always block to describe the counter with active low reset
with the system, the (phcell) signal which is coming from the FSM of the system
and deliver the alarm signal to be an output of the system.

10

SBqM mini-project

11

You might also like