Digital Integrated Circuits

Similar documents
EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Modeling Sequential Circuits in Verilog

Digital Integrated Circuits

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

EE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007

Digital Design with FPGAs. By Neeraj Kulkarni

EE 231 Fall EE 231 Homework 8 Due October 20, 2010

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

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

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

ECEN 468 Advanced Logic Design

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

ECE 551: Digital System *

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3

Finite-State Machine (FSM) Design

Quick Introduction to SystemVerilog: Sequental Logic

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA

Hardware Description Language (HDL)

Synthesizable Verilog

Laboratory Exercise 7

C A R L E T O N U N I V E R S I T Y. FINAL EXAMINATION April Duration: 3 Hours No. of Students: 108

Verilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering

FSM and Efficient Synthesizable FSM Design using Verilog

Digital Integrated Circuits

ECE 4514 Digital Design II. Spring Lecture 15: FSM-based Control

Homework deadline extended to next friday

Sequential Logic Design

ECE 551 Digital System Design and Synthesis. Instructor: Kewal K. Saluja. Midterm Exam

Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers

Blocking(=) vs Nonblocking (<=) Assignment. Lecture 3: Modeling Sequential Logic in Verilog HDL. Procedural assignments

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

Graduate Institute of Electronics Engineering, NTU. Lecturer: Chihhao Chao Date:

Chap 6 Introduction to HDL (d)

Verilog Coding Guideline

Lecture 32: SystemVerilog

Lectures 11 & 12: Synchronous Sequential Circuits Minimization

Introduction to Verilog/System Verilog

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

EEL 4783: HDL in Digital System Design

Lecture 15: System Modeling and Verilog

General FSM design procedure

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

CSE140L: Components and Design Techniques for Digital Systems Lab

Verilog introduction. Embedded and Ambient Systems Lab

Two hours - online EXAM PAPER MUST NOT BE REMOVED FROM THE EXAM ROOM UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

RTL Design (Using ASM/SM Chart)

CSE140L: Components and Design

Mealy and Moore examples

A Brief Introduction to Verilog Hardware Definition Language (HDL)

Discussion Session 6. CS/ECE 552 Ramkumar Ravi 05 Mar 2012

Control in Digital Systems

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

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

378 Lab Survival Guide Lab tips, Verilog tricks, and other useful info

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

Verilog Behavioral Modeling

RealDigital. Problem Set #7 S1 S2 S3 Y Z X Y + Y Z X Z

Topics. Midterm Finish Chapter 7

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits

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

Design of Digital Circuits ( L) ETH Zürich, Spring 2017

CSE140L: Components and Design Techniques for Digital Systems Lab. FSMs. Instructor: Mohsen Imani. Slides from Tajana Simunic Rosing

Federal Urdu University of Arts, Science and Technology, Islamabad VLSI SYSTEM DESIGN. Prepared By: Engr. Yousaf Hameed.

Laboratory Exercise 3

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

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

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

General FSM design procedure

DIGITAL SYSTEM DESIGN

Nikhil Gupta. FPGA Challenge Takneek 2012

Chapter 5 Registers & Counters

N-input EX-NOR gate. N-output inverter. N-input NOR gate

Course Topics - Outline

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

CS6710 Tool Suite. Verilog is the Key Tool

Registers and finite state machines

ECE 4514 Digital Design II. Spring Lecture 9: Review of Key Ideas, System Commands and Testbenches

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

Finite State Machines

ECE331: Hardware Organization and Design

Sequential Logic Implementation. Mealy vs. Moore Machines. Specifying Outputs for a Mealy Machine. Specifying Outputs for a Moore Machine

VHDL VS VERILOG.

MCMASTER UNIVERSITY EMBEDDED SYSTEMS

ECE 4514 Digital Design II. Spring Lecture 2: Hierarchical Design

Synthesis of Combinational and Sequential Circuits with Verilog

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

Why Should I Learn This Language? VLSI HDL. Verilog-2

VERILOG: FLIP-FLOPS AND REGISTERS

FSM Components. FSM Description. HDL Coding Methods. Chapter 7: HDL Coding Techniques

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

Lecture 7. Standard ICs FPGA (Field Programmable Gate Array) VHDL (Very-high-speed integrated circuits. Hardware Description Language)

EECS150 - Digital Design Lecture 10 Logic Synthesis

Register Transfer Level

Lecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines

Verilog Hardware Description Language ROOM: B405

Transcription:

Digital Integrated Circuits Lecture 3 Jaeyong Chung System-on-Chips (SoC) Laboratory Incheon National University

GENERAL MODEL OF MEALY MACHINE Chung EPC6055 2

GENERAL MODEL OF MOORE MACHINE Chung EPC6055 3

MOORE SEQUENTIAL CIRCUIT Mealy Outputs Depend on Both Present State and Inputs Moore Outputs Depend Only on Present State Easier to Design and Debug Than Mealy Often Contain More States Than Mealy Chung EPC6055 4

SEQUENCE DETECTOR Circuit examines string of 0 s and 1 s applied to X input Generates output Z=1 only when input sequence is 101 Input X can change only between clock pulses Output Z=1 coincident with last 1 in 101 Circuit does not reset when 1 output occurs X= 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 0 Z= 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 Chung EPC6055 5

SEQUENCE DETECTOR Chung EPC6055 6

K-MAPS FOR NEXT STATE/OUTPUT Chung EPC6055 7

CIRCUIT FOR SEQUENCE DETECTOR Chung EPC6055 8

