0% found this document useful (0 votes)
16 views

Ra4ad Safebank Embedded System

Safebank

Uploaded by

jokermo477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Ra4ad Safebank Embedded System

Safebank

Uploaded by

jokermo477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

The manager of the Safebank bank branch, located in a nearby mall, is proposing to install an

embedded system to monitor the client queue in front of the tellers. The proposed system, called
SBqM™, is to display various information about the status of the queue. Detailed specification of
SBqM™ is as follows:
 Both queue ends are equipped with a photocell. Each photocell generates a logic ‘1’ signal if
nobody interrupts a light beam generated at the corresponding queue end. When the light
beam is interrupted, the photocell output changes to logic ‘0’ and stays at that value until it is
no longer interrupted.
 Clients are supposed to enter the queue only from the back end and leaves only from the
front end.
 The number of people standing in the queue (waiting to be served by a teller), Pcount, and
the expected waiting time in the queue before being served, Wtime, are to be displayed.
 Pcount is to be incremented by only one when a client enters the queue and is to be
decremented by only one when a client leaves even if a client stands in front of the light
beam for a long time period.
 Wtime, in seconds, could approximately be given by the formulas:
Wtime (Pcount = 0) = 0,

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

where Tcount is the number of tellers currently in service (Tcount  {1,2,3}) and Wtime is
rounded by ignoring the fraction part.

 SBqM™ maintains binary empty and full flags that reflect the status of the queue.
 A responsible person should have the capability of resetting the system. Resetting the system
clears the full flag and Pcount, and the sets empty flag.

The design team has met few times to decide on the following for the SBqM™ architecture:

 Although the system could be modeled as a one big FSM, it was decided to decompose the
system into smaller FSMs. Design reuse is also recommended. That is, one small FSM model
can be repeated multiple times in the overall system model.
 An n-bit up-down counter is to be used to generate Pcount. The maximum Pcount value will
be (2n - 1), with a default value of 7, where n is a generic value, with a default value of 3.
 Although random logic can be used in calculating Wtime, it was decided to use a look-up
table to achieve a better runtime performance. The lookup table is to be realized as a ROM.
You are going to model the operation of SBqM™ and verify it via simulation. Then, you
will synthesis the model. Here is the list of deliverables:

a) In a table, identify SBqM™ inputs and outputs and briefly describe their meaning and
possible values.

Pin/s Name Type Description


Reset Input Reset the system
CountUp Input Count up when one client enter the queue
CountDown Input Count down when one client leave the queue
TCount Input Number of tillers at the counter
PCount Output Number of clients at the queue
EmptyFlag Output To indicate that queue is empty
FullFlag Output To indicate that queue is full

b) Draw an icon for the SBqM™, clearly showing its input and output signals.

Reset
PCount
CountUp

CountDown
SBqM EmptyFlag

TCount FullFlag

c) Draw a block diagram showing the SBqM™ structure.


d) Draw the necessary FSM diagram(s).

S0

S3 S1

S2

S0: Initial State.


S1: Count Up.
S2: Count Down.
S3: Empty/ Full Queue.

e) In a table, propose a test strategy to verify the operation of the SBqM™ model. Carefully
select an appropriate set of test cases that tests various aspects of the design. For example,
you should test that the two flags reflect the correct status of the queue. Additionally, you
should ensure that the counter does not wrap around. That is, it does not display ‘0’ when it
gets an increment signal while the queue is full or ‘7’ when it gets a decrement signal while
the queue is empty.

You might also like