CSC 221 - Computer Logic and Organization

Shai Simonson  226 College Center   (508) 565-1008

Email:  shai@stonehill.edu

Homepage: https://web.stonehill.edu/compsci/shai.htm


Lectures:  TTh 2:30 - 3:45,  215 College Center

Text:  Digital Logic and Microprocessor Design with VHDL, 2nd Edition, by Enoch Hwang,  Cengage (email-SP123),  Amazon

Grading:  There are 500 total points you can earn in the course half from exams and half from project and homework assignments. I will discuss in class how I calculate final grades, including any details about "curves."  Feel free to ask about your grades at any time.

Exams:  There will be one midterm (20% - 100 points) and one final examination (30% - 150 points).  Here is a study guide from TA Tiziana Hernandez.  The final is Tuesday, December 19, 1:30 PM.

Goals:  To understand the theory and application of digital electronics in order to build computers.  You will study the design of two small computers on paper, and build a small prototype of a computer yourself on a "breadboard".

Teaching Assistants: 
The teaching assistants this semester are Brian Farrell and Tiziana Hernandez.   Brian is the main TA and will check homework assignments, and assist with "breadboard" lab-days in class.  Tiziana will also help with questions you might have on homework assignments or the project.  As always, you can set up 1-1 meetings with me for help with anything.  Tiziana's hour are Tuesday 5-7.  Brian's are Wednesdays 7-9.  Brian also has tutoring hours Tuesdays 12-4, and Thursdays 6-8.

Assignments and Project:   Your project and all homework assignments will be done in groups of three, with one grade given to the group.  Read our department's academic integrity guidelines before you hand in any written work. The project is 15% (75 points) of your total grade, and the written homework is 35% (175 points), comprised of 5 written homework assignments -- each 7% (35 points).

Special Dates:There are no Jewish holidays on Tuesday or Thursday this semester. The TAs will be available out of class to help you with the hardware kits, and occasionally we will have a lab day during class time..

Reference Links

Cool Circuit Simulator

Here is the Index

Electronic Components and Circuit Diagram - Self Study Free Downloadable Tool for Circuit Design and Simulation
Reference Chart for Chip Specs
Free Simulated Breadboard
Memory Slides From Edition 1

Assignments


Asg1
Asg2
Asg3
Asg4
Asg5


Take-Home Final Question (20% of Final Exam)

Bring in your solution to the final.  You may use your notes and book, but no Internet.  You must work alone.

Design an alternative (Mealey Machine style) control unit for the EC-2 computer described in section 8.3 in your text pages 380-382.  Your control unit should have only 4 states, 00, 01, 10, and 11, corresponding to the four levels of the finite state machine shown on page 380.  Use two flip flops to represent the state.  You should hand in a finite state machine diagram, next state table, next-state equations, output table, output equations, and final circuit.

Hints and comments: 
  1. Note that in class we designed two control units for my 8 op-code computer: a Moore Machine and a Mealey Machine.  This alternative finite state machine for EC-2, which I am asking you to design here, is similar to the Mealey Machine alternative we designed in class for my computer.  In particular,  the outputs in the finite state machine should be written on the edges rather than than in the states. You should use two colors on the edges, one for the input and one for the output(s).
  2. Because of the smaller number of states, the output equations will depend not only on the current state but also on the opcode, i.e., a Mealy Machine.  Thus, the next-state chart (b) on page 380 and the output chart (e) on page 381 will each have only four rows: one row for each of the four states labeled 00, 01, 10, and 11.  If a state loops in the Moore machine, it goes back to the previous state in the Mealy machine, so that it can read its input again.
  3. Moreover, the output chart (e) on page 381 will have fewer constant 0's and 1's and more entries like (IR7 IR6' IR5 + IR7 IR6 IR5').  By the way, the entry (IR7 IR6' IR5 + IR7 IR6 IR5') is the actual value that you should have in the column labeled JMPMux in the row of state 10 (binary).  It means that whenever the instruction is Jz (101) or Jpos (110), the input to the PC comes from the IR rather the incrementing unit, see page 378 for a reference diagram.  
  4. Note that the PCload signal is controlled by the AC=0 and AC>0 signals, so JMPMux only controls the source of the input to the PC but not whether that input is actually loaded.  If a branch is not taken, PCload would be 0, the PC would continue to hold its normal incremented value, and the JMPMux value is irrelevant.

Brief Syllabus

Week

Topics

 Reading

1 Introduction - How to Build a Computer:   Theory, Number Representation, Gates, Circuits, VHDL, Truth Tables
Chapters 1, 2.1 - 2.6
2-3 Boolean Algebra, Sums of Prodcuts, Products of Sums, Karnaugh Maps, Timing Diagrams
Chapters 2.7 - 2.10
4-5
Common Combinational Circuits: Arithmetic and Logic Unit, Decoders, Tri-State Buffer, Multiplexers, Comparators, Shifters.
Chapters 4.1 - 4.10
6
Project Building Orientation: .Basic Electronics, Ohm's Law (Voltage, Current, Resistance), Voltmeters, Breadboards, Chips, Wires, LEDs, Resistors, Power Supplies.
Yunten Notes

7
 General Combinational Circuit Synthesis and Review.  Hierarchical Design, PLA's.

Chapters 1-4,
Class Handouts
8
Basic Sequential Circuits:  Clocks and Timing, Latches and Flip-flops:  SR, D, JK, T flip flops, Frequency Dividers.
Chapters 5.1 - 5.11
9
Midterm Examination - TBA
10
More Sequential Circuits:  Finite State Machines (Mealy and Moore machines) as Control Circuits. Chapters 6.1 - 6.6
11-12
Common Sequential Circuits:  Memory - Registers, Counters, RAM.
Chapters 5.12 - 5.16
13-14
Simple General Purpose Microprocessors:   Machine Language, Data Path, Control Unit - FSM's Revisited.
How to Build a Computer - Putting it All Together.  Four Computers: My Computer, EC-1, EC-2, The Kit.
Chapter 8.1 - 8.5
15
Project Building:  Design of a Simple Computer: ALU, Registers, PC, RAM, Bus, I/O, Control Unit. Overall Design.
Advanced preview of Computer Architecture, if time allows: Pipelining.
Yunten Notes,
8.6