COE321-HO-01-Introduction Fall 2017: Why Study Logic Design?
COE321-HO-01-Introduction Fall 2017: Why Study Logic Design?
Fall 2017
n Obvious reasons
q this course is part of the COE/ELE requirements
q it is the implementation basis for all modern computing devices
n building large things from small components
n provide a model of how a computer works
1
COE321-HO-01-Introduction
Fall 2017
sense
I - Introduction © C opyright 2004, Gaetano Borriello and Randy H. Katz 6
2
COE321-HO-01-Introduction
Fall 2017
New ability: to accomplish the logic design task with the aid of computer-aided
design tools and map a problem description into an implementation with
programmable logic devices after validation via simulation and understanding
of the advantages/disadvantages as compared to a software implementation
3
COE321-HO-01-Introduction
Fall 2017
Z
A
open switch (if A is “1” or asserted)
and turn off light bulb (Z)
Z ≡ A
Switches (cont’d)
A
OR
Z ≡ A or B
Switching networks
n Switch settings
q determine whether or not a conducting path exists to light
the light bulb
n To build larger computations
q use a light bulb (output of the network) to set other switches
(inputs to another network).
n Connect together switching networks
q to construct larger switching networks, i.e., there is a way to
connect outputs of one network to the inputs of the next.
4
COE321-HO-01-Introduction
Fall 2017
Relay networks
conducting
path composed
of switches
closes circuit
Transistor networks
MOS transistors
G G
S D S D
n-channel p-channel
open when voltage at G is low open when voltage at G is high
closes when: closes when:
voltage(G) > voltage (S) + ε voltage(G) < voltage (S) – ε
5
COE321-HO-01-Introduction
Fall 2017
MOS networks
X what is the
relationship
between x and y?
3v x y
Y 0 volts 3 volts
0v 3 volts 0 volts
3v what is the
relationship
between x, y and z?
Z1
0v x y z1 z2
6
COE321-HO-01-Introduction
Fall 2017
7
COE321-HO-01-Introduction
Fall 2017
q Buffer, NOT
A Z
q AND, NAND
A
Z easy to implement
B
with CMOS transistors
(the switches we have
q OR, NOR available and use most)
A
Z
B
Sequential logic
n Sequential systems
q exhibit behaviors (output values) that depend not only
on the current input values, but also on previous input values
n In reality, all real circuits are sequential
q because the outputs do not change instantaneously after an
input change
q why not, and why is it then sequential?
n A fundamental abstraction of digital design is to reason
(mostly) about steady-state behaviors
q look at the outputs only after sufficient time has elapsed for the
system to make its required changes and settle down
8
COE321-HO-01-Introduction
Fall 2017
n Combinational:
q input A, B
q wait for clock edge
q observe C A
q wait for another clock edge C
B
q observe C again: will stay the same
n Sequential: Clock
q input A, B
q wait for clock edge
q observe C
q wait for another clock edge
q observe C again: may be different
Abstractions
9
COE321-HO-01-Introduction
Fall 2017
An example
Implementation in software
Implementation as a
combinational digital system
n Encoding:
q how many bits for each input/output?
q binary number for month month leap d28 d29 d30 d31
0000 – – – – –
q four wires for 28, 29, 30, and 31 0001 – 0 0 0 1
0010 0 1 0 0 0
n Behavior: 0010 1 0 1 0 0
0011 – 0 0 0 1
q combinational 0100 – 0 0 1 0
q truth table 0101 – 0 0 0 1
month leap 0110 – 0 0 1 0
specification 0111 – 0 0 0 1
1000 – 0 0 0 1
1001 – 0 0 1 0
1010 – 0 0 0 1
1011 – 0 0 1 0
1100 – 0 0 0 1
1101 – – – – –
111– – – – – –
d28 d29 d30d31
10
COE321-HO-01-Introduction
Fall 2017
n d28 = m8'•m4'•m2•m1'•leap’
n d29 = m8'•m4'•m2•m1'•leap
n d30 = (m8'•m4•m2'•m1') + (m8'•m4•m2•m1') +
(m8•m4'•m2'•m1) + (m8•m4'•m2•m1)
= (m8'•m4•m1') + (m8•m4'•m1)
n d31 = (m8'•m4'•m2'•m1) + (m8'•m4'•m2•m1) +
(m8'•m4•m2'•m1) + (m8'•m4•m2•m1) +
(m8•m4'•m2'•m1') + (m8•m4'•m2•m1') +
(m8•m4•m2'•m1')
Activity
11
COE321-HO-01-Introduction
Fall 2017
n d28 = m8'•m4'•m2•m1'•leap’
n d29 = m8'•m4'•m2•m1'•leap
n d30 = (m8'•m4•m2'•m1') + (m8'•m4•m2•m1') +
(m8•m4'•m2'•m1) + (m8•m4'•m2•m1)
n d31 = (m8'•m4'•m2'•m1) + (m8'•m4'•m2•m1) +
(m8'•m4•m2'•m1) + (m8'•m4•m2•m1) +
(m8•m4'•m2'•m4') + (m8•m4'•m2•m1') +
(m8•m4•m2'•m1')
Another example
Implementation in software
integer combination_lock ( ) {
integer v1, v2, v3;
integer error = 0;
static integer c[3] = 3, 4, 2;
12
COE321-HO-01-Introduction
Fall 2017
n Encoding:
q how many bits per input value?
q how many values in sequence?
q how do we know a new input value is entered?
q how do we represent the states of the system?
n Behavior: new value reset
q clock wire tells us when it’s ok
to look at inputs
(i.e., they have settled after change)
state
q sequential: sequence of values clock
must be entered
q sequential: remember if an error occurred open/closed
q finite-state specification
equal open/closed
I - Introduction © C opyright 2004, Gaetano Borriello and Randy H. Katz 39
13
COE321-HO-01-Introduction
Fall 2017
ERR
closed
14
COE321-HO-01-Introduction
Fall 2017
Activity
E2 E3 ERR
new new
closed closed closed
S1 S2 S3 OPEN
closed closed closed
mux=C1 equal mux=C2 equal mux=C3 equal open
& new & new & new
open/closed
15
COE321-HO-01-Introduction
Fall 2017
Design hierarchy
system
data-path control
register logic
switching
networks
Summary
16