Professional Documents
Culture Documents
37 DLD Lec 37 Design of Sequential Circuits Example Dated 09 Dec 2022 Lecture Slides
37 DLD Lec 37 Design of Sequential Circuits Example Dated 09 Dec 2022 Lecture Slides
BEE-13AB
By Nasir Mahmood
nasir.mahmood@seecs.edu.pk, nasirm15@gmail.com
Design'Statement'
In laser based distance measurement, a laser is aimed at the object of interest. The
laser is briefly turned on, and a timer is started. The laser light, traveling at the
speed of light, travels to the object and reflects back. A sensor detects the reflection
of the laser light, causing the timer to stop.
Laser based distance measurement is illustrated in figure below
After the reflection is detected the system should use the amount of time passed
since the laser was pulsed to compute the distance to the object of interest. The
system should then return to waiting for the user to press the button so that a new
measurement can be taken.
2
Design'Statement'Contd..'
Design a processor to control the laser and the timer and to compute distances up to
2000 meters. A block diagram is shown below
L to laser
Laser
B from button based
distance
measurer
D to display S from sensor
( 16 Bits)
The system has a bit input B, which equals 1 when the user presses a button to start
the measurement. Another bit input S comes from the sensor, and is 1 when the
reflected laser is detected. The bit L controls the laser, turning the laser on when L is
1. Finally N‐bit output D indicate the distance in binary, in units of meters. Let us
make D 16 bits. The system uses 300 MHz clock (every cycle corresponds to 1 m)
and active low reset signal.
3
Design'Specifica-ons'
• We'can'describe'the'overall'control'of'the'system'using'a'high;level'state'
machine.'To'facilitate'the'crea-on'of'the'State'machine,'we'enumerate'the'
sequence'of'events'underlying'the'measurement'system:''
''
– The'system'powers'on.''Ini-ally.'the'system's'laser'is'off'and'the'system'outputs'a'
distance'of'0'meters.'
– The'system'should'then'wait'for'the'user'to'ini-ate'measurement'by'pressing'a'buFon'
B.''
– AIer'the'buFon'is'pressed'the'system'should'tum'the'laser'on.'We'll'choose'to'leave'
the'laser'on'for'one'clock'cycle.''
– AIer'the'laser'is'pulsed,'the'system'should'wait'for'the'sensor'S'to'detect'the'laser's'
reflec-on.'Meanwhile'the'system'should'count'how'much'-me'passes'from'the'-me'
the'laser'was'pulsed'un-l'the'reflec-on'is'sensed.''
– AIer'the'reflec-on'is'detected'the'system'should'use'the'amount'of'-me'passed'since'
the'laser'was'pulsed'to'compute'the'distance'to'the'object'of'interest''
– The'system'should'then'return'to'wai-ng'for'the'user'to'press'the'buFon'so'that'a'
new'measurement'can'be'taken.''
4
State diagram of the system
5
Design of Counters
Design a three bit binary counter
6
Design Problem no 2
• Design a three bit binary counter
– When a button is pressed it counts in the odd binary
number sequence and repeat
– When the button is released it counts the even binary
number sequence and repeat
State Diagram
8
Final State Diagram for Problem 2
9
Present State Input Next State Flip Flop Inputs
A B C X A B C TA TB TC
0 0 0 0 0 1 0 0 1 0
0 0 0 1 0 0 1 0 0 1
0 0 1 0 0 0 0 0 0 1
0 0 1 1 0 1 1 0 1 0
0 1 0 0 1 0 0 1 1 0
0 1 0 1 0 0 1 0 1 1
State 0
0
1
1
1
1
0
1
0
1
0
0
0
1
0
1
1
1
1
0
Table 1
1
0
0
0
0
0
1
1
0
1
0
0
1
0
1
1
0
0
1
1 0 1 0 0 0 0 1 0 1
1 0 1 1 1 1 1 0 1 0
1 1 0 0 0 0 0 1 1 0
1 1 0 1 0 0 1 1 1 1
1 1 1 0 0 0 0 1 1 1
1 1 1 1 0 0 1 1 1 0
10
11
Logic Diagram
12
• State Reduction
• Flip Flop Conversion Procedure
State Table
Reduced State Table
THE END
18