Spiral 1 / Unit 6. Flip-flops and Registers

Similar documents
Outcomes. Spiral 1 / Unit 6. Flip Flops FLIP FLOPS AND REGISTERS. Flip flops and Registers. Outputs only change once per clock period

Outcomes. Spiral 1 / Unit 6. Flip Flops FLIP FLOPS AND REGISTERS. Flip flops and Registers. Outputs only change once per clock period

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

University of Technology

Verilog for High Performance

Ripple Counters. Lecture 30 1

Sequential Circuit Design: Principle

Readings: Storage unit. Can hold an n-bit value Composed of a group of n flip-flops. Each flip-flop stores 1 bit of information.

Unit 15. Building Wide Muxes. Building Wide Muxes. Common Hardware Components WIDE MUXES

Sequential Circuit Design: Principle

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

Hours / 100 Marks Seat No.

ECE 465, Fall 2013, Instructor: Prof. Shantanu Dutt. Project 2 : Project Files Due Tue Nov. 26, Report Due Wed. Nov. 27, both at midnight

(Refer Slide Time: 00:01:53)

VHDL: RTL Synthesis Basics. 1 of 59

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

Lecture 12 VHDL Synthesis

Verilog Execution Semantics

Using Programmable Logic and the PALCE22V10

Sequential Logic - Module 5

CDA 4253 FPGA System Design Op7miza7on Techniques. Hao Zheng Comp S ci & Eng Univ of South Florida

register:a group of binary cells suitable for holding binary information flip-flops + gates

Modeling Synchronous Logic Circuits. Debdeep Mukhopadhyay IIT Madras

problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts

Verilog for Synthesis Ing. Pullini Antonio

Last Lecture. Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal

Nonblocking Assignments in Verilog Synthesis; Coding Styles That Kill!

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

L5: Simple Sequential Circuits and Verilog

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Topics. Midterm Finish Chapter 7

Microcomputers. Outline. Number Systems and Digital Logic Review

FPGA for Software Engineers

Modeling Sequential Circuits in Verilog

L5: Simple Sequential Circuits and Verilog

Control Unit: Binary Multiplier. Arturo Díaz-Pérez Departamento de Computación Laboratorio de Tecnologías de Información CINVESTAV-IPN

VHDL Modeling Behavior from Synthesis Perspective -Part B - EL 310 Erkay Savaş Sabancı University

Inferring Storage Elements

VHDL for Synthesis. Course Description. Course Duration. Goals

Spiral 3-1. Hardware/Software Interfacing

MCMASTER UNIVERSITY EMBEDDED SYSTEMS

L5: Simple Sequential Circuits and Verilog

ECE 4514 Digital Design II. Spring Lecture 13: Logic Synthesis

EECS150 - Digital Design Lecture 17 Memory 2

ECE 465, Spring 2010, Instructor: Prof. Shantanu Dutt. Project 2 : Due Fri, April 23, midnight.

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops. Clock Skew. Cascading Edge-triggered Flip-Flops. Why Gating of Clocks is Bad!

Philadelphia University Department of Computer Science. By Dareen Hamoudeh

Homework deadline extended to next friday

The University of Alabama in Huntsville ECE Department CPE Midterm Exam February 26, 2003

Binary Adders. Ripple-Carry Adder

Chapter 5 Registers & Counters

CSE140L: Components and Design Techniques for Digital Systems Lab

Synthesis vs. Compilation Descriptions mapped to hardware Verilog design patterns for best synthesis. Spring 2007 Lec #8 -- HW Synthesis 1

CSE 502: Computer Architecture

Control and Datapath 8

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

Good Evening! Welcome!

CSE140L: Components and Design

L5: Simple Sequential Circuits and Verilog

VERILOG: FLIP-FLOPS AND REGISTERS

EECS150 - Digital Design Lecture 10 Logic Synthesis

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

