CPSC 121: Models of Computation 2017S
Building & Designing Sequential Circuits Meghan Allen, based on notes by Steve Wolfman, Patrice Belleville and others
1
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
CPSC 121: Models of Computation 2017S Building & Designing - - PowerPoint PPT Presentation
CPSC 121: Models of Computation 2017S Building & Designing Sequential Circuits Meghan Allen, based on notes by Steve Wolfman, Patrice Belleville and others 1 This work is licensed under a Creative Commons Attribution 3.0 Unported License.
1
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
2
3
4
5
6
7
8
light
light
9
10
11
12
13
14
We use “0” and “1” because that’s how MUXes are usually labelled.
15
16
17
18
19
20
21
22
DON’T PANIC!
23
24
25
26
27
28
29
30
31
32
We’re assuming the circuit has been set up and is “running normally”. Right now, the light is off (i.e., the output of the right latch is 0).
33
34
35
Why doesn’t the left latch update? a. Its D input is 0. b. Its G input is 0. c. Its Q output is 1. d. It should update!
36
37
38
39
40
41
42
We rearranged the clock and D inputs and the output to match Logisim. Below we use a slightly different looking flip-flop.
– D flip-flops, – T flip-flops, – J-K flip-flops, – and S-R flip-flops.
43
Plus… it means you only need to learn about D flip-flops’ guts. The others are similar enough so we can just take the abstraction for granted.
44
45
46
47
48
49
Experiments show it generally works well to add “inertia” so that it takes two “wrong guesses” to change the prediction…
taken the last branch was taken not taken the last branch was not taken yes we predict the next branch will be taken no we predict the next branch will be not taken
50
51
52
53
54
55
What is b (the number of 1-bit flip-flops needed to represent the state)? a. 0, no memory needed b. 1 c. 2 d. 3 e. None of these
56
Current State input New state 1 1 1 1 1 1 1 1 1 1 1 1 1
YES! 3 yes? 2 no? 1 NO! not taken taken not taken taken not taken take taken not taken
57
Current State input New state 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
YES! 3 yes? 2 no? 1 NO! not taken taken not taken taken not taken take taken not taken
58
59
sleft sright
60
sleft sright input
61
sleft sright input
62
input sleft sright In state number 0, what should be the new value of sleft? Hint: look at the DFA, not at the circuit! a. input b. ~input c. 1 d. e. None of these.
63
input In state number 1, what’s the new value of sleft? a. input b. ~input c. 1 d. e. None of these. sleft sright
64
input In state number 2, what’s the new value of sleft? a. input b. ~input c. 1 d. e. None of these. sleft sright
65
input In state number 3, what’s the new value of sleft? a. input b. ~input c. 1 d. e. None of these. sleft sright
66
sleft sright input sleft' sright' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
input
67
input sleft sright
68
In state number 0, what’s the new value of sright? a. input b. ~input c. 1 d. e. None of these. input sright
69
input sleft sright
70
input sleft sright
71
pred last input pred' last' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
YES! 3 yes? 2 no? 1 NO! not taken taken not taken taken not taken take taken not taken
72
73
74
75
76
77
78
79
80
81
82
83
84