Verification SV3.1a Assumptions Surrendra Dudani Nov. 14, 2003 Synopsys, Inc.

Slides:



Advertisements
Similar presentations
1 IP-Based System-on-Chip Design 2002 IP Reuse Hardening via Embedded Sugar Assertions Erich Marschner 1, Bernard Deadman 2, Grant Martin 1 1 Cadence Design.
Advertisements

VERILOG: Synthesis - Combinational Logic Combination logic function can be expressed as: logic_output(t) = f(logic_inputs(t)) Rules Avoid technology dependent.
CS 510 Lecture 16: Verification Case Studies: Evolution From SVA 2005 to SVA 2009 Adapted from DVCon 2009 paper by Eduard Cerny 1, Surrendra Dudani 1,
Traffic light contoller using FSM
Synchronous Sequential Logic
Combinational Logic.
1 MODULE name (parameters) “Ontology” “Program” “Properties” The NuSMV language A module can contain modules Top level: parameters less module Lower level.
Give qualifications of instructors: DAP
Slide 1 7. Verilog: Combinational always statements. VHDL: Combinational Processes: To avoid (I.E. DO NOT What in your HDL code?) Cases that generate Synthesis.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
6/14/991 Symbolic verification of systems with state machines David L. Dill Jeffrey Su Jens Skakkebaek Computer System Laboratory Stanford University.
 2012 Bert Molenkamp, Jan Kuper, University of Twente, PSL Introduction to Assertion Based Verification with PSL (VHDL flavor) Bert Molenkamp Jan Kuper.
ECE 551 Digital System Design & Synthesis Lecture 09 Synthesis of Common Verilog Constructs.
FSM examples.
Leveraging Assertion Based Verification by using Magellan Michal Cayzer.
Spring 20067W. Rhett Davis with minor modifications by Dean Brock ECE 406 at UNASlide 1 ECE 406 Design of Complex Digital Systems Lecture 10: 9: State.
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.
1 Assertion Based Verification 2 The Design and Verification Gap  The number of transistors on a chip increases approximately 58% per year, according.
ECE Synthesis & Verification1 ECE 667 Spring 2011 Synthesis and Verification of Digital Systems Verification Introduction.
ELEN 468 Lecture 91 ELEN 468 Advanced Logic Design Lecture 9 Behavioral Descriptions III.
ELEN 468 Lecture 161 ELEN 468 Advanced Logic Design Lecture 16 Synthesis of Language Construct II.
Assertions in OpenVera Assertions check for the occurrence of sequences during simulation Sequence is an ordered (maybe timed) series of boolean events.
ELEN 468 Advanced Logic Design
Advanced Verilog EECS 270 v10/23/06.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Overview Logistics Last lecture Today HW5 due today
Functional Coverage Jean-Michel Chabloz. Coverage Code coverage, expression coverage, etc. are automatically inferred Functional coverage specifies what,
Some Course Info Jean-Michel Chabloz. Main idea This is a course on writing efficient testbenches Very lab-centric course: –You are supposed to learn.
SoC Verification HW #2 TA: Wei-Ting Tu Assignment: 04/12/06
System Verilog Testbench Language David W. Smith Synopsys Scientist
Chapter 4: Behavioral Modeling Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 4-1 Ders – 4: Davranışsal Modelleme.
ECE 551 Digital System Design & Synthesis Fall 2011 Midterm Exam Overview.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Ders 8: FSM Gerçekleme ve.
SystemVerilog. History Enhancement of Verilog Enhancement of Verilog 2002 – accellera publishes SystemVerilog – accellera publishes SystemVerilog.
Property Specification Language PSL. Hardware Verification Example.
1 Hybrid-Formal Coverage Convergence Dan Benua Synopsys Verification Group January 18, 2010.
Introduction to OVL (Open Verification Library) Alexander Gnusin.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Assertions Jean-Michel Chabloz. Assertions basic Idea We assert that a certain “thing” should be true. –If it is true, fine –If it is false, then we get.
Behavioral Modelling - 1. Verilog Behavioral Modelling Behavioral Models represent functionality of the digital hardware. It describes how the circuit.
SVA Encapsulation in UVM enabling phase and configuration aware assertions by Mark Litterick Verification Consultant Verilab GmbH, Munich, Germany.
VIS Technology Transfer Course Session 7 Fairness Constraints and Monitors Serdar Tasiran.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
1 ENGG 1015 Tutorial Three Examples of Finite State Machines Supplementary notes Learning Objectives  Learn about Design of Finite State Machines Ack.:
Verification Technologies IBM Haifa Labs Formal Specification Using Sugar 2.0 Cindy Eisner September 2002.
March 20, Sugar 2.0 – Proposal Presented to Accellera FVTC Cindy Eisner Joint Work with Dana Fisman IBM Research Laboratory in Haifa.
Chapter 11: System Design Methodology Digital System Designs and Practices Using Verilog HDL and 2008, John Wiley11-1 Chapter 11: System Design.
OUTLINE Introduction Basics of the Verilog Language Gate-level modeling Data-flow modeling Behavioral modeling Task and function.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 9: State Machines & Reset Behavior Spring.
1 (c) W. J. Dally Digital Design: A Systems Approach Lecture 8: Factoring State Machines.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Pusat Pengajian Kejuruteraan Mikroelektronik EMT 351/4 DIGITAL IC DESIGN Verilog Behavioural Modeling (Part 4) Week #
EMT 351/4 DIGITAL IC DESIGN Verilog Behavioral Modeling  Constructs for Activity Flow Control  Task & Function  System Tasks for Timing Checks.
Overview Logistics Last lecture Today HW5 due today
Overview Part 1 – The Design Space
Figure 8.1. The general form of a sequential circuit.
Last Lecture Talked about combinational logic always statements. e.g.,
Introduction to System Verilog Assertions
‘if-else’ & ‘case’ Statements
FSM MODELING MOORE FSM MELAY FSM. Introduction to DIGITAL CIRCUITS MODELING & VERIFICATION using VERILOG [Part-2]
Chapter 4: Behavioral Modeling
Sequential Circuit Analysis & Design
Dr. Tassadaq Hussain Introduction to Verilog – Part-3 Expressing Sequential Circuits and FSM.
The Verilog Hardware Description Language
SystemVerilog and Verification
Lecture 4: Continuation of SystemVerilog
ECE 551: Digital System Design & Synthesis
Dr. Tassadaq Hussain Introduction to Verilog – Part-4 Expressing FSM in Verilog (contd) and FSM State Encoding Dr. Tassadaq Hussain.
Introduction to Verilog – Part-2 Procedural Statements
Presentation transcript:

