8 assertion based design and assertion languages
play

8. Assertion Based Design and Assertion Languages Verification - PowerPoint PPT Presentation

8. Assertion-Based Design and Assertion Languages 1 Fachgebiet Rechnersysteme 8. Assertion Based Design and Assertion Languages Verification Technology Content 8.1 Assertion-Based Design 8.2 Introduction to ITL 8.3 Introduction to SVA


  1. 8. Assertion-Based Design and Assertion Languages 1 Fachgebiet Rechnersysteme 8. Assertion Based Design and Assertion Languages Verification Technology Content 8.1 Assertion-Based Design 8.2 Introduction to ITL 8.3 Introduction to SVA Appendix: Regular expressions

  2. 8. Assertion-Based Design and Assertion Languages 2 8.1 Assertion-Based Design 8.1 Assertion Based Design Assertions properties Assertions, properties   Software:   Mainly state-based  Only one time-point involved HDL assertions   VHDL  VHDL Temporal Logic Assertions   May involve many (all) time points  May involve many (all) time-points  Safety/liveness properties  CTL (state-formulas)  LTL (path-formulas) Verification Languages   PSL (Property Specification Language)  PSL (P t S ifi ti L )  SystemVerilog Assertions (SVA)

  3. 8. Assertion-Based Design and Assertion Languages 3 8.1 Assertion-based design Assertions  Type Time-points Examples Proof procedure referenced referenced State-based 1 Software Simulation/ assertions assertions M d l Model-checking h ki Finite-window 1-20 (200) ( ) Timing g Bounded diagrams model-checking Infinite-window Infinite-window all all Temporal Temporal Model Model- logic checking formulas

  4. 8. Assertion-Based Design and Assertion Languages 4 8.1 Assertion-based design Example of property-based verification (Winkelmann,  Infineon)  UMTS base-band station chip, 1024 parallel processes, configuration changes every 10 ms, Pipelining, 100 MHz, 2M gates, 70k lines of VHDL  ~ 40k lines of assertions (properties) (560)  Regression run 2 – 80 h  200 bugs found, 50 likely to escape simulation

  5. 8. Assertion-Based Design and Assertion Languages 5 8.1 Assertion-based design Assertion-(Property)-Based Design  Assertions in VHDL Assertions in VHDL    Assertions are checked during simulation  Violated assertions lead to messages  Violated assertions lead to messages  Syntax: assert CONDITION report "TEXT" severity LEVEL; assert CONDITION report TEXT severity LEVEL;  TEXT appears if CONDITION=false  Severity: note warning error failure  Severity: note, warning, error, failure – Example: assert (S(1) and S(2)) /= ´1´ report "state 11" ( ( ) ( )) p severity note; if state 11 is reached then the message "state 11" is reported state 11 is reported

  6. 8. Assertion-Based Design and Assertion Languages 6 8.1 Assertion-based design 4 types of applications of assertions (2 soft, 2 hard)   Cosimulation after translation into HDL ("monitors")  Cosimulation after translation into HDL ( monitors ) – e.g., FOCS tool (IBM) for complex assertions Assertions Simulator S System t Description  Formal verification  Formal verification – e.g., (Bounded) Model-checker Assertions Formal Verification System y Tool Tool Description

  7. 8. Assertion-Based Design and Assertion Languages 7 8.1 Assertion-based design 4 types of applications of assertions (2 soft, 2 hard)   Generation of hardware run-time monitors and  Generation of hardware run time monitors and integration on-chip, e.g., FPGA Monitor- Assertions circuits S System t Circuit Description Hardware  Synthesis of hardware HDL Circuit Assertions

  8. 8. Assertion-Based Design and Assertion Languages 8 8.1 Assertion-based design Monitors   Transform assertions into executable VHDL  Transform assertions into executable VHDL  Co-simulate assertions and monitor truth-value or:  Generate hardware-monitors + integrate on FPGA – Commercial solutions available Commercial solutions available

  9. 8. Assertion-Based Design and Assertion Languages 9 8.1 Assertion-based design Hardware run-time monitors:   Generate hardware monitors and integrate on e g  Generate hardware monitors and integrate on, e.g., FPGA f4 f4 f2 f2 i f1 A hardware A hardware f3 monitor f5 f1 t  f4 t+2  1 f1' f1''

  10. 8. Assertion-Based Design and Assertion Languages 10 8.2 Introduction to ITL 8.2 Introduction to ITL ITL: Interval Temporal Logic   Proprietary temporal language of the MV360 formal property checker of OneSpin Solutions  Specifically tailored to the needs of incomplete BMC  Provides only references in a finite time-window

  11. 8. Assertion-Based Design and Assertion Languages 11 8.2 Introduction to ITL Properties are specified as propertys with an assume-part  (the assumption) and a prove-part (the commitment) ( p ) p p ( ) property myproperty is assume: <assumptions>; prove: prove: <commitments>; <commitments>; end property;

  12. 8. Assertion-Based Design and Assertion Languages 12 8.2 Introduction to ITL Each of the assumptions/commitments states a number of  signal-values at some time-points by means of references g p y to the time-variable t – Example: property myproperty is assume: assume: at t: x = '0'; at t+2: y = '1'; prove: at t+4: enable = '1'; at t+7: ack = y; at t+7: ack = y; end property;  The time-intervals of assumption and commitment may overlap !

  13. 8. Assertion-Based Design and Assertion Languages 13 8.2 Introduction to ITL VHDL or Verilog syntax is allowed for signals, constants,  and functions NEXT and PREV are used to refer to next or previous time-  points, respectively  The default values are 1 – Example: property myproperty is ass me assume: at t: x = '0'; prove: p at t+2: NEXT(y) = PREV(x); at t+3: y = PREV(x,2); end property; end property;

  14. 8. Assertion-Based Design and Assertion Languages 14 8.2 Introduction to ITL during and within specify relationships that have to hold  for all time-points or for at least one time-point in a p p reference time-interval, respectively – Example: property myproperty is property myproperty is assume: at t: x = '0'; prove: during[t+1,t+4]: enable = PREV(y 2); enable = PREV(y,2); end property;

  15. 8. Assertion-Based Design and Assertion Languages 15 8.2 Introduction to ITL The freeze construct introduces a new alias for the value  of a signal at a certain time-point; the alias can be g p ; referenced arbitrarily – Example: property myproperty is property myproperty is freeze: y_t = y@t; assume: at t: x = '0'; prove: within[t+1 t+4]: y = y t; within[t+1,t+4]: y = y_t; end property;

  16. 8. Assertion-Based Design and Assertion Languages 16 8.2 Introduction to ITL ITL provides much more constructs like macros, index  loops, etc. p , Semantics: "Implications between observed and expected  behaviors at arbitrarily selectable time-points in a finite time-window"

  17. 8. Assertion-Based Design and Assertion Languages 17 8.3 Introduction to SVA 8.3 Introduction to SVA SVA: SystemVerilog Assertions SVA: SystemVerilog Assertions    Rich and expressive property language  Compatible with SystemVerilog y g  Part of SystemVerilog IEEE Standard 1800  "Similar" approaches: – OVL: Open Verification Library OVL O V ifi ti Lib – Property Specification Language (PSL) Common idea: have a common and standardized Common idea: have a common and standardized   language to express properties of a design SVA resources:   1800-2009 IEEE Standard for SystemVerilog—  1800 2009 IEEE St d d f S t V il Unified Hardware Design, Specification, and Verification Language  Foster/Krolnik/Lacey: Assertion-Based Design, F t /K l ik/L A ti B d D i Kluwer 2003 (also for OVL and PSL)

  18. 8. Assertion-Based Design and Assertion Languages 18 8.3 Introduction to SVA SVA is an assertion language based on SystemVerilog   Developed at Accellera as verification extension of  Developed at Accellera as verification extension of SystemVerilog (IEEE1800-2005)  Used for formal verification as well as for the generation of simulation checkers (monitors)

  19. 8. Assertion-Based Design and Assertion Languages 19 8.3 Introduction to SVA Example 1:  req ##1 ack ##1 ~halt |-> grant ##1 grant q ## ## | g ## g  "After the sequence req=1; ack=1; halt=0, grant should be 1 for two time steps": 0 0 1 1 2 2 3 3 4 4 1 - - - - req - 1 - - - ack halt - - 0 - - grant - - 1 1 - req ##1 ack ##1 ~halt grant ##1 grant

  20. 8. Assertion-Based Design and Assertion Languages 20 8.3 Introduction to SVA Example 2:   The ack-signal must occur within 2 cycles after a  The ack-signal must occur within 2 cycles after a req-signal (including reaction at the same step as req) req |-> ##[*0:2] ack

  21. 8. Assertion-Based Design and Assertion Languages 21 8.3 Introduction to SVA SVA is organized in four layers:   Boolean expression layer  Boolean expression layer – Just HDL-compatible Boolean expressions – and, or, etc. and or etc  Sequence layer – Adds timing relationships Adds timing relationships  Property layer – Definition of Property Definition of Property  Assertion directive layer – Defines usage of property D fi f t

Recommend


More recommend