The Design Process, RTL, Netlists, and Verilog

Slides:



Advertisements
Similar presentations
Digital System Design-II (CSEB312)
Advertisements

Putting It All Together: Using Formal Verification In Real Life Erik Seligman CS 510, Lecture 19, March 2009.
Handling Complexity in FEV Erik Seligman CS 510, Lecture 6, January 2009.
Introduction to Formal Equivalence Verification (FEV)
FSM and Efficient Synthesizable FSM Design using Verilog
Simulation executable (simv)
The Verilog Hardware Description Language
Verilog Overview. University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Sequential Logic in Verilog
Synchronous Sequential Logic
Combinational Logic.
ELEN 468 Lecture 21 ELEN 468 Advanced Logic Design Lecture 2 Hardware Modeling.
Table 7.1 Verilog Operators.
Verilog Intro: Part 1.
ECE Synthesis & Verification - Lecture 2 1 ECE 667 Spring 2011 ECE 667 Spring 2011 Synthesis and Verification of Digital Circuits High-Level (Architectural)
CSE 201 Computer Logic Design * * * * * * * Verilog Modeling
Give qualifications of instructors: DAP
ECE 551 Digital System Design & Synthesis Lecture 08 The Synthesis Process Constraints and Design Rules High-Level Synthesis Options.
1 Pertemuan 9 Verilog HDL Matakuliah: H0362/Very Large Scale Integrated Circuits Tahun: 2005 Versi: versi/01.
Verilog - 1 Writing Hardware Programs in Abstract Verilog  Abstract Verilog is a language with special semantics  Allows fine-grained parallelism to.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Digital System Design by Verilog University of Maryland ENEE408C.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Verilog Sequential Circuits Ibrahim Korpeoglu. Verilog can be used to describe storage elements and sequential circuits as well. So far continuous assignment.
Silicon Programming--Intro. to HDLs1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 4 - Advanced Verilog.
University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
Digital System Design EEE344 Lecture 3 Introduction to Verilog HDL Prepared by: Engr. Qazi Zia, Assistant Professor EED, COMSATS Attock1.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Timing control in verilog Module 3.1 Delays in Verilog.
Lecture 7 Verilog Additional references Structural constructs
Overview Logistics Last lecture Today HW5 due today
Verilog Basics Nattha Jindapetch November Agenda Logic design review Verilog HDL basics LABs.
1 VERILOG Fundamentals Workshop סמסטר א ' תשע " ה מרצה : משה דורון הפקולטה להנדסה Workshop Objectives: Gain basic understanding of the essential concepts.
Introduction to FPGA AVI SINGH. Prerequisites Digital Circuit Design - Logic Gates, FlipFlops, Counters, Mux-Demux Familiarity with a procedural programming.
ECE 2372 Modern Digital System Design
Verilog Language Concepts
1 An Update on Verilog Ξ – Computer Architecture Lab 28/06/2005 Kypros Constantinides.
Digital System 數位系統 Verilog HDL Ping-Liang Lai (賴秉樑)  
Module 1.2 Introduction to Verilog
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 7: Design Example, Modeling Flip-Flops Spring.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Anurag Dwivedi. Basic Block - Gates Gates -> Flip Flops.
1 Hardware description languages: introduction intellectual property (IP) introduction to VHDL and Verilog entities and architectural bodies behavioral,
Introduction to VHDL Simulation … Synthesis …. The digital design process… Initial specification Block diagram Final product Circuit equations Logic design.
Modern VLSI Design 4e: Chapter 8 Copyright  2008 Wayne Wolf Topics Modeling with hardware description languages (HDLs).
ECE-C662 Lecture 2 Prawat Nagvajara
Modern VLSI Design 3e: Chapter 8 Copyright  1998, 2002 Prentice Hall PTR Topics n Modeling with hardware description languages (HDLs).
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
1 Verilog Digital System Design Z. Navabi, 2006 Verilog Language Concepts.
ELEE 4303 Digital II Introduction to Verilog. ELEE 4303 Digital II Learning Objectives Get familiar with background of HDLs Basic concepts of Verilog.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Introduction to ASIC flow and Verilog HDL
5-1 Logic System Design I VHDL Design Principles ECGR2181 Reading: Chapter 5.0, 5.1, 5.3 port ( I: in STD_LOGIC_VECTOR (1 to 9); EVEN, ODD: out STD_LOGIC.
FPGA-Based System Design Copyright  2004 Prentice Hall PTR Topics n Modeling with hardware description languages (HDLs).
FEV And Netlists Erik Seligman CS 510, Lecture 5, January 2009.
04/21/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Functional & Timing Verification 10.2: Faults & Testing.
1 University of Jordan Computer Engineering Department CPE 439: Computer Design Lab.
1 A hardware description language is a computer language that is used to describe hardware. Two HDLs are widely used Verilog HDL VHDL (Very High Speed.
Overview Logistics Last lecture Today HW5 due today
Adapted from Krste Asanovic
Introduction to System Verilog Assertions
Topics Modeling with hardware description languages (HDLs).
TODAY’S OUTLINE Procedural Assignments Verilog Coding Guidelines
Topics Modeling with hardware description languages (HDLs).
ECE-C662 Introduction to Behavioral Synthesis Knapp Text Ch
Introduction to Digital System and Microprocessor Design
Design Methodology & HDL
Presentation transcript:

The Design Process, RTL, Netlists, and Verilog Erik Seligman CS 510, Lecture 3, January 2009

Goals of This Lecture Review basics of VLSI design process Review important RTL design concepts Review (or learn) Verilog language All these should be review Verilog may be new if you’ve used different RTL languages But all concepts should be familiar

RTL and Netlists in the Design Process

Review: Design Process Architecture RTL Netlists Layout/Backend

FV In The Design Process FPV Architecture CDC, TOV RTL Netlists FEV Layout/Backend

Who Does Formal Verification? General DEs FEV for RTL-netlist closure Often run high-level flows, little understanding Other areas optional FPV, CDC, TOV mostly left to specialists FV Specialists Run most forms of FV But tools / methods have improved greatly My contention: many DEs could gain from use!

Focus of This Class RTL (Register Transfer Level) is most mature area for FV FEV: Formal Equivalence RTL-netlist, or RTL-RTL FPV: Formal Property Verification CDC, TOV most useful at RTL level Netlists (schematics) FEV Critical: must be equivalent to RTL Also netlist-netlist FEV for late changes useful CDC, TOV also sometimes done on netlists

RTL Design In Verilog

What Is Verilog? Hardware definition language Similar abstraction level to VHDL Multiple iterations Verilog 95: First standard version Verilog 2001: More features, very popular in modern designs SystemVerilog: Leading edge, will be unified with Verilog standard in 2009 IEEE p1800 committee

Verilog Basics Case-sensitive Event-based semantics Many events may occur at each time step Contains static and procedural code Procedural = software-like: execute in order within procedure No order among procedures or static code Nonblocking and blocking assignments Blocking = immediate Nonblocking = hold until end of time step

Common Operators Arithmetic: *,/,+,- Equality (comparison): ==, != Bitwise AND,OR,NOT: &, |, ~ Don’t confuse with logical &&, || Unary &,| can be applied to reduce a vector: &foo[2:0] = foo[2] & foo[1] & foo[0] Concatenation: {} foo[2:0] = {bar[1],bar[0],1’b0};

Data types Most commonly used: wire, reg wire = combinational value reg = more general, combo or state But NOT automatically a latch or flop: depends on usage 2-D Vector declaration a little odd 1-D, packed: wire [3:0] foo; 1-D, unpacked: wire foo[3:0]; // DON’T USE 2-D: wire [3:0] foo [1:0];

Compiler Macros Preprocessed, similar to #define in C++ Exact text substituted at preprocess time Thus hidden in many tools Recommend parameter instead of `define for consts Include ‘;’ only if defining full statement! `define MYCONST 1 `define THIS_IS_BAD 1; parameter MYCONST2 = 1; `define MYAND(x,y) (x & y) … assign foo = `MYCONST & sig; // OK assign bar = `THIS_IS_BAD & sig; // error! assign baz = MYCONST2 & sig; // OK assign xyz = `MYAND(sig1,sig2) & sig; // OK

Synthesizable Verilog “Synthesizable” subset of verilog Accepted by synthesis & FV tools Some fancy features disallowed Example: time delays (#n) This class will focus on synthesizable verilog Required by most FV tools

Basic Verilog example module mymod (i1, clk, o1); input wire i1; input wire clk; output reg o1; always @(posedge clk) begin o1 <= i1; end endmodule;

Basic Verilog example module mymod (i1, clk, o1); input wire i1; input wire clk; output reg o1; always @(posedge clk) begin o1 <= i1; end endmodule;

Basic Verilog example module mymod (i1, clk, o1); input wire i1; input wire clk; output reg o1; always @(posedge clk) begin o1 <= i1; end endmodule;

Basic Verilog example module mymod (i1, clk, o1); input wire i1; input wire clk; output reg o1; always @(posedge clk) begin o1 <= i1; end endmodule;

Basic Verilog example module mymod (i1, clk, o1); input wire i1; input wire clk; output reg o1; always @(posedge clk) begin o1 <= i1; end endmodule;

More RTL Examples

Latch example module mymod (i1, clk, o1); input wire i1; input wire clk; output reg o1; always @(clk) begin if (clk) o1 <= i1; end endmodule;

Mux example module mymod (i1, i2, sel, clk, o1); input wire i1, i2, sel; input wire clk; output reg o1; wire mux_out; assign mux_out = (sel) ? i1 : i2; always @(posedge clk) begin o1 <= mux_out; end endmodule;

State Machine example … parameter STATE0=0, STATE1=1, STATE2=2, STATE_ERR=3; reg [1:0] sm; reg [1:0] sm_next; always @(sm or i1) begin case (sm) STATE0: sm_next = STATE1; STATE1: sm_next = i1 ? STATE1: STATE2; STATE2: sm_next = STATE0; default: sm_next = STATE_ERR; endcase end always @(posedge clk) begin sm <= sm_next;

Looping and Conditionals … wire [3:0] enable; wire [3:0] newval; reg [3:0] foo; always @(posedge clk) begin for (int i=0; i<3; i++) begin if (enable[i]) begin foo[i] <= newval[i]; end

Race Condition Example … reg foo; reg foo_next; always @(i1) begin foo_next = i1; end foo_next = ~i1; always @(posedge clk) begin foo <= foo_next;

Not a Race Condition … reg foo; reg foo_next; always @(i1) begin foo_next = i1; foo_next = ~i1; end always @(posedge clk) begin foo <= foo_next;

Submodule instantiation module submod (i1, i2, sel, clk, o1); input wire i1, i2, sel; input wire clk; output reg o1; … endmodule; module topmod(…) submod subinst1 (.i1(foo), .i2(bar), .sel(sel), .clk(topclock), .o1(out)); endmodule

Generate Blocks module submod (i1, i2, sel, clk, o1); input wire i1, i2, sel; input wire clk; output reg o1; … endmodule; module topmod(…) genvar i; generate for (i=0; i<4; i++) begin submod subinst1 (.i1(foo[i]), .i2(bar), .sel(sel), .clk(topclock), .o1(out[i])); end endgenerate endmodule

Verilog Netlists

What is a netlist? Lower-level representation than RTL Maybe translated from drawn schematics But often no schematic if synthesized Represents transistor-level logic If synthesized, transistors wrapped in library cells Library cells contain true transistor logic Raw transistors may appear for custom schematic design Often Spice rather than Verilog used for transistor netlist

Synthesis Example: RTL always @(posedge clk) begin for (int i=0; i<3; i++) begin if (enable[i]) begin foo[i] <= newval[i]; end

Synthesis Example: Verilog Netlist y00EnFlop(foo_0,newval_0,enable_0, clk); y00EnFlop(foo_1,newval_1,enable_1, clk); y00EnFlop(foo_2,newval_2,enable_2, clk); y00EnFlop(foo_3,newval_3,enable_3, clk);

Transistor-Level Design Review

Basic CMOS Inverter in out in P-stack passes 1s N-stack passes 0s

CMOS NAND gate in1 in2 out in1 in2

CMOS Complex Gate Example: ~(in1&in2 | in3) out in1 in3 in2

State Elements: Latch Latch = level-sensitive How do we make an edge-sensitive flop?

Domino Logic: NAND example clk out in1 in2

Some References http://www.verilog.net http://en.wikipedia.org/wiki/Verilog http://www.asic-world.com/verilog/veritut.html http://en.wikipedia.org/wiki/CMOS http://assets.cambridge.org/97805218/73345/excerpt/9780521873345_excerpt.pdf