Seoul National University

Slides:



Advertisements
Similar presentations
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Advertisements

Give qualifications of instructors: DAP
Computer Science 210 Computer Organization Clocks and Memory Elements.
1 Seoul National University Logic Design. 2 Overview of Logic Design Seoul National University Fundamental Hardware Requirements  Computation  Storage.
David O’Hallaron Carnegie Mellon University Processor Architecture Logic Design Processor Architecture Logic Design
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
Chapter Five The Processor: Datapath and Control.
State Machines Used to Design Sequential Circuits.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
CS:APP CS:APP Chapter 4 Computer Architecture Control Logic and Hardware Control Language CS:APP Chapter 4 Computer Architecture Control Logic and Hardware.
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Some Useful Circuits Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
CSC321 Where We’ve Been Binary representations Boolean logic Logic gates – combinational circuits Flip-flops – sequential circuits Complex gates – modules.
HCL and ALU תרגול 10. Overview of Logic Design Fundamental Hardware Requirements – Communication: How to get values from one place to another – Computation.
EXECUTION OF COMPLETE INSTRUCTION
1 Seoul National University Logic Design. 2 Overview of Logic Design Seoul National University Fundamental Hardware Requirements  Computation  Storage.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
Chapter 3 Digital Logic Structures. 3-2 Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs  ex:
Randal E. Bryant Carnegie Mellon University CS:APP CS:APP Chapter 4 Computer Architecture SequentialImplementation CS:APP Chapter 4 Computer Architecture.
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Datapath Design I Topics Sequential instruction execution cycle Instruction mapping to hardware Instruction decoding Systems I.
Architecture (I) Processor Architecture. – 2 – Processor Goal Understand basic computer organization Instruction set architecture Deeply explore the CPU.
Computer Architecture Carnegie Mellon University
1 Sequential CPU Implementation. 2 Outline Logic design Organizing Processing into Stages SEQ timing Suggested Reading 4.2,4.3.1 ~
CS:APP3e CS:APP Chapter 4 Computer Architecture Logic Design CS:APP Chapter 4 Computer Architecture Logic Design CENG331 - Computer Organization Murat.
Logic Design / Processor and Control Units Tony Diep.
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
1 Processor Architecture. 2 Topics Write Y86 code Basic Logic design Hardware Control Language HCL Suggested Reading: 4.1, 4.2.
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
Abstraction. Not real, not concrete A view that is removed from the reality Definitely has a "base" in reality – the "base" may be non-intuitive and not.
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.
Computer Science 210 Computer Organization
CS161 – Design and Architecture of Computer Systems
Basic Computer Organization and Design
Computer Organization and Architecture + Networks
Overview Register Transfer Language Register Transfer
Control & Execution Finite State Machines for Control MIPS Execution.
Morgan Kaufmann Publishers
Lecture 12 Logic Design Review & HCL & Bomb Lab
Introduction CPU performance factors
Morgan Kaufmann Publishers The Processor
Basics of digital systems
Morgan Kaufmann Publishers
Overview Instruction Codes Computer Registers Computer Instructions
Computer Science 210 Computer Organization
REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT
Processor (I).
Computer Organization and Design
Latches and Flip-flops
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Computer Science 210 Computer Organization
Levels in Processor Design
Introduction to Computer System
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Registers.
Recap: Performance Comparison
Levels in Processor Design
Computer Architecture
Levels in Processor Design
ECE 352 Digital System Fundamentals
Levels in Processor Design
Introduction to Computer System
Computer Systems An Introducton.
Introduction to the Architecture of Computers
Presentation transcript:

Seoul National University Logic Design

Overview of Logic Design Seoul National University Overview of Logic Design Fundamental Hardware Requirements Computation Storage Communication How to get values from one place to another Bits are Our Friends Everything expressed in terms of values 0 and 1 Compute Boolean functions Store bits of information Low or high voltage on wire

Seoul National University Digital Signals Voltage Time 1 Use voltage thresholds to extract discrete values from continuous signal Simplest version: 1-bit signal Either high range (1) or low range (0) With guard range between them Not strongly affected by noise or low quality circuit elements Can make circuits simple, small, and fast

Computing with Logic Gates Seoul National University Computing with Logic Gates out = a && b a out And | | Or out = ! Not Outputs are Boolean functions of inputs Respond continuously to changes in inputs With some, small delay Rising Delay Falling Delay a && b b Voltage a Time

Combinational Circuits Seoul National University Combinational Circuits Acyclic Network Inputs Outputs Acyclic Network of Logic Gates Continuously responds to changes on inputs Outputs become (after some delay) Boolean functions of inputs

bool eq = (a&&b)||(!a&&!b) Seoul National University Bit Equality Bit equal a b eq HCL Expression bool eq = (a&&b)||(!a&&!b) Generate 1 if a and b are equal Hardware Control Language (HCL) Very simple hardware description language Boolean operations have syntax similar to C logical operations We’ll use it to describe control logic for processors