Verification SV3.1a Assumptions Surrendra Dudani Nov. 14, 2003 Synopsys, Inc.

Accellera Proposal: Assumptions (2) Property Assumptions assume property ( property_spec ) ; Allow properties to be considered as assumptions for formal and dynamic simulation Tools must constrain the environment such that a property holds No obligation for tools to prove the property Assumptions may be used as embedded or as declarative

Accellera Proposal: Assumptions (3) Request - acknowledge protocol When reset asserted, keep req de-asserted req can be raised at any other time req once raised, stays asserted until ack is asserted In the next clock cycle both req and ack must be de-asserted

Accellera Proposal: Assumptions (4) Assumptions governing req property clk) !reset_n |-> !req; // when reset_n is asserted (0),keep req 0 endproperty property clk) ack |=> !req; // one cycle after ack, req must be deasserted endproperty property clk) req |-> req[*1:$] ##0 ack; // hold req asserted until and including ack asserted endproperty

Accellera Proposal: Assumptions (5) Assertions governing ack property clk) !reset_n || !req |-> !ack; endproperty property clk) ack |=> !ack; endproperty

Accellera Proposal: Assumptions (6) Assume req - Assert ack a1: assume property (pr1); a2: assume property (pr2); a3: assume property (pr3); s1: assert property (pa1) else $display("\n ack asserted while req is still deassrted"); s2: assert property (pa2) else $display("\n ack is extended over more than one cycle");

Accellera Proposal: Assumptions (7) Assumptions with biasing assertion_expression ::= expression | expression dist { dist_list } Needed for driving random simulation Biasing provides a weighted choice to select the value for free variables Alignment with constraint block syntax For assertions and formal, dist converted to inside Properties must hold with or without biasing