CS429: Computer Organization and Architecture

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad ELECTRONICS AND COMMUNICATIONS ENGINEERING

Lecture 24: Sequential Logic Design. Let s refresh our memory.

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Note: Closed book no notes or other material allowed, no calculators or other electronic devices.

ELCT 501: Digital System Design

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1

Timing in synchronous systems

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

Single Cycle Datapath

DESCRIPTION OF DIGITAL CIRCUITS USING VHDL

ECE 341 Midterm Exam

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Learning Outcomes. Spiral 3 1. Digital Design Targets ASICS & FPGAS REVIEW. Hardware/Software Interfacing

ECE 341 Final Exam Solution

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

Techniques for Digital Systems Lab. Verilog HDL. Tajana Simunic Rosing. Source: Eric Crabill, Xilinx

Scheme G. Sample Test Paper-I

ECE 2300 Digital Logic & Computer Organization. More Verilog Finite State Machines

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

Digital Integrated Circuits

R10. II B. Tech I Semester, Supplementary Examinations, May

EN164: Design of Computing Systems Lecture 07: Lab Foundations / Verilog 3

REGISTER TRANSFER LANGUAGE

Verilog Tutorial. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification

Verilog Tutorial 9/28/2015. Verilog Fundamentals. Originally designers used manual translation + bread boards for verification

EEL 4783: HDL in Digital System Design

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Topics of this Slideset. CS429: Computer Organization and Architecture. Digital Signals. Truth Tables. Logic Design

EE 109L Review. Name: Solutions

EEL 4783: HDL in Digital System Design

ECEU530. Homework 4 due Wednesday Oct 25. ECE U530 Digital Hardware Synthesis. VHDL for Synthesis with Xilinx. Schedule

EECS 151/251A: SRPING 2017 MIDTERM 1

Sequential Circuits. Combinational circuits

Transcription:

1-5.1 Spiral 1 / Unit 6 Flip-flops and Registers

1-5.2 Outcomes I know the difference between combinational and sequential logic and can name examples of each. I understand latency, throughput, and at least 1 technique to improve throughput I can identify when I need state vs. a purely combinational function I can convert a simple word problem to a logic function (TT or canonical form) or state diagram I can use Karnaugh maps to synthesize combinational functions with several outputs I understand how a register with an enable functions & is built I can design a working state machine given a state diagram I can implement small logic functions with complex CMOS gates

FLIP FLOPS AN REGISTERS 1-5.3

1-5.4 Flip-Flops Outputs only change once per clock period Outputs change on either the positive edges of the clock or the negative edges Positive-Edge of the Clock Negative-Edge of the Clock

1-5.5 Flip-Flops To indicate negative-edge triggered use a bubble in front of the clock input Positive-Edge Triggered -FF Negative-Edge Triggered -FF -FF -FF No bubble indicates positive-edge triggered Bubble indicates negative-edge triggered

1-5.6 Positive-Edge Triggered -FF looks at only at the positive-edge * * 0 x 1 x 0 0 1 1 1 0 only samples at the positive edges and then holds that value until the next edge

1-5.7 Negative-Edge Triggered -FF looks at only at the negative-edge * * 0 x 1 x 0 0 1 1 1 0 only samples at the negative edges and then holds that value until the next edge

1-5.8 FF Example Assume positive edge-triggered FF

1-5.9 FF Example Assume positive edge-triggered FF 1 3 5 7

1-5.10 FF Example Assume negative edge-triggered FF 1 3 5 7

1-5.11 Shift Register A shift register is a device that acts as a queue or FIFO (First-in, First-Out). It can store n bits and each bit moves one step forward each clock cycle One bit comes in the overall input per clock One bit falls out the output per clock S7 S6 S5 S4 S3 S2 S1 S0 ata In = 1 0 1 1 0 1 0 1 1 1 0 1 1 0 1 0 1 ata during clock i Last ata ata during clock i+1

