CS 61C L15 Blocks (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks.

Slides:



Advertisements
Similar presentations
Datorteknik DigitalCircuits bild 1 Combinational circuits Changes at inputs propagate at logic speed to outputs Not clocked No internal state (memoryless)
Advertisements

1 Lecture 14 Memory storage elements  Latches  Flip-flops State Diagrams.
Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See P&H 2.4 (signed), 2.5, 2.6, C.6, and Appendix C.6.
CS61C L15 Representations of Combinatorial Logic Circuits (1) Garcia, Fall 2005 © UCB Lecturer PSOE, new dad Dan Garcia
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.
CS 61C L14 State (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #14: State and FSMs Andy.
CS 61C L14 Combinational Logic (1) A Carle, Summer 2006 © UCB inst.eecs.berkeley.edu/~cs61c/su06 CS61C : Machine Structures Lecture #14: Combinational.
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 L17 Combinatorial Logic Blocks (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
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.
CS61C L18 Combinational Logic Blocks, Latches (1) Chae, Summer 2008 © UCB Albert Chae, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L23 Combinational Logic Blocks (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c UC.
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 L28 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.
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.
Instructor: Justin Hsia
CS 105 Digital Logic Design
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Constructing a Computer Creating a general purpose computing device.
CS 61C: Great Ideas in Computer Architecture Lecture 10: Finite State Machines, Functional Units Instructor: Sagar Karandikar
+ CS 325: CS Hardware and Software Organization and Architecture Combinational Circuits 1.
Chapter 6-1 ALU, Adder and Subtractor
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 KU College of Engineering Elec 204: Digital Systems Design Lecture 11 Binary Adder/Subtractor.
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
MicroComputer Engineering DigitalCircuits slide 1 Combinational circuits Changes at inputs propagate at logic speed to outputs Not clocked No internal.
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.
Logic Design / Processor and Control Units Tony Diep.
CS 61C L4.1.1 Combinational Logic (1) K. Meinz, Summer 2004 © UCB CS61C : Machine Structures Lecture Logic Gates and Combinational Logic
CS61C L24 State Elements : Circuits that Remember (1) Garcia, Fall 2014 © UCB Senior Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
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.
4–1. BSCS 5 th Semester Introduction Logic diagram: a graphical representation of a circuit –Each type of gate is represented by a specific graphical.
1 CS/COE0447 Computer Organization & Assembly Language Logic Design Appendix C.
CS 61C: Great Ideas in Computer Architecture MIPS Datapath 1 Instructors: Nicholas Weaver & Vladimir Stojanovic
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Revisão de Circuitos Lógicos PARTE III. Review Use this table and techniques we learned to transform from 1 to another.
Combinational Circuits
Combinational circuits
Instructors: Randy H. Katz David A. Patterson
Instructor: Justin Hsia
minecraft.gamepedia.com/Tutorials/Basic_Logic_Gates
CS/COE0447 Computer Organization & Assembly Language
Instructor Paul Pearce
Senior Lecturer SOE Dan Garcia
Lecturer SOE Dan Garcia
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.
COMS 361 Computer Organization
Instructor Paul Pearce
TA David “The Punner” Eitan Poll
1) Latched, initial state Q =1
Combinational Circuits
Instructor: Michael Greenbaum
Presentation transcript:

CS 61C L15 Blocks (1) A Carle, Summer 2005 © UCB inst.eecs.berkeley.edu/~cs61c/su05 CS61C : Machine Structures Lecture #15: Combinational Logic Blocks Andy Carle

CS 61C L15 Blocks (2) A Carle, Summer 2005 © UCB Outline CL Blocks Latches & Flip Flops – A Closer Look

CS 61C L15 Blocks (3) A Carle, Summer 2005 © UCB Review (1/3) Use this table and techniques we learned to transform from 1 to another

CS 61C L15 Blocks (4) A Carle, Summer 2005 © UCB (2/3): Circuit & Algebraic Simplification

CS 61C L15 Blocks (5) A Carle, Summer 2005 © UCB (3/3):Laws of Boolean Algebra

CS 61C L15 Blocks (6) A Carle, Summer 2005 © UCB CL Blocks Let’s use our skills to build some CL blocks: Multiplexer (mux) Adder ALU

CS 61C L15 Blocks (7) A Carle, Summer 2005 © UCB Data Multiplexor (here 2-to-1, n-bit-wide) “mux”

CS 61C L15 Blocks (8) A Carle, Summer 2005 © UCB N instances of 1-bit-wide mux

CS 61C L15 Blocks (9) A Carle, Summer 2005 © UCB How do we build a 1-bit-wide mux?

CS 61C L15 Blocks (10) A Carle, Summer 2005 © UCB 4-to-1 Multiplexor?

CS 61C L15 Blocks (11) A Carle, Summer 2005 © UCB An Alternative Approach Hierarchically!

CS 61C L15 Blocks (12) A Carle, Summer 2005 © UCB Arithmetic and Logic Unit Most processors contain a logic block called “Arithmetic/Logic Unit” (ALU) We’ll show you an easy one that does ADD, SUB, bitwise AND, bitwise OR

CS 61C L15 Blocks (13) A Carle, Summer 2005 © UCB Our simple ALU

CS 61C L15 Blocks (14) A Carle, Summer 2005 © 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

CS 61C L15 Blocks (15) A Carle, Summer 2005 © UCB N 1-bit adders  1 N-bit adder +++ b0

CS 61C L15 Blocks (16) A Carle, Summer 2005 © UCB Adder/Subtracter – One-bit adder LSB…

CS 61C L15 Blocks (17) A Carle, Summer 2005 © UCB Adder/Subtracter – One-bit adder (1/2)…

CS 61C L15 Blocks (18) A Carle, Summer 2005 © UCB Adder/Subtracter – One-bit adder (2/2)…

CS 61C L15 Blocks (19) A Carle, Summer 2005 © 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?

CS 61C L15 Blocks (20) A Carle, Summer 2005 © 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! ± #

CS 61C L15 Blocks (21) A Carle, Summer 2005 © UCB Extremely Clever Subtractor

CS 61C L15 Blocks (22) A Carle, Summer 2005 © UCB Administrivia We’re now halfway through the semester… yikes HW 45 Due Monday Proj2 coming… Logisim!

CS 61C L15 Blocks (23) A Carle, Summer 2005 © UCB State Circuits Overview State circuits have feedback, e.g. Output is function of inputs + fed-back signals. Feedback signals are the circuit's state. What aspects of this circuit might cause complications? Combi- national Logic

CS 61C L15 Blocks (24) A Carle, Summer 2005 © UCB A simpler state circuit: two inverters When started up, it's internally stable. Provide an or gate for coordination: What's the result? ! How do we set to 0?

CS 61C L15 Blocks (25) A Carle, Summer 2005 © UCB 0 Hold! An R-S latch (cross-coupled NOR gates) S means “set” (to 1), R means “reset” (to 0). Adding Q’ gives standard RS-latch: Truth table S R Q 0 0 hold (keep value) unstable A B NOR _Q_Q Hold! 0

CS 61C L15 Blocks (26) A Carle, Summer 2005 © UCB An R-S latch (in detail) Truth table _ S R Q Q Q(t+  t) hold hold reset reset set set x x unstable x x unstable A B NOR

CS 61C L15 Blocks (27) A Carle, Summer 2005 © UCB Controlling R-S latch with a clock Can't change R and S while clock is active. Clocked latches are called flip-flops. A B NOR

CS 61C L15 Blocks (28) A Carle, Summer 2005 © UCB D flip-flop are what we really use Inputs C (clock) and D. When C is 1, latch open, output = D (even if it changes, “transparent latch”) When C is 0, latch closed, output = stored value. C D AND

CS 61C L15 Blocks (29) A Carle, Summer 2005 © UCB D flip-flop details We don’t like transparent latches We can build them so that the latch is only open for an instant, on the rising edge of a clock (as it goes from 0  1) D C Q Timing Diagram

CS 61C L15 Blocks (30) A Carle, Summer 2005 © UCB Edge Detection This is a “rising-edge D Flip-Flop” When the CLK transitions from 0 to 1 (rising edge) … -Q  D; Qbar  not D All other times: Q  Q; Qbar  Qbar A B O

CS 61C L15 Blocks (31) A Carle, Summer 2005 © UCB Peer Instruction A. Truth table for mux with 4 control 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

CS 61C L15 Blocks (32) A Carle, Summer 2005 © UCB “And In conclusion…” Use muxes to select among input S input bits selects 2S 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