CS61C L17 Combinatorial Logic Blocks (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.

Slides:



Advertisements
Similar presentations
CS61C L16 Representations of Combinatorial Logic Circuits (1) Beamer, Summer 2007 © UCB Scott Beamer Instructor inst.eecs.berkeley.edu/~cs61c CS61C :
Advertisements

CS61C L15 Representations of Combinatorial Logic Circuits (1) Garcia, Fall 2005 © UCB Lecturer PSOE, new dad Dan Garcia
CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L13 Combinational Logic (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #13: Combinational.
CS 61C L29 Combinational Logic Blocks (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L23 Combinational Logic Blocks (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS61C L23 Combinational Logic Blocks (1) Garcia, Spring 2007 © UCB Salamander robot!  Swiss scientists have built a robot that can both swim and walk.
CS61C L21 State Elements: CircuitsThat Remember (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L24 Introduction to CPU Design (1) Garcia, Spring 2007 © UCB Cell pic to web site  A new MS app lets people search the web based on a digital cell.
CS61C L21 State Elements : Circuits that Remember (1) Spring 2007 © UCB 161 Exabytes In 2006  In 2006 we created, captured, and replicated 161 exabytes.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2008 © UCB 100 MPG Car contest!  The X Prize Foundation has put up two prizes;
CS61C L21 State Elements : Circuits that Remember (1) Garcia, Fall 2006 © UCB One Laptop per Child  The OLPC project has been making news recently with.
CS61C L18 Introduction to CPU Design (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS 61C L35 Single Cycle CPU Control II (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS61C L22 Representations of Combinatorial Logic Circuits (1) Eric, Spring 2010 © UCB Cal Alumni Wins 2009 Turing Award! Charles P. Thacker was named.
CS61C L24 Latches (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
Lecturer PSOE Dan Garcia
CS61C L18 Combinational Logic Blocks, Latches (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
Chapter # 4: Programmable and Steering Logic Section 4.1
CS61C L23 Combinational Logic Blocks (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c UC.
CS61C L24 Introduction to CPU Design (1) Garcia, Fall 2006 © UCB Fedora Core 6 (FC6) just out  The latest version of the distro has been released; they.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 24 Introduction to CPU design Stanford researchers developing 3D camera.
CS 61C L23 Combinational Logic Blocks (1) Garcia, Fall 2004 © UCB slashdot.org/article.pl?sid=04/10/21/ &tid=126&tid=216 Lecturer PSOE Dan Garcia.
CS 61C L15 Blocks (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks.
CS 61C L21 State Elements: CircuitsThat Remember (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L28 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L22 Representations of Combinatorial Logic Circuits (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C L30 Verilog I (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
CS 61C L29 Single Cycle CPU Control II (1) Garcia, Fall 2004 © UCB Andrew Schultz inst.eecs.berkeley.edu/~cs61c-tb inst.eecs.berkeley.edu/~cs61c CS61C.
CS61C L17 Combinational Logic (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17.
CS 61C: Great Ideas in Computer Architecture Finite State Machines
CS61C L15 Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
CS 61C L15 State & Blocks (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #15: State 2 and Blocks.
CS61C L25 Representations of Combinational Logic Circuits (1) Garcia, Spring 2013 © UCB Android Brain on Robots!  “Half the weight of some robots is.
CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Functional Units Instructor: Sagar Karandikar
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
CS61C L26 Combinational Logic Blocks (1) Garcia, Spring 2014 © UCB Very fast 3D Micro Printer  A new company called Nanoscribe has developed a fabrication.
1 Lecture 9 Demultiplexers Programmable Logic Devices  Programmable logic array (PLA)  Programmable array logic (PAL)
Computer Organization and Design Lecture 16 – Combinational Logic Blocks Close call!   Cal squeaked by Washington in Overtime We win, and then.
CS3350B Computer Architecture Winter 2015 Lecture 5.4: Combinational Logic Blocks Marc Moreno Maza [Adapted from lectures.
CDA 3101 Fall 2013 Introduction to Computer Organization The Arithmetic Logic Unit (ALU) and MIPS ALU Support 20 September 2013.
Lecture 18: Hardware for Arithmetic Today’s topic –Intro to Boolean functions (Continued) –Designing an ALU 1.
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: John Wawrzynek & Vladimir Stojanovic
CS 61C L4.1.2 State (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture State and FSMs Kurt Meinz inst.eecs.berkeley.edu/~cs61c.
CSE 370 Spring 2006 Introduction to Digital Design Lecture 10: Multiplexers and Demultiplexers Last Lecture Multilevel Logic Hazards Today Multiplexers.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
CS61C L24 State Elements : Circuits that Remember (1) Garcia, Fall 2014 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS 61C: Great Ideas in Computer Architecture Finite State Machines, Functional Units 1 Instructors: Vladimir Stojanovic and Nicholas Weaver
CS 110 Computer Architecture Lecture 9: Finite State Machines, Functional Units Instructor: Sören Schwertfeger School of.
Revisão de Circuitos Lógicos PARTE III. Review Use this table and techniques we learned to transform from 1 to another.
Flip Flops Lecture 10 CAP
Lecture 11: Hardware for Arithmetic
Senior Lecturer SOE Dan Garcia
There is one handout today at the front and back of the room!
Instructors: Randy H. Katz David A. Patterson
minecraft.gamepedia.com/Tutorials/Basic_Logic_Gates
Instructor Paul Pearce
Senior Lecturer SOE Dan Garcia
Inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 23 – Representations of Combinatorial Logic Circuits TA/Punner.
Lecturer SOE Dan Garcia
en.wikipedia.org/wiki/Conway%27s_Game_of_Life
Lecture 11: Hardware for Arithmetic
Hello to Casey Holgado listening from Oklahoma State!
robosavvy.com/forum/viewtopic.php?p=32542
Inst.eecs.berkeley.edu/~cs61c CS61CL : Machine Structures Lecture #8 – State Elements, Combinational Logic Greet class James Tu, TA.
Instructor Paul Pearce
TA David “The Punner” Eitan Poll
Lecturer SOE Dan Garcia
Overview Last lecture Timing; Hazards/glitches
Instructor: Michael Greenbaum
Presentation transcript:

CS61C L17 Combinatorial Logic Blocks (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17 Combinatorial Logic Blocks

CS61C L17 Combinatorial Logic Blocks (2) Beamer, Summer 2007 © UCB Review Pipeline big-delay CL for faster clock Finite State Machines extremely useful You’ll see them again in 150, 152 & 164 Use this table and techniques we learned to transform from 1 to another

CS61C L17 Combinatorial Logic Blocks (3) Beamer, Summer 2007 © UCB Review: Logic Gates (1/2)

CS61C L17 Combinatorial Logic Blocks (4) Beamer, Summer 2007 © UCB Review: Logic Gates (2/2)

CS61C L17 Combinatorial Logic Blocks (5) Beamer, Summer 2007 © UCB Laws of Boolean Algebra

CS61C L17 Combinatorial Logic Blocks (6) Beamer, Summer 2007 © UCB Today Data Multiplexors Arithmetic and Logic Unit Adder/Subtractor Programmable Logic Arrays

CS61C L17 Combinatorial Logic Blocks (7) Beamer, Summer 2007 © UCB Data Multiplexor (here 2-to-1, n-bit-wide) “mux” Definition S Truth table

CS61C L17 Combinatorial Logic Blocks (8) Beamer, Summer 2007 © UCB N instances of 1-bit-wide mux How many rows in TT?

CS61C L17 Combinatorial Logic Blocks (9) Beamer, Summer 2007 © UCB How do we build a 1-bit-wide mux?

CS61C L17 Combinatorial Logic Blocks (10) Beamer, Summer 2007 © UCB 4-to-1 Multiplexor? How many rows in TT?

CS61C L17 Combinatorial Logic Blocks (11) Beamer, Summer 2007 © UCB Is there any other way to do it? Hint: NCAA tourney! Ans: Hierarchically!

CS61C L17 Combinatorial Logic Blocks (12) Beamer, Summer 2007 © UCB C P Q 0 1 D DC 0P 1Q Do you really understand NORs? If one input is 1, what is a NOR? If one input is 0, what is a NOR? A B NOR A B NOR A 0B’ 10 A _B_B 0 NOR

CS61C L17 Combinatorial Logic Blocks (13) Beamer, Summer 2007 © UCB C P Q 0 1 D DC 0P 1Q Do you really understand NANDs? If one input is 1, what is a NAND? If one input is 0, what is a NAND? A B NAND A NAND 01 1B’ A 1 _B_B NAND A B

CS61C L17 Combinatorial Logic Blocks (14) Beamer, Summer 2007 © UCB Administrivia Assignments HW5 due 7/26 HW6 due 7/29 Midterm Regrade Policy What you do… -On paper, explain what was graded incorrectly -Staple to front of exam and give to TA or Scott by 8/1 What we do… -Regrade the entire exam blind -Then look at what you wrote, discuss as staff, and regrade -Warning: your grade can go down

CS61C L17 Combinatorial Logic Blocks (15) Beamer, Summer 2007 © UCB What does it mean to “clobber” midterm? You STILL have to take the final even if you aced the midterm! The final will contain midterm-material Qs and new, post-midterm Qs They will be graded separately If you do “better” on the midterm-material, we will clobber your midterm with the “new” score! If you do worse, midterm unchanged. What does “better” mean? Better w.r.t. Standard Deviations around mean What does “new” mean? Score based on remapping St. Dev. score on final midterm-material to midterm score St. Dev.

CS61C L17 Combinatorial Logic Blocks (16) Beamer, Summer 2007 © UCB Arithmetic and Logic Unit Most processors contain a special logic block called “Arithmetic and Logic Unit” (ALU) We’ll show you an easy one that does ADD, SUB, bitwise AND, bitwise OR

CS61C L17 Combinatorial Logic Blocks (17) Beamer, Summer 2007 © UCB Our simple ALU

CS61C L17 Combinatorial Logic Blocks (18) Beamer, Summer 2007 © UCB Adder/Subtracter Design -- how? Truth-table, then determine canonical form, then minimize and implement as we’ve seen before Look at breaking the problem down into smaller pieces that we can cascade or hierarchically layer

CS61C L17 Combinatorial Logic Blocks (19) Beamer, Summer 2007 © UCB Adder/Subtracter – One-bit adder LSB…

CS61C L17 Combinatorial Logic Blocks (20) Beamer, Summer 2007 © UCB Adder/Subtracter – One-bit adder (1/2)…

CS61C L17 Combinatorial Logic Blocks (21) Beamer, Summer 2007 © UCB Adder/Subtracter – One-bit adder (2/2)…

CS61C L17 Combinatorial Logic Blocks (22) Beamer, Summer 2007 © UCB N 1-bit adders  1 N-bit adder What about overflow? Overflow = c n ? +++ b0b0

CS61C L17 Combinatorial Logic Blocks (23) Beamer, Summer 2007 © UCB What about overflow? Consider a 2-bit signed # & overflow: 10 = or = only 00 = 0 NOTHING! 01 = only Highest adder C 1 = Carry-in = C in, C 2 = Carry-out = C out No C out or C in  NO overflow! C in, and C out  NO overflow! C in, but no C out  A,B both > 0, overflow! C out, but no C in  A,B both < 0, overflow! ± # What op?

CS61C L17 Combinatorial Logic Blocks (24) Beamer, Summer 2007 © UCB What about overflow? Consider a 2-bit signed # & overflow: 10 = or = only 00 = 0 NOTHING! 01 = only Overflows when… C in, but no C out  A,B both > 0, overflow! C out, but no C in  A,B both < 0, overflow! ± #

CS61C L17 Combinatorial Logic Blocks (25) Beamer, Summer 2007 © UCB Extremely Clever Subtractor

CS61C L17 Combinatorial Logic Blocks (26) Beamer, Summer 2007 © UCB Review: Finite State Machine (FSM) States represent possible output values. Transitions represent changes between states based on inputs. Implement with CL and clocked register feedback.

CS61C L17 Combinatorial Logic Blocks (27) Beamer, Summer 2007 © UCB Finite State Machines extremely useful! They define How output signals respond to input signals and previous state. How we change states depending on input signals and previous state We could implement very detailed FSMs w/ Programmable Logic Arrays

CS61C L17 Combinatorial Logic Blocks (28) Beamer, Summer 2007 © UCB Taking advantage of sum-of-products Since sum-of-products is a convenient notation and way to think about design, offer hardware building blocks that match that notation One example is Programmable Logic Arrays (PLAs) Designed so that can select (program) ands, ors, complements after you get the chip Late in design process, fix errors, figure out what to do later, …

CS61C L17 Combinatorial Logic Blocks (29) Beamer, Summer 2007 © UCB inputs AND array outputs OR array product terms Programmable Logic Arrays Pre-fabricated building block of many AND/OR gates “Programmed” or “Personalized" by making or breaking connections among gates Programmable array block diagram for sum of products form And Programming: How many inputs? How to combine inputs? How many product terms? Or Programming: How to combine product terms? How many outputs?

CS61C L17 Combinatorial Logic Blocks (30) Beamer, Summer 2007 © UCB example: F0 = A + B' C' F1 = A C' + A B F2 = B' C' + A B F3 = B' C + A personality matrix 1 = uncomplemented in term 0 = complemented in term – = does not participate 1 = term connected to output 0 = no connection to output input side: 3 inputs output side: 4 outputs Product inputsoutputs termABCF0F1F2F3 AB11–0110 B'C– AC'1–00100 B'C'– A1––1001 reuse of terms; 5 product terms Enabling Concept Shared product terms among outputs

CS61C L17 Combinatorial Logic Blocks (31) Beamer, Summer 2007 © UCB Before Programming All possible connections available before “programming”

CS61C L17 Combinatorial Logic Blocks (32) Beamer, Summer 2007 © UCB After Programming Unwanted connections are "blown" Fuse (normally connected, break unwanted ones) Anti-fuse (normally disconnected, make wanted connections)

CS61C L17 Combinatorial Logic Blocks (33) Beamer, Summer 2007 © UCB notation for implementing F0 = A B + A' B' F1 = C D' + C' D AB+A'B' CD'+C'D AB A'B' CD' C'D ABCD Alternate Representation Short-hand notation--don't have to draw all the wires X Signifies a connection is present and perpendicular signal is an input to gate

CS61C L17 Combinatorial Logic Blocks (34) Beamer, Summer 2007 © UCB “And In conclusion…” Use muxes to select among input S input bits selects 2 S inputs Each input can be n-bits wide, indep of S Implement muxes hierarchically ALU can be implemented using a mux Coupled with basic block elements N-bit adder-subtractor done using N 1- bit adders with XOR gates on input XOR serves as conditional inverter Programmable Logic Arrays are often used to implement our CL

CS61C L17 Combinatorial Logic Blocks (35) Beamer, Summer 2007 © UCB Peer Instruction A. Truth table for mux with 4-bits of signals has 2 4 rows B. We could cascade N 1-bit shifters to make 1 N-bit shifter for sll, srl C. If 1-bit adder delay is T, the N-bit adder delay would also be T ABC 1: FFF 2: FFT 3: FTF 4: FTT 5: TFF 6: TFT 7: TTF 8: TTT

CS61C L17 Combinatorial Logic Blocks (36) Beamer, Summer 2007 © UCB Peer Instruction Answer A. Truth table for mux with 4-bits of signals is 2 4 rows long B. We could cascade N 1-bit shifters to make 1 N-bit shifter for sll, srl C. If 1-bit adder delay is T, the N-bit adder delay would also be T ABC 1: FFF 2: FFT 3: FTF 4: FTT 5: TFF 6: TFT 7: TTF 8: TTT A. Truth table for mux with 4-bits of signals controls 16 inputs, for a total of 20 inputs, so truth table is 2 20 rows…FALSE B. We could cascade N 1-bit shifters to make 1 N-bit shifter for sll, srl … TRUE C. What about the cascading carry? FALSE