1-5.12 Shift Register _IN 0 1 2 3 Clock Shift Register w/ FF s _IN 0 1 2 3

INITIALIZING OUTPUTS 1-5.13

1-5.14 Initializing Outputs Need to be able to initialize to a known value (0 or 1) FF inputs are often connected to logic that will produce values after initialization Two extra inputs are often included: PRESET and CLEAR Logic SET When CLEAR = active *=0 When SET = active *=1 When NEITHER = active Normal FF operation Note: and SET have priority over normal FF inputs

1-5.15 Initializing Outputs To help us initialize our FF s use a RESET signal Generally produced for us and given along with It starts at Active (1) when power turns on and then goes to Inactive (0) for the rest of time When it s active use it to initialize the FF s and then it will go inactive for the rest of time and the FF s will work based on their inputs RESET Active (1) at time=0 Inactive (0) for the rest of time

1-5.16 Initializing Outputs Need to be able to initialize to a known value (0 or 1) RESET 0 When RESET = 0, is inactive and looks at at each clock edge 0 Logic SET * = 0 Logic SET * = RESET 1 RESET 0

1-5.17 Implementing an Initial State When RESET is activated s initialize to 0 and then when it goes back to 1 the s look at the inputs Forces s to 0 because it s connected to the inputs RESET 0 1...... Once RESET goes to 0, the FF s look at the inputs

1-5.18 Preset / Clear Example Assume an synchronous Preset 1 3 5 7 SET

1-5.19 Using muxes to control when register save data REGISTER WITH ENABLES

1-5.20 Register Resets/Clears When the power turns on the bit stored in a flip-flop will initialize to a random value Better to initialize it to a known value (usually 0's) Use a special signal called "reset" to force the flip-flops to 0's 0 1 2 0 1 2 RST i i * 3 3 1,0 X X i 1 X 0 0 0 0 RST 0 1 1 4-bit Register

1-5.21 Register Problem Whatever the value is at the clock edge is sampled and passed to the output until the next clock edge Problem: Register will save data on EVERY edge Often we want the ability to save on one edge and then keep that value for many more cycles RST [3:0] 0010 0011 0100 0101 0110 0111 1000 1001 1010 [3:0]? 0000 0011 0100 0101 0110 0111 1000 1001 4-bit Register On clock edge, is passed to

1-5.22 Solution Registers (-FF s) will sample the bit every clock edge and pass it to Sometimes we may want to hold the value of and ignore even at a clock edge We can add an enable input and some logic in front of the -FF to accomplish this RST EN i i * EN RST 0 1 Y S FF with ata Enable (Always clocks, but selectively chooses old value,, or new value ) 0,1 X X X i 1 X X 0 0 0 X i 0 1 0 0 0 1 1 1

1-5.23 Registers w/ Enables When EN=0, value is passed back to the input and thus will maintain its value at the next clock edge When EN=1, value is passed to the input and thus will change at the edge based on EN RST EN RST When EN=0, is recycled back to the input 1 0 0 1 0 1 Y S Y S When EN=1, input is passed to FF input

1-5.24 4-bit Register w/ ata (Load) Enable Registers (-FF s) will sample the bit every clock edge and pass it to Sometimes we may want to hold the value of and ignore even at a clock edge We can add an enable input and some logic in front of the -FF to accomplish this 0 1 2 0 1 0 1 0 1 Y S Y S Y S 0 1 2 RST EN i i * 0,1 X X X i 1 X X 0 0 0 X i 0 1 0 0 0 1 1 1 3 EN RST 0 1 Y S 4-bit register with 4-bit wide 2-to-1 mux in front of the inputs 3

1-5.25 Registers w/ Enables The value is sampled at the clock edge only if the enable is active Otherwise the current value is maintained RST EN [3:0] 0010 0011 0100 0101 0110 0111 1000 1001 1010 [3:0] 0000 0101 0111 1000