Register Transfer Level in Verilog: Part II

Similar documents
Sequencing and Control

Registers and Counters

Registers and Counters

Synchronous Sequential Logic

Digital Fundamentals: A Systems Approach

CHAPTER 4 RESULTS & DISCUSSION

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Synchronous Sequential Logic

AM AM AM AM PM PM PM

Modeling Digital Systems with Verilog

1. Convert the decimal number to binary, octal, and hexadecimal.

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

Logic Design II (17.342) Spring Lecture Outline

Counter dan Register

Asynchronous (Ripple) Counters

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

Introduction. Serial In - Serial Out Shift Registers (SISO)

ELCT 501: Digital System Design

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Registers and Counters

Dr. Shahram Shirani COE2DI4 Midterm Test #2 Nov 19, 2008

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Microprocessor Design

Universal Asynchronous Receiver- Transmitter (UART)

Lab #12: 4-Bit Arithmetic Logic Unit (ALU)

LATCHES & FLIP-FLOP. Chapter 7

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Design Example: Demo Display Unit

Digital Logic Design ENEE x. Lecture 24

Logic Design. Flip Flops, Registers and Counters

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

Administrative issues. Sequential logic

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

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

COMP2611: Computer Organization. Introduction to Digital Logic

Digital Design Datapath Components: Parallel Load Register

Lecture 12. Amirali Baniasadi

IT T35 Digital system desigm y - ii /s - iii

Sequential Logic Counters and Registers

EET2411 DIGITAL ELECTRONICS

INC 253 Digital and electronics laboratory I

Registers and Counters

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

TMEL53, DIGITALTEKNIK. INTRODUCTION TO SYNCHRONOUS CIRCUITS, FLIP-FLOPS and COUNTERS

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

First Name Last Name November 10, 2009 CS-343 Exam 2

CPSC 121: Models of Computation Lab #5: Flip-Flops and Frequency Division

Chapter 5 Sequential Circuits

Flip-Flops and Sequential Circuit Design

Logic Design II (17.342) Spring Lecture Outline

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

Contents Circuits... 1

Registers and Counters

Computer Organization & Architecture Lecture #5

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

Inside Digital Design Accompany Lab Manual

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

Experiment # 12. Traffic Light Controller

A Combined Combinational-Sequential System

Principles of Computer Architecture. Appendix A: Digital Logic

Lecture 11: Synchronous Sequential Logic

CprE 281: Digital Logic

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

ELEN Electronique numérique

Review of digital electronics. Storage units Sequential circuits Counters Shifters

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

Midterm Examination II

COE328 Course Outline. Fall 2007

# "$ $ # %!"$!# &!'$("!)!"! $ # *!"! $ '!!$ #!!)! $ "# ' "

Activity Sequential Logic: An Overview

ASYNCHRONOUS COUNTER CIRCUITS

Combinational / Sequential Logic

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

CHAPTER 6 COUNTERS & REGISTERS

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

CprE 281: Digital Logic

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Question Bank. Unit 1. Digital Principles, Digital Logic


The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

Chapter 2. Digital Circuits

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

Chapter Contents. Appendix A: Digital Logic. Some Definitions

CS6201 UNIT I PART-A. Develop or build the following Boolean function with NAND gate F(x,y,z)=(1,2,3,5,7).

DIGITAL REGISTERS. Serial Input Serial Output. Block Diagram. Operation

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

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

UNIVERSITI TEKNOLOGI MALAYSIA

Tribhuvan University Institute of Science and Technology Bachelor of Science in Computer Science and Information Technology

Experiment 8 Introduction to Latches and Flip-Flops and registers

Chapter 7 Counters and Registers

Counters. ENT 263 Digital Electronics

CS3350B Computer Architecture Winter 2015

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

Transcription:

Source: M. Morris Mano and Michael D. Ciletti, Digital Design, 4rd Edition, 2007, Prentice Hall. Register Transfer Level in Verilog: Part II Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall, 2014 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/

Sequential Binary Multiplier A numerical example: 23 10111 multiplicand 19 10011 multiplier 10111 10111 00000 00000 10111 437 110110101 product The product obtained from the multiplication of two binary numbers of n bits each can have up to 2n bits. 2

Sequential Binary Multiplier Among many possibilities for distributing the effort of multiplication over multiple clock cycles: only one partial product is formed and accumulated in a single cycle of the clock Instead of shifting the multiplicand to the left, the partial product being formed is shifted to the right. When the corresponding bit of the multiplier is 0, there is no need to add all 0 s to the partial product 3

ASMD Chart Block diagram Datapath 4

ASMD Chart 5

A: a shift register with parallel load and a synchronous clear Q: a shift register with parallel load P: a binary down counter with parallel load C: a flip-flop with synchronous clear B: registers parallel load ASMD Chart 6

Design of a digital system Control Logic Control logic of the control unit Register transfer in the datapath unit 7

Control Logic-State Assignment only one bit change uses as many bits as there are states in the circuit (uses a flip-flop for each state) 8

Control Logic-Controller Design Designed manually by The sequential logic procedure outlined in Chapter 5 The sequence-register-and-decoder method One-hot design (one flip-flop per state) Automatically synthesizing the circuit from an HDL description. 9

Sequence Register and Decoder T 0 T 1 T 2 (shaded outputs: Moore-type) DG1 = T1 DG0 = T0 Start + T2 Zero' 10

Sequence Register and Decoder Instead of using flip-flop outputs, we use the outputs of the decoder to indicate the present-state condition of the sequential circuit. 11

One-Hot Design (One Flip-Flop Digital Circuit Lab per State) G1 G0 G2 By inspection! DG0 = G0 Start' + G2 Zero DG1 = G0 Start + G2 Zero' DG2 = G1 12

One-Hot Design G0 G1 By inspection! DG0 = G0 Start' + G2 Zero DG1 = G0 Start + G2 Zero' G2 DG2 = G1 13

One-Hot Design (One Flip-Flop Digital Circuit Lab per State) DG0 = G0 Start' + G2 Zero DG1 = G0 Start + G2 Zero' DG2 = G1 14

HDL of Binary Multiplier 15

default next_state=s_idle; 16

17

Testing the Multiplier 18

19

20

21

FIGURE 8.19 Simulation waveforms for one-hot state controller 22

Behavioral HDL of a Parallel Multiplier 23

24

25

Design with Multiplexers Sequence-register-and-decoder scheme Replacing the gates with multiplexers results in a regular pattern of three levels of components. The first level consists of multiplexers that determine the next state of the register. The second level contains a register that holds the present binary state. The third level has a decoder that asserts a unique output line for each control state. 26

An example ASM chart ASMD chart No datapath annotations No outputs ASM chart 27

An example (cont.) 4-state Controller Design with Multiplexers Three-level implementation TBD (present state) 28

An example (cont.) 29

An example (cont.) (two gates) 30

Design Example: Count the Number of Ones in a Register Block diagram 31

Design Example (cont.) Complete ASMD chart 32

Design Example (cont.) 33

Design Example (cont.) 34

Design Example (cont.) Control implementation 35

HDL Example HDL Example 8.8 36

HDL Example Digital Circuit Lab 37

HDL Example 38

HDL Example 39

HDL Example 40

HDL Example 41

HDL Example 42

HDL Example 43

HDL Example 44

Simulation waveforms 45

Simulation waveforms (cont.) 46