Word-Level Representation Seoul National University Word Equality Word-Level Representation b63 Bit equal a63 eq63 b62 a62 eq62 b1 a1 eq1 b0 a0 eq0 Eq = B A Eq HCL Representation bool Eq = (A == B) 64-bit word size HCL representation Equality operation Generates Boolean value

Bit-Level Multiplexor Seoul National University Bit-Level Multiplexor s Bit MUX HCL Expression b bool out = (s&&a)||(!s&&b) out a Control signal s Data signals a and b Output a when s=1, b when s=0

Word-Level Representation Seoul National University Word Multiplexor b63 s a63 out63 b62 a62 out62 b0 a0 out0 Word-Level Representation s B A Out MUX HCL Representation int Out = [ s : A; 1 : B; ]; Select input word A or B depending on control signal s HCL representation Case expression Series of test : value pairs Output value for first successful test

HCL Word-Level Examples Seoul National University HCL Word-Level Examples Find minimum of three input words HCL case expression Final case guarantees match Minimum of 3 Words int Min3 = [ A < B && A < C : A; B < A && B < C : B; 1 : C; ]; A Min3 MIN3 B C 4-Way Multiplexor Select one of 4 inputs based on two control bits HCL case expression Simplify tests by assuming sequential matching D0 D3 Out4 s0 s1 MUX4 D2 D1 int Out4 = [ !s1&&!s0: D0; !s1 : D1; !s0 : D2; 1 : D3; ];

Arithmetic Logic Unit Combinational logic Seoul National University Arithmetic Logic Unit A L U Y X X + Y A L U Y X X - Y 1 A L U Y X X & Y 2 A L U Y X X ^ Y 3 A B A B A B A B OF Z F CF OF Z F CF OF Z F CF OF Z F CF Combinational logic Continuously responding to inputs Control signal selects function computed Corresponding to 4 arithmetic/logical operations in Y86-64 Also computes values for condition codes

Sequential Circuit: Registers Seoul National University Sequential Circuit: Registers Structure i7 D o7 Q+ C i6 D o6 Q+ C i5 I O Clock D o5 Q+ C i4 D o4 Q+ C i3 D o3 Q+ C i2 D o2 Q+ C i1 D o1 Q+ C i0 D o0 Q+ C Clock Stores word of data Different from program registers seen in assembly code Collection of edge-triggered latches Loads input on rising edge of clock

Register Operation   y x Stores data bits Seoul National University Register Operation State = x  State = y Output = y y Rising clock  x Input = y Output = x Stores data bits For most of time acts as barrier between input and output As clock rises, loads input

State Machine Example Accumulator circuit Seoul National University State Machine Example Comb. Logic A L U Out MUX 1 Clock In Load Accumulator circuit Load or accumulate on each cycle Clock Load In x0 x1 x2 x3 x4 x5 Out x0 x0+x1 x0+x1+x2 x3 x3+x4 x3+x4+x5

Register File Stores multiple words of memory Register file Seoul National University Register File Register file A B W dstW srcA valA srcB valB valW Read ports Write port Clock Stores multiple words of memory Address input specifies which word to read or write Register file Holds values of program registers %rax, %rsp, etc. Register identifier serves as address ID 15 (0xF) implies no read or write performed Multiple Ports Can read and/or write multiple words in one cycle Each has separate address and data input/output

Register File Timing   Reading Writing Like combinational logic 2 Seoul National University Register File Timing Reading Like combinational logic Output data generated based on input address After some delay Writing Like register Update only as clock rises Register file A B srcA valA srcB valB 2 x x 2 y 2 Register file W dstW valW Clock x  Register file W dstW valW Clock y 2 Rising clock 

Memory Hold instructions and data for program Seoul National University Memory data out Hold instructions and data for program Read or write, one at a time Read is like combinational logic (like register file) Write is performed only at the rising clock edge Error signal will be set if the address is out of range error Data Memory read clock write address data in

Hardware Control Language Seoul National University Hardware Control Language Very simple hardware description language Can only express limited aspects of hardware operation Parts we want to explore and modify Data Types bool: Boolean a, b, c, … int: words A, B, C, … Does not specify word size---bytes, 32-bit words, … Statements bool a = bool-expr ; int A = int-expr ;

HCL Operations Boolean Expressions Word Expressions Seoul National University HCL Operations Classify by type of value returned Boolean Expressions Logic Operations a && b, a || b, !a Word Comparisons A == B, A != B, A < B, A <= B, A >= B, A > B Set Membership A in { B, C, D } Same as A == B || A == C || A == D Word Expressions Case expressions [ a : A; b : B; c : C ] Evaluate test expressions a, b, c, … in sequence Return word expression A, B, C, … for first successful test