WELCOME TO
INTRODUCTION TO
LOGIC
DESIGN.
Comments to: pak@cse.ucsc.edu
(Last Update:
03/09/00
)
January 2000 (Under Construction)
Welcome to CE 100/L, Introduction to Logic Design. In this class
we study the principles of digital logic circuits and we get some
design experience via labs and problem sets.
Who, what, and where:
- Prerequisite: CMPE16 (Boolean algebra, simple logic gates).
Although Physics 6C (electricity and magnetism)
is not an official prerequisite, it is advantageous
to have taken Physics 6C.
- Instructor:
Pak K. Chan
- Office: 325 Baskin Engineering
- Phone: (831)459-4156
- Office hours: Tea time 10-11:15am on Wed morning
near the coffee lounge
- Lab Assistants and their Office Hours:
Jennifer Bevan , and
Birjinder Anant .
- Jennifer's Office Hours: Monday 1pm-3pm in BE104.
-
Section 1: Jennifer Bevan, 10am-noon Tue in BE104
- Birjinder's Office Hours: Wed 2pm-4pm in BE104.
-
Section 2: Birjinder Anant, 3:30-5:20pm Mon in BE104
- Texts
- Required: Digital Design: principles and practices by
John. F. Wakerly, 2nd edition, Prentice-Hall, 1994.
- Recommended, on reserve in Science Library : Logic Design Principles by
Ed J. McCluskey, Prentice-Hall.
- Recommended, on reserve in Science Library : The Essence of Logic Circuits by
Stephen H. Unger, Prentice-Hall.
- Recommended, on reserve in Science Library : The Practical Xilinx Designer LAB Book (M 2.1i version) by
David Van den Bout, Prentice-Hall.
- Recommended : The TTL Data Book by Texas Instruments or Motorola
or Fairchild
- Class meetings
- lecture location: Baskin Engineering Room 152
- lecture time: TuTh 2:00-3:45pm
- Lab Facility: BE104 has Xilinx XC4000E FPGAs, Millennium (2.1i) design
entry and implementation tools, some TTLs. Oscilloscopes.
To receive keys for Baskin Engineering Building or Omni codes for BE104:
Keys and Omni codes are now being issued from Trailer 12, middle door (room B)
by Ruth Campbell.
Please bring a deposit check of $40.00 (no cash) for a key.
There is no fee for an Omni code.
- Midterm Exam (in class) time : Feb 10, 2:00-3:45pm, 6th week
closed book, one crib sheet.
- Final Exam (in class) : Thursday, March 16 7:30-10:30pm, closed book, one crib sheet.
- Lab Exam (in lab) time: 10th week
- Academic Honesty
- Thou Shall NOT Cheat !
Cheating in any part of the course may lead to failing the course
and suspension or dismissal from the university.
- All homework assignments must be your individual effort.
Therefore, working with your friends or getting help
from others to do your homework, in part or in total, will be count as
violation of academic honesty.
The instructor and TAs will be very glad to help
you with the homeworks.
- If you have acquired solutions of homework from previous quarters
or solutions of the text book, please destroy them.
Use of any solutions to help you to do any homework
is count as violation of academic honesty.
- See Official University
Policy
- For lab assignments, you may conduct the lab with your
lab partner. Please write and submit individual lab reports.
- Grades:
- Please enroll in CMPE100 and CMPE100L concurrently.
You will receive a single grade in both CMPE100 and CMPE100L.
- Homeworks: 30%, Midterm exam: 30%, Final exam: 40%.
You must score more than 55% in each of the above category
AND score more than 75% in the lab in order to pass this class.
- There will be 7 labs.
There will be a Lab Exam (oral + practice) to test your lab skill.
Your total lab score is the sum
of all the points you earn in each lab weighted by the score of
the lab exam.
- Lab Write-Up
Grading Policy
The homework assignments for the course.
You are required to maintain two sets of assignment notebooks.
If you submit the homework in loose papers, they will be returned ungraded.
Typically, I assign homeworks on thursdays, and
all assignments are due at the beginning of class on the next thursday.
Problems are unequal weights. Drill problems carry less weights.
Assignment 6 :
Do all 5 problems.
Due Tuesday, March 7, 2000 in class (please use a note book).
- Referring to the Mealy GUM vending machine discussed in the class.
Use D edge-triggered flip-flops.
- Present the State table.
- Use Gray code for state assignment: S0=00, S1=01, S2=10
- Use two bits to encode the inputs: N, D, and E.
N=<0,0>, D=<0,1>, and E=<1,1>
- Present the Excitation table.
- Draw the excitation Karnaugh maps for the next state logic
of each D edge-triggered flip-flops.
- Derive the output logic.
- Derive the excitation equations from the maps.
-
An negative-edge-detector is a finite-state machine with a single input whose
output goes low for exactly one clock cycle when the input goes
low and stays low until the next clock. We assume that the input
changes at a slow enough rate that it does not have two transitions
within any single clock period. Notice that the input is
unsynchronized ,
which means you cannot feed the input directly into the state machine.
Take this into consideration in your design.
Use D edge-triggered flip-flops.
- Determine whether a Moore or a Mealy machine will be the
most appropriate for the design.
- Draw the state diagram. Highlight the initial (RESET) state.
- Present the State table.
- Choose a good state encoding to encode the state, be wise.
- Present the Excitation table.
- Draw the excitation Karnaugh maps for the next state logic
of each D edge-triggered flip-flops.
- Draw the Karnaugh map for output logic.
- Derive the excitation and output equations from the maps.
- Present a logic diagram of the implementation of the FSM,
check if the logic make sense.
- Complete the timing diagram for the arbiter that was discussed
in class.
- Expand the idea of the two-processor arbiter that was discussed in class:
a new arbiter has to process 3 requests R1, R2, and R3
from Processors 1, 2, and 3 respectively.
The new arbiter has 3 output signals, G1, G2 and G3.
The new arbiter has to be fair.
Processor 1 has a small edge over Processor 2,
and Processor 2 has a small edge over Processor 3.
Question: draw a state diagram for the new arbiter.
Minimize the number of states.
Yes, I want just the state diagram.
- Complete the timing diagram for the one-hot encoded FSM
that was discussed in class. Assuming that each
logic gate incurs one delta delay.
Solution 6
Assignment 5 :
Do all 6 problems.
Due Thursday, Feb 24, 2000 in class (please use a note book).
Problem 6 is related to the lab. You should have
most of it done before coming to the lab.
- Read chapter 7.4, 8.1, 8.2, 8.3
- Gray code counter: Design a 3-bit Gray code counter.
Let output=state value.
Use D edge-triggered flip-flops.
- Draw a state diagram. Highlight the initial (RESET) state.
- Present a transition table (see pg 471 of text for definition).
- Draw the excitation Karnaugh maps for the next state logic
of each D edge-triggered flip-flops.
- Derive the excitation equations from the maps.
- Modulo counter: Design a mod 6 binary counter.
The constraint is
output=state values
Use D edge-triggered flip-flops.
- Draw a state diagram. Highlight the initial (RESET) state.
- Present a transition table.
- Draw the excitation Karnaugh maps for the next state logic
of each D edge-triggered flip-flops.
- Derive the excitation equations from the maps.
- Design a counter that output the following sequence repeatedly:
(54)->(89)->(13)
Let
output = function(state values)
Use D edge-triggered flip-flops.
Represent the output as two Binary-Coded Decimal (BCD) digits, that is 8 bits.
For example, (54) is reprsented as <0101 0100>
Notice that the counting sequence is short, but the number of output bits
is large. Use one-hot encoding for state assignment.
- Draw a state diagram. Highlight the initial (RESET) state.
- Present a Transition and output table.
- Draw the excitation (Karnaugh) maps for the next state logic
of each D edge-triggered flip-flops.
- Draw the Karnaugh maps for the output logic.
- Derive the excitation and output equations from maps.
- Design a counter that output the following sequence repeatedly:
(54)->(89)->(13)
Let
output = state values
Use D edge-triggered flip-flops.
Represent the output as two BCD digits, that is 8 bits.
Notice that the counting sequence is short, but the number of output bits
is large.
- Draw a state diagram. Highlight the initial (RESET) state.
- Present a Transition table.
- Draw the excitation (Karnaugh) maps for the next state logic
of each D edge-triggered flip-flops.
- Derive the excitation equations from the excitation maps.
- Do the Mealy finite-state machine (traffic light controller) design for Lab 5.
Use D edge-triggered flip-flops.
- Draw a state diagram. Highlight the initial (RESET) state.
- Present a State/Output table.
- (Must) Use one-hot encoding for state assignment.
- Present an Excitation table.
- Draw the excitation Karnaugh maps for the next state logic
of each D edge-triggered flip-flops.
(If the number of input variables for your Karnaugh maps
is too many, you may do it by inspection.)
- Draw the Karnaugh map for output logic.
- Derive the excitation equations from the maps.
Solution 5
- Assignment 4 : do all 6 problems, due Feb 8, 2000.
Solution will be available by then.
- Read
Electrical Circuits Review
by Bruce M. Fleischer (.pdf, 85K).
Also in appendix of the 1st edition of the Wakerly book.
- Read Chapter 3.1-3.5, 3.7, 3.9.
- Three resistors R1, R2,
and R3 are connected in parallel.
Using the first principles (KCL, KVL, and Ohm's Law) to
find the equivalent resistance ( Req ) of these resistors.
Please show all your derivations starting from
the first principles.
- Current divider:
Show that when two resistors R1 and and R2 are connected in parallel,
the resistors divide the total current (sum of the currents
in the resistors) proportional to
R1/(R1+R2) for R2, and proportional to R2/(R1+R2) for R1.
Please start from the first principles: KCL, KVL and Ohm's Law.
- Do problem B.4 (the resistor cube) in
Electrical Circuits Review
by Bruce M. Fleischer.
Or A.4 (the resistor cube) in Appendix of the 1st edition of
Walkerly's Book.
Hint: this is an exercise of KCL, so be tricky,
look at the cube carefully, look for symmetry ... use KCL ...
current is divided at each junction.
- (midf99 problem)
Given resistors R1, R2, R3 and voltage source VCC.
Using the first principles (KCL, KVL, Ohm's Law) to
represent VOUT in terms of R1, R2, R3 and VCC.
- 3.13
- 3.65
Solution 4
- Assignment 3 : Do all 7 problems. Due Jan 27, 2000, 2pm in class.
- Read Chapter 4.3
- Do problems in Text 4.13 a,b,c,e;
and find both minimal
product-of-sums and minimal sum-of-products forms.
Skip the "indicate the distinguished 1-cells in each map" part
for now.
- Text 4.49. Do also (supplement to c) f = xy + x'y'
- Text 4.56
- Text 4.60 c,d,e; and
find both minimal
product-of-sums and minimal sum-of-products forms.
- (Fall 99 final)
A 2-bit comparator switching function f receives two 2-bit
vectors vec(P) and vec(Q).
vec(P) = < P_1 P_0 >
representing the magnitude of a positive integer P, and
vec(Q) = < Q_1 Q_0 >
representing the magnitude of a positive integer Q.
The comparator function f produces
a 1 output if and only if P is greater than or equal to Q.
Find the minimal sum-of-products (SOP) form
for f using only algebraic simplification technique.
Start with the following switching expression and state
the switching theorem used in each step of the simplification.
The * symbol represents the Boolean AND operation.
f = P_1*Q_1' + (P_1*Q_1 + P_1'* Q_1')*(P_0 + P_0'*Q_0')
- Text 4.62 e,f.
Solution 3
- Assignment 2 : Do all 9 problems. Due Jan 20, 2000, 2pm in class.
-
Read chapter 2.1-2.7,2.8,2.11-12,2.14,2.15
-
Read chapter 4.1
- Do exercise Text 2.19, but the equation should really be
[x+y] = ( [x] + [y] ) modulo 2^n
- Do exercise Text 2.22
- Encode the decimal number 251 in Hamming Code for
single-error correction using odd parity.
Derive the number of syndrome bits that is needed.
Show the encoding (coded message=message+syndrome), step by step.
Inject an error in position 6 of the code.
Remember, according to Richard W. Hamming
the left most position is position one.
Evaluate the syndrome, and verify that the error indeed can be
corrected.
Show the error correction, step by step.
-
Suppose that Axioma (A3), (A3'), (A4), (A4), (A5), and (A5')
of the switching algebra
are being replaced by new binary operators + and . defined
by:
+ | 0 1 . | 0 1
----------- -----------
0 | 0 1 0 | 1 1
1 | 1 0 1 | 1 0
What effect will these changes have on Theorems (T1) to (T5')?
Will the Theorems still hold?
(The formal way of stating the previous questions:
Does the binary operators constitute a switch algebra?)
- Do Text Exercises 4.30
- Do Text Exercises 4.25, 4.26
- Do Text Drill Problems 4.5, 4.6
Solution 2
- Assignment 1 : Do all 10 problems. Due Jan 13, 2000, 2pm in
class. Please show all steps.
- Read chapter 2.1-2.4.
- Optional: read ahead chapter 2.5-2.6
if you are comfortable with the material
- Do exercises Text 2.2a, 2.2f
- Do exercises Text 2.4e, 2.4j, 2.5g
- (Midterm Fall99) Convert the following decimal number
<3485321>
to the radix 2 binary representation (without leading zeroes).
- Given radix=2, D={0,1,-1}, n=8, and the interpretation rule
for a bit vector vec(x) is simply mag(vec(x)).
See equation (1) below for the definition of mag().
A value X is currently represented by the bit vector:
<01010101>
Problem: find a different representation of X.
- Text 2.10
- Find the simplest closed-form expression for the
following sum to n terms
5 + 55 + 555 + 5555 + 55555 + .... + ..
all numbers are represented in decimal.
- Text 2.16
- (Midterm Fall99)
Solution 1
All labs meet in Baskin Engineering 104.
The first lab starts on Jan 10 of the quarter.
There are 7 laboratory assignments for the course.
Requirements:
Your designs must work, you must turn in all your lab reports on time.
No partial credits for nonfunctional or flakey designs.
You are required to maintain two sets of lab-report notebooks.
Please read and print out the lab before coming to your lab section,
the printer will be turned off during the first half hour of the lab.
If you don't design your labs by these standards, you will most
certainly be penalized on your lab writeup grade.
Use one of your Lab books to turn in lab reports.
Please include:
- Title
- Objectives and/or Specifications
- Methods (steps, techniques) and apparatus,
- Problems and solutions
- Results
- Drawings, Schematics and/or timing diagrams
in your lab report.
What we are going to look at.
Below is the expected syllabus for this course to give you an idea of
which topics will be discussed when.
We may deviate a bit from this depending on class feedback.
- Week 1: Number representation, arithmetic, codes, code
conversions (2.1-2.7,2.8,2.11-12,2.14,2.15)
- Week 2: Boolean/Switching algebra,
minimization, and Karnaugh maps (ch 4)
- Week 3: Basic electronics and logic gates (some of ch 3).
You may want to read
Electrical Circuits Review
by Bruce M. Fleischer (.pdf, 85K).
Also in appendix of the 1st edition of the Wakerly book.
- Week 4: Combinational logic design practices (ch 5)
- Week 5: MIDTERM
- Week 6: Sequential logic design, flip-flops
- Week 7: Synchronous Sequential Circuits, Finite State Machines
- Week 8: Sequential logic design, Finite State Machines
- Week 9: Asynchronous sequential design (latches)
- Week 10: Programmable logic devices (PLA, PAL, FPGA)