STATE GRAPH OF MOORE SEQUENCE DETECTOR Sequence to be detected - 101 Circuit does not reset when 1 output occurs The last 1 in 101 can be first 1 for next 101 Chung EPC6055 9

FOUR KINDS OF TRI-STATE DRIVERS Chung EPC6055 10

DATA TRANSFER USING TRI-STATE BUSSES Chung EPC6055 11

TYPES OF DESCRIPTIONS Chung EPC6055 12

NUMBER EXPRESSION IN VERILOG Chung EPC6055 13

NUMBER EXPRESSION IN VERILOG You can insert _ for readability 12 b 000_111_010_100 12 b 000111010100 12 o 07_24 Bit extension MS bit=0, x or z extend this 4 b x1 = 4 b xx_x1 MS bit=1 zero extension 4 b 1x = 4 b 00_1x Truncation Represent the same number Chung EPC6055 14

VERILOG SYNTAX Sequential Logic always statement (Procedural Construct) Format : always @ (sensitivity lists) begin end Executes Whenever Sensitivity Lists Change Can Also Be Used for Combinational Logic Design Chung EPC6055 15

VERILOG SYNTAX Sequential Logic D Flip-Flop Chung EPC6055 16

VERILOG SYNTAX Sequential Logic Asynchronous Reset D Flip-Flop Rest Asynchronous to CLK RST Chung EPC6055 17

VERILOG SYNTAX Sequential Logic Synchronous Reset D Flip-Flop Rest Synchronous to CLK RST Chung EPC6055 18

VERILOG SYNTAX always in Combinational Logic 2:1 Mux Example Chung EPC6055 19

VERILOG SYNTAX Control Statement if-else if (condition1) begin //function1 end else begin //else end Chung EPC6055 20

VERILOG SYNTAX Control Statement case case (check) check_case1 : ~~ ; //function check_case2 : ~~ ; //function : default : ~~; //Nothing Meets Above Conditions endcase Chung EPC6055 21

VERILOG SYNTAX Control Statement case case (check) check_case1 : ~~ ; //function check_case2 : ~~ ; //function : default : ~~; //Nothing Meets Above Conditions endcase Chung EPC6055 22

VERILOG SYNTAX Control Statement while : Loop Continues when Condition True while (condition) begin ~~ end for : Like in C/C++, But ++, -- Not Allowed for (condition) begin ~~ end repeat : Explicitly Give Number of Iterations loop (num_of_iteration) begin ~~ end Chung EPC6055 23

VERILOG SYNTAX Blocking vs. Non-blocking Statement Blocking Statement (= operator) Each statement Executed in Sequential Order within their blocks. Chung EPC6055 24

VERILOG SYNTAX Blocking vs. Non-blocking Statement Non-blocking Statement (<= operator) Schedule Assignments without Blocking the procedural flow. Chung EPC6055 25

PROCEDURAL TIMING CONTROL Delay controls #<time> <statement>; Delays the execution of a procedural statement by specific simulation time The right side expression is evaluated after the delay or event control Intra-assignment timing controls Ex> a = #20 b&c; Intra-assignment controls always evaluate the right side expression immediately and assign the result after the delay or event control Chung EPC6055 26

VERILOG SYNTAX Blocking vs. Non-blocking Statement Example begin a = #10 1 b1; b = #20 1 b0; c = #40 1 b1; end begin a <= #10 1 b1; b <= #20 1 b0; c <= #40 1 b1; end a b c a b c 10 20 30 40 50 60 70 80 10 20 30 40 50 60 70 80 Chung EPC6055 27

TIMESCALE `timescale <Time Unit>/<Time Precision> A compiler directive that sets the simulation s time unit size and precision. <Time Unit>: constant multiplier of time values <Time Precision>: minimum step size during simulation, which determines rounding of numerical values. Examples `timescale 1ns/1ps Chung EPC6055 28

VERILOG SYNTAX Blocking vs. Non-blocking Statement H/W Implementation module blocking (clk,a,c); input clk; input a; output c; wire clk; wire a; reg c; reg b; a D Q b always @ (posedge clk ) begin b = a; c = b; end clk c endmodule Chung EPC6055 29

VERILOG SYNTAX Blocking vs. Non-blocking Statement H/W Implementation module blocking (clk,a,c); input clk; input a; output c; wire clk; wire a; reg c; reg b; a D Q D Q b c always @(posedge clk) begin b <= a; c <= b; end endmodule Chung EPC6055 30

SEQUENCE DETECTOR IN VERILOG module seqdec(clk, x, z); input clk; input x; output z; wire xb,a,b; not i0(xb, x); and a0(z, a, x); and a1(a_in, xb, b); d_ff a_reg(a_in, clk, a); d_ff b_reg(x, clk, b); endmodule Chung EPC6055 31

SEQUENCE DETECTOR IN VERILOG Chung EPC6055 32

SEQUENCE DETECTOR IN VERILOG `timescale 1ns/1ns module seqdec_tb; reg clk, x; wire z; seqdec sd0 (clk, x, z); initial begin clk = 1; end always begin #50 clk <= ~clk; end initial begin #1 x = 0; #100 x = 0; #100 x = 0; #100 x = 0; #100 x = 1; #100 x = 1; #100 x = 0; #100 x = 1; #100 x = 1;.. end endmodule Chung EPC6055 33

SEQUENCE DETECTOR IN VERILOG Chung EPC6055 34