Accellera Proposal: Assumptions (8) Assume req - Assert ack with biasing a0: assume clk) req dist {0:=40, 1:=60} ; a1: assume property (pr1); a2: assume property (pr2); a3: assume property (pr3); s0: assert clk) req inside {0, 1} ; s1: assert property (pa1) else $display("\n ack asserted while req is still deassrted"); s2: assert property (pa2) else $display("\n ack is extended over more than one cycle");

Accellera Proposal: Assumptions (9) Sequential constraints in constraint block constriant_block ::= property_instance ; | ….. Extend constraint block to allow property instances Properties become assumptions, and automatically create boolean constraints Boolean constraints from properties solved with other boolean constraints, whenever randomize function called Procedural control over randomization as before

Accellera Proposal: Assumptions (10) Example: constraints using properties When signal X is set to 1, then on the next cycle X must be reset to 0, and remains stable for four cycles, at the end of which signal Z must be set to 0 for at least one cycle When signal Y is set to 1, then on the next cycle it is reset to 0, and remains stable for two cycles at which point signal Z must be set to 1 for at least one cycle.

Accellera Proposal: Assumptions (11) Code using sequential constraints property clk) X |=> (!X)[*4] ##0 !Z; endproperty property clk) Y |=> (!Y)[*2] ##0 Z; endproperty class drive_XYZ_class; rand bit X; rand bit Y; rand bit Z; constraint pAB_Z {pA; pB;} endclass

Accellera Proposal: Assumptions (12) Randomizing sequential constraints program P(input bit clk, output bit x_port, y_port, z_port); drive_XYZ_class XYZ_driver = new(); initial forever clk) void’XYZ_driver.randomize(); x_port = X; y_port = Y; z_port = Z; end … endprogram

Accellera Proposal: Assumptions (13) Code using combinational constraints class drive_XYZ_class; bit [2:0] A_state; bit [1:0] B_state; rand bit X,Y,Z; constraint AB_Z { (( |A_state[1:0]) == 1’b1 ) => (X == 1’b0); (A_state == 3’b100) => (Z == 1’b0) && (X == 1’b0); (B_state == 2’b01) => (Z == 1’b1); (B_state == 2’b10) => (Z == 1’b1) && (Y == 1’b0); } // functions on the next slide endclass

Accellera Proposal: Assumptions (14) Functions for combinational constraints function void new(); // initialize state variables A_state = 3’b0; B_state = 2’b0; endfunction function void post_randomize(); // advances state machine case (A_state) 3’b000 : if (X == 1’b1) A_state = 3’b001; 3’b001, 3’b010, 3’b011 : A_state = A_state + 3’b001; 3’b100 : A_state = 3’b000; default : $display(“bad A_state”); endcase case (B_state) 2’b00 : if (Y == 1) B_state = 2’b01; 2’b01 : B_state = 2’b10; 2’b10 : B_state = 2’b00; default : $display(“bad B_state”); endcase endfunction endclass

Accellera Proposal: Assumptions (15) Randomizing combinational constraints program P(input bit clk, output bit x_port, y_port, z_port); drive_XYZ_class XYZ_driver = new(); initial forever clk) void’XYZ_driver.randomize(); x_port = X; y_port = Y; z_port = Z; end … endprogram

Accellera Proposal: Assumptions (16) Path to dead end state In either implementation, the constraint solver can legitimately set X to 1 in a cycle, then two cycles later, set Y to 1. After two cycles the solver is unable to solve for Z, i.e., the system of constraints is inconsistent at that point The problem is due to under-constraining (an incomplete set of constraints) Adding an additional constraint, dead end state can be eliminated

Accellera Proposal: Assumptions (17) Eliminating dead end state In either implementation, adding an additional constraint, dead end state can be eliminated property clk) X |-> ##2 !Y; endproperty

Accellera Proposal: Assumptions (18) Summary Simple syntactic extensions assume construct provides assumptions for formal analysis assume construct with biasing provides automatic random simulation Properties as sequential constraints simplify coding for randomizing complex sequences Difficulties and issues of dead end state exists for both combinational and sequential constraints