A Tutorial Introduction 1

Similar documents
Understanding Verilog Blocking and Non-blocking Assignments

The Designer's Guide to VHDL

ECE232: Hardware Organization and Design. Part 3: Verilog Tutorial. Basic Verilog

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

RAPID PROTOTYPING OF DIGITAL SYSTEMS Second Edition

Modeling Registers and Counters

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

SystemC Tutorial. John Moondanos. Strategic CAD Labs, INTEL Corp. & GSRC Visiting Fellow, UC Berkeley

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

TABLE OF CONTENTS. xiii List of Tables. xviii List of Design-for-Test Rules. xix Preface to the First Edition. xxi Preface to the Second Edition

Chapter 7: Advanced Modeling Techniques

University of Toronto Faculty of Applied Science and Engineering

Sources: On the Web: Slides will be available on:

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

Finite State Machine Design and VHDL Coding Techniques

A New Paradigm for Synchronous State Machine Design in Verilog

ECE 451 Verilog Exercises. Sept 14, James Barnes

ASYNCHRONOUS COUNTERS

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

Modeling Latches and Flip-flops

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Verilog: Blocks

The System Designer's Guide to VHDL-AMS

if-then else : 2-1 mux mux: process (A, B, Select) begin if (select= 1 ) then Z <= A; else Z <= B; end if; end process;

CHAPTER 11: Flip Flops

Chapter 2 Verilog HDL for Design and Test

EXPERIMENT 8. Flip-Flops and Sequential Circuits

FINITE STATE MACHINE: PRINCIPLE AND PRACTICE

Digital Circuit Design Using Xilinx ISE Tools

Upon completion of unit 1.1, students will be able to

E158 Intro to CMOS VLSI Design. Alarm Clock

VHDL Test Bench Tutorial

Programmable Logic Design Grzegorz Budzyń Lecture. 12: VHDL vs Verilog

Chapter 13: Verification

9/14/ :38

Discrete event modeling: VHDL

Lecture 8: Synchronous Digital Systems

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Computer Organization and Components

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Computer organization

Life Cycle of a Memory Request. Ring Example: 2 requests for lock 17

VHDL GUIDELINES FOR SYNTHESIS

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Multiplexers Two Types + Verilog

Digital Design with VHDL


NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Getting the Most Out of Synthesis

CHAPTER 3 Boolean Algebra and Digital Logic

Concurrent Programming

Programming Language Pragmatics

Digital Design Verification

CS311 Lecture: Sequential Circuits

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Software Configuration Management Using Vesta

Programming Logic controllers

Chapter 2 Logic Gates and Introduction to Computer Architecture

A Verilog HDL Test Bench Primer Application Note

Design and Implementation of an On-Chip timing based Permutation Network for Multiprocessor system on Chip

Design and Implementation of Vending Machine using Verilog HDL

Optimising the resource utilisation in high-speed network intrusion detection systems.

ESP-CV Custom Design Formal Equivalence Checking Based on Symbolic Simulation

Chapter 2 Ensuring RTL Intent

Network Traffic Monitoring an architecture using associative processing.

Aims and Objectives. E 3.05 Digital System Design. Course Syllabus. Course Syllabus (1) Programmable Logic

Finite State Machine. RTL Hardware Design by P. Chu. Chapter 10 1

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

EE361: Digital Computer Organization Course Syllabus

Mutual Exclusion using Monitors

Lab 1: Introduction to Xilinx ISE Tutorial

ASYNCHRONOUS PULSE LOGIC

Digital Electronics Detailed Outline

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

PROGETTO DI SISTEMI ELETTRONICI DIGITALI. Digital Systems Design. Digital Circuits Advanced Topics

Lecture 7: Clocking of VLSI Systems

Digital Systems Design! Lecture 1 - Introduction!!

Getting off the ground when creating an RVM test-bench

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

3. VERILOG HARDWARE DESCRIPTION LANGUAGE

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Contents. 1 Introduction. 2 Feature List. 3 Feature Interaction Matrix. 4 Feature Interactions

System on Chip Platform Based on OpenCores for Telecommunication Applications

Lecture 5: Gate Logic Logic Optimization

Designing Digital Circuits a modern approach. Jonathan Turner

