Understanding Digital Design
The Random Number Generator
© 2014 Project Lead The Way, Inc. Digital Electronics
Random Number Generator
Digital Design - Demo
2
This presentation will
• Review the Board Game Counter block diagram.
• Review the circuit design of the sequential logic
section of the Board Game Counter.
• Review the circuit design of the combinational logic
section of the Board Game Counter.
Random Number Generator
Block Diagram
3
0 0 0 1 1 1
0 1 1 0 0 1
1 0 1 0 1 0
1 2 3 4 5 6
Analog Section Sequential Logic Section Combinational Logic Section
The Analog Section produces a dampened square wave that “rolls” the count and slowly stops.
On every pulse of the clock, the Sequential Logic Section
increments a binary count from 1 to 6, then repeats.
The Combinational Logic Section
encodes the binary count into the die’s seven dots. CLOCK L1 L2 L3 L4 L5 L6 L7 A B C
Random Number Generator
Block Diagram
4 Analog Section Combinational Logic SectionThe Analog Section produces a dampened square wave that “rolls” the count and slowly stops.
On every pulse of the clock, the Sequential Logic Section
increments a binary count from 1 to 6, then repeats.
The Combinational Logic Section
encodes the binary count into the die’s seven dots. L1 L2 L3 L4 L5 L6 L7 Sequential Logic Section CLOCK A B C
Sequential Logic Section
5
Schematic Diagram
CLOCK
A B C
3-Bit Counter
Default Count Range (010 = 0002 to 710 = 1112)
Set / Reset Logic
Changes Count Range (110 = 0012 to 610 = 1102)
6
CLOCK
Functional Test (1 of 6)
Count of “1” (A=0; B=0; C=1)
Logic ‘0’ Logic ‘1’
7
CLOCK
Logic ‘0’ Logic ‘1’
Sequential Logic Section
Functional Test (2 of 6)
8
CLOCK
Logic ‘0’ Logic ‘1’
Sequential Logic Section
Functional Test (3 of 6)
9
CLOCK
Logic ‘0’ Logic ‘1’
Sequential Logic Section
Functional Test (4 of 6)
10
CLOCK
Logic ‘0’ Logic ‘1’
Sequential Logic Section
Functional Test (5 of 6)
11
CLOCK
Logic ‘0’ Logic ‘1’
Sequential Logic Section
Functional Test (6 of 6)
Random Number Generator
Block Diagram
12 Sequential Logic Section CLOCK Analog SectionThe Analog Section produces a dampened square wave that “rolls” the count and slowly stops.
On every pulse of the clock, the Sequential Logic Section
increments a binary count from 1 to 6, then repeats.
The Combinational Logic Section
encodes the binary count into the die’s seven dots. Combinational Logic Section L1 L2 L3 L4 L5 L6 L7 A B C
Combinational Logic Section
13
A B C
Schematic Diagram
Combinational Logic Section
Note: Because L1 / L5, L2 / L6, & L3 / L7 are always on together, only one combinational logic circuit was required for each pair.
Combinational Logic Section
14
Truth Table
A B C L1 L2 L3 L4 L5 L6 L7
0 0 0 - - -
-0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 0 1
0 1 1 1 0 0 1 1 0 0
1 0 0 1 0 1 0 1 0 1
1 0 1 1 0 1 1 1 0 1
1 1 0 1 1 1 0 1 1 1
1 1 1 - - -
-“1”
“2” “3”
“4” “5”
Combinational Logic Section
15
Truth Table
A B C L1 L2 L3 L4 L5 L6 L7
0 0 0 - - -
-0 0 1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0 0 1
0 1 1 1 0 0 1 1 0 0
1 0 0 1 0 1 0 1 0 1
1 0 1 1 0 1 1 1 0 1
1 1 0 1 1 1 0 1 1 1
1 1 1 - - -
-Again, note that L1 /
L5, L2 / L6, & L3 / L7
have the same
entries in the truth
table; therefore, they
are equal functions.
Combinational Logic Section
16
A = 0 B = 0 C = 1
Logic ‘0’ Logic ‘1’
Functional Test (1 of 6)
17
A = 0 B = 1 C = 0
Logic ‘0’ Logic ‘1’
Functional Test (2 of 6)
Count of “2” (A=0; B=1; C=0)
Combinational Logic Section
18
A = 0 B = 1 C = 1
Logic ‘0’ Logic ‘1’
Functional Test (3 of 6)
Combinational Logic Section
19
A = 1 B = 0 C = 0
Logic ‘0’ Logic ‘1’
Functional Test (4 of 6)
Combinational Logic Section
20
A = 1 B = 0 C = 1
Logic ‘0’ Logic ‘1’
Functional Test (5 of 6)
Combinational Logic Section
21
A = 1 B = 1 C = 0
Logic ‘0’ Logic ‘1’
Functional Test (6 of 6)
Combinational Logic Section
Using LEDs
22
A = 1 B = 0 C = 0
Shown with a count of “4” (A=1; B=0; C=0)
LED – Light Emitting Diode
Random Number Generator
Digital Section
23
Sequential Logic Section
Combinational Logic Section
A
na
lo
g
S
ec
tio
n