ECEN 468 Advanced Logic Design

Similar documents
Synthesis of Language Constructs. 5/10/04 & 5/13/04 Hardware Description Languages and Synthesis

EECS150 - Digital Design Lecture 10 Logic Synthesis

CSE140L: Components and Design Techniques for Digital Systems Lab

CSE140L: Components and Design

EEL 4783: HDL in Digital System Design

EECS150 - Digital Design Lecture 10 Logic Synthesis

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

Programmable Logic Devices Verilog VII CMPE 415

Logic Synthesis. EECS150 - Digital Design Lecture 6 - Synthesis

ECEN 468 Advanced Digital System Design

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

EN164: Design of Computing Systems Lecture 06: Lab Foundations / Verilog 2

Computer Aided Design Basic Syntax Gate Level Modeling Behavioral Modeling. Verilog

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

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

Introduction to Digital Design with Verilog HDL

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

RIZALAFANDE CHE ISMAIL TKT. 3, BLOK A, PPK MIKRO-e KOMPLEKS PENGAJIAN KUKUM. SYNTHESIS OF COMBINATIONAL LOGIC (Chapter 8)

Online Verilog Resources

Synthesizable Verilog

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

Course Topics - Outline

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

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

EN2911X: Reconfigurable Computing Lecture 06: Verilog (3)

Digital Integrated Circuits

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

Verilog Behavioral Modeling

Quick Introduction to SystemVerilog: Sequental Logic

Sequential Logic Design

EN2911X: Reconfigurable Computing Lecture 05: Verilog (2)

Chap 6 Introduction to HDL (d)

EECS 427 Lecture 14: Verilog HDL Reading: Many handouts/references. EECS 427 W07 Lecture 14 1

Hardware Description Language (HDL)

Speaker: Kayting Adviser: Prof. An-Yeu Wu Date: 2009/11/23

Course Topics - Outline

CS6710 Tool Suite. Verilog is the Key Tool

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

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

Verilog Fundamentals. Shubham Singh. Junior Undergrad. Electrical Engineering

CAD for VLSI Design - I. Lecture 21 V. Kamakoti and Shankar Balachandran

Lecture #2: Verilog HDL

EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages

Introduction to Verilog/System Verilog

Problem Set 3 Solutions

Topics. Midterm Finish Chapter 7

Verilog Tutorial (Structure, Test)

Introduction to Verilog design. Design flow (from the book) Hierarchical Design. Lecture 2

Nikhil Gupta. FPGA Challenge Takneek 2012

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

Verilog introduction. Embedded and Ambient Systems Lab

Under-Graduate Project Logic Design with Behavioral Models

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

This Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Introduction to Verilog design. Design flow (from the book)

FSM and Efficient Synthesizable FSM Design using Verilog

CSE140L: Components and Design Techniques for Digital Systems Lab. Verilog HDL. Instructor: Mohsen Imani UC San Diego. Source: Eric Crabill, Xilinx

Homework deadline extended to next friday

Chapter 2 Using Hardware Description Language Verilog. Overview

Simple Behavioral Model: the always block

14. Introducton to Verilog

VHDL: RTL Synthesis Basics. 1 of 59

Verilog Design Principles

Verilog HDL Introduction

Lecture 2: Data Types, Modeling Combinational Logic in Verilog HDL. Variables and Logic Value Set. Data Types. Why use an HDL?

Lecture 15: System Modeling and Verilog

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

Behavioral Modeling and Timing Constraints

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

- 1 of 18 - The Verilog Hardware Description Language - A Behavioural View Overview. The Behavioural Model

ECEN 468 Advanced Digital System Design

Introduction To HDL. Verilog HDL. Debdeep Mukhopadhyay Dept of CSE, IIT Madras 1

A Tutorial Introduction 1

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

SystemVerilog HDL - a programming language

Contents. Appendix D Verilog Summary Page 1 of 16

Modeling Sequential Circuits in Verilog

Hardware Description Languages: Verilog

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

Digital Integrated Circuits

CSE241 VLSI Digital Circuits Winter Recitation 1: RTL Coding in Verilog

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

14. Introducton to Verilog

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

Behavioral Modeling and Timing Constraints

Finite State Machines

Verilog Hardware Description Language ROOM: B405

L5: Simple Sequential Circuits and Verilog

P-1/P-105. Samir Palnitkar. Prentice-Hall, Inc. INSTRUCTOR : CHING-LUNG SU.

Digital Design (VIMIAA01) Introduction to the Verilog HDL

VERILOG. Deepjyoti Borah, Diwahar Jawahar

Verilog 1 - Fundamentals

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation

L5: Simple Sequential Circuits and Verilog

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

Synthesis of Combinational and Sequential Circuits with Verilog

Lab 7 (All Sections) Prelab: Introduction to Verilog

Reset-able and Enable-able Registers

ES611 FPGA Based System Design. Behavioral Model

Transcription:

ECEN 468 Advanced Logic Design Lecture 28: Synthesis of Language Constructs

Synthesis of Nets v An explicitly declared net may be eliminated in synthesis v Primary input and output (ports) are always retained in synthesis v Synthesis tool will implement trireg, tri0 and tri1 nets as physical wires module and3( y, a, b, c ); input a, b, c; output y; wire y1; assign y1 = a & b; assign y = y1 & c; endmodule a b c y 2

Synthesis of Register Variables v A hardware register will be generated for a register variable when o It is referenced before value is assigned in a behavior o Assigned value in an edge-sensitive behavior and is referenced by an assignment outside the behavior o Assigned value in one clock cycle and referenced in another clock cycle v Multi-phased latches may not be supported in synthesis 3

Synthesis of Integers v Initially implemented as a 32-bit register v Always specify size when declare a constant o For example, parameter a = 3 d7 will consume 3 bits while default is 32 bits 4

Unsupported Data Types v real v time v realtime v string 5

Synthesis of Memories v No direct support v Usually implemented as array of registers v Not efficient as external memory v Minimize the usage of such memory 6

Synthesis of x and z v A description that uses explicit x or z values for data selection cannot be synthesized v The only allowed usage of x is in casex and casez statements v The only allowed use for z is in constructs that imply 3-states device v If a UDP assigns a value of x to a wire or reg, it will be treated as don t care 7

Synthesis of Assignment v Support by synthesis is vendor-specific v Continuous assignment can be mapped directly to combinational logic v Procedural assignment, LHS must be register variable v Procedural continuous assignment o Supported by some tools v PCA to register cannot be overwritten by any procedural assignment 8

Expression Substitution in Procedural Assignment module multiple_assign ( out1, out2, a, b, c, d, sel, clk ); output [4:0] out1, out2; input [3:0] a, b, c, d; input sel, clk; reg [4:0] out1, out2; always @ ( posedge clk ) begin out1 = a + b; out2 = out1 + c; if ( sel == 1 b0 ) out1 = out2 + d; end endmodule module multiple_assign ( out1, out2, a, b, c, d, sel, clk ); output [4:0] out1, out2; input [3:0] a, b, c, d; input sel, clk; reg [4:0] out1, out2; always @ ( posedge clk ) begin out2 = a + b + c; if ( sel == 1 b0 ) out1 = a + b + c + d; else out1 = a + b; end endmodule 9

Synthesis of fork join Blocks v Synthesis tools may o Either fail o Or require that it does not contain event and delay controls that are equal to or longer than a clock cycle equivalent to a set of nonblocking assignments 10

Synthesis of the disable Statement v External disables imply sequential logic v Internal disables -> reset or interrupt signals 11

Synthesis of Tasks and Functions v Synthesis tools expand tasks and functions v If multiple calls made to a task, duplicated control logic may result v No mechanism to synchronize multiple calls to the same task v A task may not contain inout ports v Any specify endspecify block is ignored by synthesis 12

Example: Sequence Detector v Single bit serial input o Synchronized to falling edge of clock v Single bit output o Assert if two or more successive 0 or 1 at input o Active on rising edge of clock Clock Input Output 13

State Transition Diagram State0 Start state 0/1 State1 0/0 1/0 1/0 State2 1/1 Input 0 0/0 Input 1 14

Example: Problematic module seq_det_wrong ( clk, rst, in, out ); input clk, rst, in; output out; reg [1:0] state; reg out; parameter state_0 = 2 b00; parameter state_1 = 2 b01; parameter state_2 = 2 b10; always @ ( posedge clk or posedge rst ) if ( rst == 1 ) state <= state_0; else case ( state ) state_0: if ( in == 0 ) state <= state_1; else state <= state_2; state_1: if ( in == 0 ) state <= state_1; else state <= state_2; state_2: if ( in == 0 ) state <= state_1; else state <= state_2; default: state <= state_0; endcase always @ ( state ) case ( state ) state_0: out <= 0; state_1: if ( in == 0 ) out <= 1; else out <= 0; state_2: if ( in == 0 ) out <= 0; else out <= 1; default: out <= 0; endcase endmodule 15

Example: Correct Version module seq_det_correct( clock, reset, in, out ); input clock, reset, in; output out; reg [1:0] state; reg out; parameter state_0 = 2 b00; parameter state_1 = 2 b01; parameter state_2 = 2 b10; always @ ( posedge clock or posedge reset ) if ( reset == 1 ) begin state <= state_0; out <= 0; end else case ( state ) state_0: if ( in == 0 ) begin state <= state_1; out <= 0; end else begin state <= state_2; out <= 0; end state_1: if ( in == 0 ) begin state <= state_1; out <= 1; end else begin state <= state_2; out <= 0; end state_2: if ( in == 0 ) begin state <= state_1; out <= 0; end else begin state <= state_2; out <= 1; end default: begin stage <= state_0; out <= 0; end endcase endmodule 16