Design of Digital Circuits (SS16)

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

CS 61C: Great Ideas in Computer Architecture Finite State Machines. Machine Interpreta4on

Design Verification & Testing Design for Testability and Scan

Hardware Implementation of Improved Adaptive NoC Router with Flit Flow History based Load Balancing Selection Strategy

GETTING STARTED WITH PROGRAMMABLE LOGIC DEVICES, THE 16V8 AND 20V8

AC : A PROCESSOR DESIGN PROJECT FOR A FIRST COURSE IN COMPUTER ORGANIZATION

Fault Modeling. Why model faults? Some real defects in VLSI and PCB Common fault models Stuck-at faults. Transistor faults Summary

Asynchronous Counters. Asynchronous Counters

A Platform for Visualizing Digital Circuit Synthesis with VHDL

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

Asynchronous & Synchronous Reset Design Techniques - Part Deux

Transcription:

Preface From the Old to the New Acknowledgments xv xvii xxi Verilog A Tutorial Introduction 1 Getting Started 2 A Structural Description 2 Simulating the binarytoeseg Driver 4 Creating Ports For the Module 7 Creating a Testbench For a Module 8 Behavioral Modeling of Combinational Circuits 11 Procedural Models 12 Rules for Synthesizing Combinational Circuits 13 Procedural Modeling of Clocked Sequential Circuits 14 Modeling Finite State Machines IS Rules for Synthesizing Sequential Systems 18 Non-Blocking Assignment ("<=") 19 Module Hierarchy 21 The Counter 21 A Clock for the System 21 Tying the Whole Circuit Together 22 Tying Behavioral and Structural Models Together 25 Summary 27 Exercises 28 2 Logic Synthesis 35 Overview of Synthesis 35 Register-Transfer Level Systems 35 Disclaimer 36 Combinational Logic Using Gates and Continuous Assign 37 Procedural Statements to Specify Combinational Logic 40 The Basics 40

viii The Verilog Hardware Description Language Complications Inferred Latches 42 Using Case Statements 43 Specifying Don't Care Situations 44 Procedural Loop Constructs 46 Inferring Sequential Elements 48 Latch Inferences 48 Flip Flop Inferences 50 Summary 52 Inferring Tri-State Devices 52 Describing Finite State Machines 53 An Example of a Finite State Machine 53 An Alternate Approach to FSM Specification 56 Finite State Machine and Datapath 58 A Simple Computation 58 A Datapath For Our System 58 Details of the Functional Datapath Modules 60 Wiring the Datapath Together 61 Specifying the FSM 63 Summary on Logic Synthesis 66 Exercises 68 J Behavioral Modeling 73 Process Model 73 If Then Else 75 Where Does The ELSE Belong? 80 The Conditional Operator 81 Loops 82 Four Basic Loop Statements 82 Exiting Loops on Exceptional Conditions 85 Multi-way Branching 86 If-Else-If 86 Case 86 Comparison of Case and If-Else-If 89 Casez and Casex 90 Functions and Tasks 91 Tasks 93 Functions 97 A Structural View 100 Rules of Scope and Hierarchical Names 102 Rules of Scope 102 Hierarchical Names 105

Summary 106 Exercises 106 4 Concurrent Processes 109 Concurrent Processes 109 Events 111 Event Control Statement 112 Named Events 113 The Wait Statement 116 A Complete Producer-Consumer Handshake 117 Comparison of the Wait and While Statements 120 Comparison of Wait and Event Control Statements 121 A Concurrent Process Example 122 A Simple Pipelined Processor 128 The Basic Processor 128 Synchronization Between Pipestages 130 Disabling Named Blocks 132 Intra-Assignment Control and Timing Events 134 Procedural Continuous Assignment 136 Sequential and Parallel Blocks 138 Exercises 140 5 Module Hierarchy 143 Module Instantiation and Port Specifications 143 Parameters 146 Arrays of Instances 150 Generate Blocks 151 Exercises 154

