EECS150 - Digital Design Outline: Lecture 2 - Review
EECS150 - Digital Design Outline: Lecture 2 - Review
EECS150 - Digital Design Outline: Lecture 2 - Review
Topics in the review, you have already seen in CS61C, and possibly EE40:
1. 2. 3. 4. Digital Signals. General model for synchronous systems. Flip-flops, clocking. Combinational logic circuits.
http://www-inst.eecs.berkeley.edu/~cs150
Spring 2005
EECS150 lec02-review
Page 1
Spring 2005
EECS150 lec02-review
Page 2
Clock Signal
represents the time of one clock cycle.
Data Signals
Random adder circuit at a random point in time: Observations:
1. Most of the time, signals are in either low- or high-voltage position. 2. When the signals are at the highor low-voltage positions, they are not all the way to the voltage extremes (or they are past). 3. Changes in the signals correspond to changes in clock signal (but dont change every cycle).
Bus Signals
Signal wires grouped together often called a bus. X0 is called the least significant bit (LSB) X3 is called the most significant bit (MSB) Capital X represents the entire bus.
Here, hexadecimal digits are used to represent the values of all four wires. The waveform for the bus depicts it as being simultaneiously high and low. (The hex digits give the bit values). The waveform just shows the timing.
Spring 2005 EECS150 lec02-review Page 6
The facts:
1. Low-voltage represents binary 0 and high-voltage, binary 1. 2. Circuits are design and built to be restoring. Deviations from ideal voltages are ignored. Outputs close to ideal. 3. In synchronous systems, all changes follow clock edges.
Spring 2005 EECS150 lec02-review Page 5
Circuit Delay
Digital circuits cannot produce outputs instantaneously. In general, the delay through a circuit is called the propagation delay. It measures the time from when inputs arrive until the outputs change. The delay amount is a function of many things. Some out of the control of the circuit designer:
Processing technology, the particular input values.
Registers
The adder circuit discussed thus far is an example of a combinational logic circuit.
Its output changes as soon as a new input is presented (after a small delay). Its output is a function of only the current inputs (has no memory of past inputs).
Combinational logic circuits do the real work of computations, ex: arithmetic functions. They are combined with circuits that remember their inputs - registers.
Under the control of the LOAD signal the register captures its input. After a short delay it appears at the output. The ouput doesnt change again until another load signal.
Spring 2005
Sometime the clock signal is used as LOAD, in which case the register loads a new value every clock cycle.
Page 8
Spring 2005
EECS150 lec02-review
Page 7
EECS150 lec02-review
Accumulator Circuit
Put register, with clock signal controlling its load, in feedback path. On each clock cycle the register prevents the new value from reaching the input to the adder prematurely. (The new value just waits at the input of the register).
Xi
Spring 2005
EECS150 lec02-review
Page 9
Spring 2005
EECS150 lec02-review
Page 10
Register Details
A n-bit wide register is nothing but a set of flip-flops (1-bit wide registers) with a common load/clk signal.
Break
Announcements:
Lab lecture will be held as listed by Telebears - Fridays 1-2 in 125 Cory. Quizzes will be in class on Thursday, starting next week. Reading for todays lecture are linked to Tuesdays lecture on the web. Homework due next week will be posted later today or early tomorrow. New reading assignments will be posted later today or early tomorrow.
A flip-flop captures its input on the edge of the clock (rising edge in this case - positive edge flip-flop). The new input appears at the output after a short delay.
Accumulator Revisited
Note:
Reset signal (synchronous) Timing of X signal is not known without investigating the circuit that supplies X. Here we assume it comes just after Si-1. Observe transient behavior of Si .
True-table representation of function. Output is explicitly specified for each input combination. In general, CL blocks have more than one output signal, in which case, the truth-table will have multiple output columns.
Spring 2005
EECS150 lec02-review
Page 16
Example CL Block
2-bit adder. Takes two 2-bit integers and produces 3-bit result.
a1 a0 00 00 00 00 01 01 01 01 10 10 10 10 11 11 11
b1 b0 c2 c1 c0
Logic Gates
AND
000 001 010 011 001 010 011 100 010 011 100 101 011 100 101 110
00 01 10 11 00 01 10 11 00 01 10 11 00 01 10 11
00 01 10 11
ab c
0 0 0 1
OR
00 01 10 11
ab c
0 1 1 1
NOT
a b
0 1 1 0
NAND
00 01 10 11
ab c
1 1 1 0
NOR
00 01 10 11
ab c
1 0 0 1
XOR
00 01 10 11
ab c
0 1 1 0
Think about true table for 32-bit adder. Its possible to write out, but it might take a while!
11
Logic gates are often the primitive elements out of which combinational logic circuits are constructed.
In some technologies, there is a one-to-one correspondence between logic gate representations and actual circuits. Other times, we use them just as another abstraction layer (FPGAs have no real logic gates).
Spring 2005 EECS150 lec02-review Page 17
How about these gates with more than 2 inputs? Do we need all these types?
Spring 2005 EECS150 lec02-review Page 18
Boolean Algebra
Boolean equation:
y = ab + bc + ac
Same circuit, this time Boolean equation representation. How do we know that these two representations are equivalent? Are there other equivalent equations for y? Why do we need three different representations for combinational logic circuits?
Spring 2005
EECS150 lec02-review
Page 19
Spring 2005
EECS150 lec02-review
Page 20
Spring 2005
EECS150 lec02-review
Page 21