EECS 270 Fall 2014, Lecture 12 Page 1 of 8 More on minimization, start on datapath Announcements: I. Group assignment 3 posted. Depending on how this lecture goes, you may be able to start it after today, otherwise after Wednesday. Due Tuesday of next week. Exam regrade requests: Attach a sheet (or sheets) to the exam explaining why you feel something was misgraded. That sheet should include your name and uname at the top. We reserve the right to regrade anything, not just what you point out (though generally only the problems you raise as an issue) and points could go down (rare, but it has happened). Please be clear why you think your answer was correct. In general be aware that we assigned partial credit in a consistent way and we won’t be revisiting our grading guidelines. So basically we are looking for errors in grading, not arguments about how partial credit should have been assigned. I’m changing around the order we cover material for a number of reasons (mainly pacing labs). I’ll update the schedule pdf shortly. Finishing up Karnaugh maps (for now) Let’s review what we’ve done with Kmaps. Described an algorithm for finding a minimal sum-of-products form for a logic equation. o Basically a formal way to identify places to use the combining rule (A*B+!A*B=B). o Draw the truth table so that things which can combine are adjacent. o Identify terms that can be combined. Find largest group which can be combined. General idea is you draw a rectangle where dimensions are each powers of 2. o Any legal rectangle which includes only 1’s (including just a single 1) is an implicant. It will be a product term. Any implicant which can’t be made larger is a prime implicant. Also a product term. o We then identify any “1” only circled by 1 prime implicant. These are “distinguished 1’s”. The prime implicant that includes them is an essential prime implicant. o We use all essential prime implicants and as few other prime implicants as possible (mumble here) to cover all the 1’s. That forms a minimal sum-of-products solution. ab/cd 00 01 11 10 00 0 1 0 0 01 1 1 1 0 11 0 1 1 1 10 0 1 0 0 EECS 270 Fall 2014, Lecture 12 Page 2 of 8 Don’t cares: Note: I’m leaving the zeros blank to make things more readable! F W , X ,Y , Z (1,5,7,11,15) d (8,12,13,14) F WX 00 YZ 01 00 10 d d 01 1 1 d 11 1 1 10 11 1 d Use d cells to make prime implicants as large as possible. No PI should include only d’s Only 1-cells should be considered when finding the minimal cover set. EECS 270 Fall 2014, Lecture 12 II. Page 3 of 8 Register-Transfer Level Design (RTL, Chapter 5) For the most part, we’ve been tackling fairly simple problems. And for large ones, using a state machine seems like it could get very complex quite quickly. So how do we manage complex designs? The answer is a liberal sprinkling of MSI parts and a state machine to control the whole thing. Controller Datapath The Controller is a state machine. The Datapath is a collection of devices (generally MSI devices like adders, registers, etc.) with control points that lets you choose what to do. You could think of your lab 4 as a datapath where the operation (add, subtract, absolute value) might be controlled by a state machine. Our text argues that the best way to learn this is to consider a problem you want to solve, then figure out a “high-level state machine”. Then design the datapath and controller. See the table below. “Simple” example—Fire a laser. Problem specification: We want to fire a laser for “x” milliseconds. Inputs: “Fire” button (active high) 8-bit binary number (“x” in milliseconds) 1 millisecond clock. Outputs Laser control (active high) Controller Datapath EECS 270 Fall 2014, Lecture 12 Page 4 of 8 More complex example: multiplier While that table is the way you want to design these, it’s pretty hard to start there with a more complex problem. So we’re going to design the controller for a multiplier given the datapath. First we’ll need to review just what it means to multiply numbers (and binary numbers at that). 1001 * 1011 ====== First, note we could build a combinational device which does the multiplication. We could brute force it and just build the truth table (for a 4-bit device we’d get ________ rows and _______ output columns). But that wouldn’t scale very well. We could certainly come up with something trickier (like we did for N-bit adders). But it’s not obvious what that would be. So let’s build a sequential device (that takes multiple clock ticks to solve the problem). Say our multiplier is going to take some time (clock ticks) to solve the problem. In that case, we’re going to want a signal to tell it to start and one to tell us when it’s done. In addition we need the two inputs (each N bits say) and one output ___________ bits wide. Let’s say we use the following datapath: Now we need a state machine to control this… EECS 270 Fall 2014, Lecture 12 Page 5 of 8 EECS 270 Fall 2014, Lecture 12 Page 6 of 8 EECS 270 Fall 2014, Lecture 12 Page 7 of 8 EECS 270 Fall 2014, Lecture 12 Page 8 of 8