X The Verilog Hardware Description Language 6 Logic Level Modeling 157 Introduction 157 Logic Gates and Nets 158 Modeling Using Primitive Logic Gates 159 Four-Level Logic Values 162 Nets 163 A Logic Level Example 166 Continuous Assignment 171 Behavioral Modeling of Combinational Circuits 172 Net and Continuous Assign Declarations 174 A Mixed Behavioral/Structural Example 176 Logic Delay Modeling 180 A Gate Level Modeling Example 181 Gate and Net Delays 182 Specifying Time Units 185 Minimum, Typical, and Maximum Delays 186 Delay Paths Across a Module 187 Summary of Assignment Statements 189 Summary 190 Exercises 191 Cycle-Accurate Specification 195 Cycle-Accurate Behavioral Descriptions 195 Specification Approach 195 A Few Notes 197 Cycle-Accurate Specification 198 Inputs and Outputs of an Always Block 198 Input/Output Relationships of an Always Block 199 Specifying the Reset Function 202 Mealy/Moore Machine Specifications 203 A Complex Control Specification 204 Data and Control Path Trade-offs 204 Introduction to Behavioral Synthesis 209 Summary 210

8 Advanced Timing 211 xi Verflog Timing Models 211 Basic Model of a Simulator 214 Gate Level Simulation 215 Towards a More General Model 215 Scheduling Behavioral Models 218 Non-Deterministic Behavior of the Simulation Algorithm 220 Near a Black Hole 221 It's a Concurrent Language 223 Non-Blocking Procedural Assignments 226 Contrasting Blocking and Non-Blocking Assignments 226 Prevalent Usage of the Non-Blocking Assignment 227 Extending the Event-Driven Scheduling Algorithm 228 Illustrating Non-Blocking Assignments 231 Summary 233 Exercises 234 9 User-Defined Primitives 239 Combinational Primitives 240 Basic Features of User-Defined Primitives 240 Describing Combinational Logic Circuits 242 Sequential Primitives 243 Level-Sensitive Primitives 244 Edge-Sensitive Primitives 244 Shorthand Notation 246 Mixed Level- and Edge-Sensitive Primitives 246 Summary 249 Exercises 249

xii The Verilog Hardware Description Language 10 Switch Level Modeling 251 A Dynamic MOS Shift Register Example 251 Switch Level Modeling 256 Strength Modeling 256 Strength Definitions 259 An Example Using Strengths 260 Resistive MOS Gates 262 Ambiguous Strengths 263 Illustrations of Ambiguous Strengths 264 The Underlying Calculations 265 The minisim Example 270 Overview 270 The minisim Source 271 Simulation Results 280 Summary 281 Exercises 281 11 Projects 283 Modeling Power Dissipation 283 Modeling Power Dissipation 284 What to do 284 Steps 285 A Floppy Disk Controller 286 Introduction 286 Disk Format 287 Function Descriptions 288 Reality Sets In... 291 Everything You Always Wanted to Know about CRC's 291 Supporting Verilog Modules 292 Appendix A: Tutorial Questions and Discussion 293 Structural Descriptions 293 Testbench Modules 303 Combinational Circuits Using always 303

xiii Sequential Circuits 305 Hierarchical Descriptions 308 Appendix B: Lexical Conventions 309 White Space and Comments 309 Operators 310 Numbers 310 Strings 311 Identifiers, System Names, and Keywords 312 Appendix C: Verilog Operators 315 Table of Operators 315 Operator Precedence 320 Operator Truth Tables 321 Expression Bit Lengths 322 Appendix D: Verilog Gate Types 323 Logic Gates 323 BUF and NOT Gates 325 BUFIF and NOTIF Gates 326 MOS Gates 327 Bidirectional Gates 328 CMOS Gates 328 Pullup and Pulldown Gates 328 Appendix E: Registers, Memories, Integers, and Time 329 Registers 329 Memories 330 Integers and Times 331 Appendix F: System Tasks and Functions 333 Display and Write Tasks 333 Continuous Monitoring 334 Strobed Monitoring 335 File Output 335 Simulation Time 336 Stop and Finish 336 Random 336 Reading Data From Disk Files 337 Appendix G: Formal Syntax Definition 339 Tutorial Guide to Formal Syntax Specification 339

xiv The Verilog Hardware Description Language Source text 343 Declarations 346 Primitive instances 351 Module and generated instantiation 353 UDP declaration and instantiation 355 Behavioral statements 355 Specify section 359 Expressions 365 General 370 Index 373