on-the-fly synthesis of multi-clock sva

63
On-the-fly Synthesis of Multi-Clock SVA Jiang Long Andrew Seawright Paparao Kavalipati IWLS’ 2008

Upload: elata

Post on 31-Jan-2016

67 views

Category:

Documents


0 download

DESCRIPTION

On-the-fly Synthesis of Multi-Clock SVA. Jiang Long Andrew Seawright Paparao Kavalipati. IWLS’ 2008. Outline. Introduction Background and scope Related works Synthesizing multi-clock SVA Single clock assertion compilation Compile through rewriting On-the-fly synthesis algorithm - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: On-the-fly Synthesis of  Multi-Clock SVA

On-the-fly Synthesis of Multi-Clock SVA

Jiang Long

Andrew Seawright

Paparao Kavalipati

IWLS’ 2008

Page 2: On-the-fly Synthesis of  Multi-Clock SVA

2

Outline

Introduction— Background and scope— Related works

Synthesizing multi-clock SVA— Single clock assertion compilation— Compile through rewriting— On-the-fly synthesis algorithm

Proof of correctness

Experimental results and conclusions

Page 3: On-the-fly Synthesis of  Multi-Clock SVA

3

Formal Model for Multi-Clock Designs

Clock

Specification

RTL

Design

SVA

Assertions

Page 4: On-the-fly Synthesis of  Multi-Clock SVA

4

Multi-Clock Modeling

0

1

clk0_posedge

data_in1

@posedge clk0

data_in1

mclk

Page 5: On-the-fly Synthesis of  Multi-Clock SVA

5

Objective

Synthesize SVA into Checker logic— Generic checker logic

Utilize existing FV framework/technique/optimization Utilize existing multi-clock network

— Optimize checker logic size Number of sequentials and gates

— Validation Proof of correctness

Page 6: On-the-fly Synthesis of  Multi-Clock SVA

6

SVA Abstract Grammar – Unclocked Sequence

Sequences define language of words

Booleans b

Concatenation R1 ##1 R2

Or R1 or R2

Repetition R1 [*0:$]

Fusion R1 ##0 R2

Intersect R1 intersect R2

Local Variable b, v=e

Page 7: On-the-fly Synthesis of  Multi-Clock SVA

7

SVA Abstract Grammar – Clocked Sequence

Grammar for clocked sequence S

S ::= @(clk) R

| ( S ##1 S)

Single clock @clk R

Multi-clock @clk1 R1 ##1 @clk2 R2

Page 8: On-the-fly Synthesis of  Multi-Clock SVA

8

SVA Abstract Grammar - Property

Properties evaluate true/false over words

Regular expression R

Implication R |-> P

R |=> P

Or P1 or P2

And P1 and P1

Not not P

Page 9: On-the-fly Synthesis of  Multi-Clock SVA

9

SVA Abstract Grammar - Property

Properties evaluate true/false over finite words

Implication R |-> P

R |=> P

Page 10: On-the-fly Synthesis of  Multi-Clock SVA

10

SVA Multi-Clock Assertions

Page 11: On-the-fly Synthesis of  Multi-Clock SVA

11

SVA Multi-Clock Assertions

Page 12: On-the-fly Synthesis of  Multi-Clock SVA

12

SVA Multi-Clock Assertions

Page 13: On-the-fly Synthesis of  Multi-Clock SVA

13

SVA Multi-Clock Assertions

Page 14: On-the-fly Synthesis of  Multi-Clock SVA

14

SVA Multi-Clock Assertions

Page 15: On-the-fly Synthesis of  Multi-Clock SVA

15

Synthesis of regular expression + “actions”— Seawright / Brewer - synthesis of controllers

Synthesis of SVA— Pellauer / Lis / Baltus / Nikhil - using Blue Spec

Checkers in Formal Verification— Beer / Ben-David / Landver: on-fly-model checking of RCTL

Synthesis of SVA Local Variables— Long/Seawright

Multi-Clock assertion synthesis for verification— Ganai, et al.

Annotating OVL 2.0 with SVA — Long, Seawright, et al.

Related Work

Page 16: On-the-fly Synthesis of  Multi-Clock SVA

16

Contribution

Synthesize SVA into Checker logic— Adapt single-clock SVA compilation procedure— Generic checker logic

Utilize existing FV framework/technique/optimization Utilize existing multi-clock network

— Optimized checker logic size— Validation

Proof of correctness based on SVA semantics

Page 17: On-the-fly Synthesis of  Multi-Clock SVA

17

Outline

Introduction— Background and scope— Related works

Synthesizing Multi-clock SVA— Single clock assertion compilation— Compile through semantic rewriting

Penalty: Double the checker logic size— On-the-fly synthesis algorithm

No penalty Proof of correctness

Experimental results and conclusions

Page 18: On-the-fly Synthesis of  Multi-Clock SVA

18

SVA compilation

Prop

Bool

R

|=>

term [*2:M]

gnt

req1

##1

req0

term

term

Property p_m1;

@(posedge clk0) req0 ##1 req1[*2:M] |=> gnt;

endproperty

Page 19: On-the-fly Synthesis of  Multi-Clock SVA

20

|=>

term [*2:M]

gnt

req1

##1

req0

term

term

Recursive Construction

Page 20: On-the-fly Synthesis of  Multi-Clock SVA

21

|=>

term [*2:M]

gnt

req1

##1

req0

term

term

Recursive Construction

0

1

clk0_posedge

data_in1

Page 21: On-the-fly Synthesis of  Multi-Clock SVA

22

R1 ##1 R2

R1

APstart

R2

APstart

clk

start AP

R1 R2

##1

Page 22: On-the-fly Synthesis of  Multi-Clock SVA

23

R1 ##0 R2

R1

APstart

R2

APstartstart AP

Page 23: On-the-fly Synthesis of  Multi-Clock SVA

24

R1 ##0 R2

R1

APstart

R2

APstartstart AP

R is equivalent to

(R ##0 1)

(1 ##0 R)

Page 24: On-the-fly Synthesis of  Multi-Clock SVA

25

Outline

Introduction— Background and scope— Related works

Synthesizing Multi-clock SVA— Single clock assertion compilation— Compile through semantic rewriting

Penalty: Double the checker logic size— On-the-fly synthesis algorithm

No penalty Proof of correctness

Experimental results and conclusions

Page 25: On-the-fly Synthesis of  Multi-Clock SVA

26

SVA Semantic Rewriting Rules

Page 26: On-the-fly Synthesis of  Multi-Clock SVA

27

Rewriting: An Example

Page 27: On-the-fly Synthesis of  Multi-Clock SVA

28

Synthesize Through Rewriting

|=>

##1

[*2:3]

[*0:$]

##1

term

!clk1clk1&&req1

term

[*0:$]

##1

term

!clk0 clk0&&req0

term

[*0:$]

##1

term

!clk2 clk2&&gnt

term

|=>

##1

req0

term

req1

term

gnt

term

[*2:3]

Page 28: On-the-fly Synthesis of  Multi-Clock SVA

29

Synthesiz3 Through Rewriting

|=>

##1

[*2:3]

[*0:$]

##1

term

!clk1clk1&&req1

term

[*0:$]

##1

term

!clk0 clk0&&req0

term

[*0:$]

##1

term

!clk2 clk2&&gnt

term

|=>

##1

req0

term

req1

term

gnt

term

[*2:3]

1. Checker logic: Correct by Construction

Page 29: On-the-fly Synthesis of  Multi-Clock SVA

30

Synthesis Through Rewriting

|=>

##1

[*2:3]

[*0:$]

##1

term

!clk1clk1&&req1

term

[*0:$]

##1

term

!clk0 clk0&&req0

term

[*0:$]

##1

term

!clk2 clk2&&gnt

term

|=>

##1

req0

term

req1

term

gnt

term

[*2:3]

2. Rewriting rule (2.1): size of the tree doubled

1. Checker logic: Correct by Construction

Page 30: On-the-fly Synthesis of  Multi-Clock SVA

31

On-the-fly Synthesis

Motivation— Avoid the penalty from the rewriting— Model clock directly

Compilation procedure— Annotate syntax tree with clock information— Adapt to existing recursive compilation— Model clocked constructs directly— Proof of correctness through construction

Page 31: On-the-fly Synthesis of  Multi-Clock SVA

32

Annotated Abstract Syntax Tree

Prop

Bool

R

|=>

term [*2:M]

gnt

req1

##1

req0

term

term

clk2

clk1

clk1

clk1 clk2 clk2

clk2 clk3

clk3clk3

clk2 clk2

Page 32: On-the-fly Synthesis of  Multi-Clock SVA

33

Annotated Abstract Syntax Tree

Prop

Bool

R

|=>

term [*2:M]

gnt

req1

##1

req0

term

term

clk2

clk1

clk1

clk1 clk2 clk2

clk2 clk3

clk3clk3

clk2 clk2

Page 33: On-the-fly Synthesis of  Multi-Clock SVA

34

Annotated Abstract Syntax Tree

Prop

Bool

R

|=>

term [*2:M]

gnt

req1

##1

req0

term

term

clk2

clk1

clk1

clk1 clk2 clk2

clk2 clk3

clk3clk3

clk2 clk2

Page 34: On-the-fly Synthesis of  Multi-Clock SVA

35

On-the-fly Model

Annotated node with a single clock 1. @clk (b)

2. @clk (R1 ##1 R2)

Annotated node with two different clocks3. @clk1 R1 ##1 @clk2 R2

Page 35: On-the-fly Synthesis of  Multi-Clock SVA

36

Basic Block 1: @clk(b)

@clk

bAp

1

0

1

Page 36: On-the-fly Synthesis of  Multi-Clock SVA

37

Basic Block 2: @clk(R1 ##1 R2)

Ap Ap

startstart

IA

@clk

R1

01

R21

##1

Page 37: On-the-fly Synthesis of  Multi-Clock SVA

38

Basic Block 2: @clk(R1 ##1 R2)

Ap Ap

startstart

IA

@clk

R1

01

R21

Page 38: On-the-fly Synthesis of  Multi-Clock SVA

39

Building Block 3: @clk1 R1 ##1 @clk2 R2

Ap Apstartstart

IA

@clk1

R1 R2

@clk2

and or

and

1

s0

Page 39: On-the-fly Synthesis of  Multi-Clock SVA

40

Building Block 3: @clk1 R1 ##1 @clk2 R2

Ap Apstartstart

IA

@clk1

R1 R2

@clk2

and or

and

1

s0

Page 40: On-the-fly Synthesis of  Multi-Clock SVA

41

Building Block 3: @clk1 R1 ##1 @clk2 R2

Ap Apstartstart

IA

@clk1

R1 R2

@clk2

and or

and

1

s0

s0 <= ( R1.Ap && @clk1 )

||

( s0 && !@clk2 )

Page 41: On-the-fly Synthesis of  Multi-Clock SVA

42

NFA View: @clk1 R1 ##1 @clk2 R2

Ap start

IA

startR2 Ap

@clk1

@clk2

@clk1

!@clk2

@clk2

R1s0

Page 42: On-the-fly Synthesis of  Multi-Clock SVA

43

Outline

Introduction— Background and scope— Related works

Synthesizing Multi-clock SVA— Single clock assertion compilation— Compile through semantic rewriting

Penalty: Double the checker logic size— On-the-fly synthesis algorithm

No penalty Proof of correctness

Experimental results and conclusions

Page 43: On-the-fly Synthesis of  Multi-Clock SVA

44

SVA Rewriting Rules

Page 44: On-the-fly Synthesis of  Multi-Clock SVA

45

Proof of Correctness

Lemmas1. R equals. R ##0 12. R equals. 1 ##0 R

Page 45: On-the-fly Synthesis of  Multi-Clock SVA

46

Proof of Correctness

Lemmas1. R equals. R ##0 12. R equals. 1 ##0 R3. @clk R equals. @clk ( R ##0 1 )4. @clk R equals. @clk ( 1 ##0 R)

Page 46: On-the-fly Synthesis of  Multi-Clock SVA

47

Lemmas1. R equals. R ##0 12. R equals. 1 ##0 R3. @clk R equals. @clk ( R ##0 1 )4. @clk R equals. @clk ( 1 ##0 R)5. @clk R equals. @clk 1 ##0 @clk R6. @clk R equals. @clk R ##0 @clk 1

Proof of Correctness

Page 47: On-the-fly Synthesis of  Multi-Clock SVA

48

Proof of Correctness

Lemmas1. R equals. R ##0 12. R equals. 1 ##0 R3. @clk R equals. @clk ( R ##0 1 )4. @clk R equals. @clk ( 1 ##0 R)5. @clk R equals. @clk 1 ##0 @clk R6. @clk R equals. @clk R ##0 @clk 1

@clk1 R1 ##1 @clk2 R2

Page 48: On-the-fly Synthesis of  Multi-Clock SVA

49

Proof of Correctness

Lemmas1. R equals. R ##0 12. R equals. 1 ##0 R3. @clk R equals. @clk ( R ##0 1 )4. @clk R equals. @clk ( 1 ##0 R)5. @clk R equals. @clk 1 ##0 @clk R6. @clk R equals. @clk R ##0 @clk 1

@clk1 R1 ##1 @clk2 R2

7. @clk1 (R1 ##0 1) ##1 @clk2 ( 1 ##0 R2 )

Page 49: On-the-fly Synthesis of  Multi-Clock SVA

50

Proof of Correctness

Lemmas1. R equals. R ##0 12. R equals. 1 ##0 R3. @clk R equals. @clk ( R ##0 1 )4. @clk R equals. @clk ( 1 ##0 R)5. @clk R equals. @clk 1 ##0 @clk R6. @clk R equals. @clk R ##0 @clk 1

@clk1 R1 ##1 @clk2 R2

7. @clk1 (R1 ##0 1) ##1 @clk2 ( 1 ##0 R2 )

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

Page 50: On-the-fly Synthesis of  Multi-Clock SVA

51

Proof

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

Page 51: On-the-fly Synthesis of  Multi-Clock SVA

52

Proof

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

Page 52: On-the-fly Synthesis of  Multi-Clock SVA

53

Proof

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

Page 53: On-the-fly Synthesis of  Multi-Clock SVA

54

Proof

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

9. !clk1[*0:$] ##1 clk1 ##1 !clk2[*0:$] ##1 clk2

Page 54: On-the-fly Synthesis of  Multi-Clock SVA

55

Proof

!clk1[*0:$] ##1 clk1 ##1 !clk2[*0:$] ##1 clk2

Ap Apstartstart

IA

@clk1

R1 R2

@clk2

and or

and

1

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

9. !clk1[*0:$] ##1 clk1 ##1 !clk2[*0:$] ##1 clk2

Page 55: On-the-fly Synthesis of  Multi-Clock SVA

56

Proof

!clk1[*0:$] ##1 clk1 ##1 !clk2[*0:$] ##1 clk2

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

9. !clk1[*0:$] ##1 clk1 ##1 !clk2[*0:$] ##1 clk2

Ap start

IA

startR2 Ap

@clk1

@clk2

@clk1

!@clk2

@clk2

R1s1

Page 56: On-the-fly Synthesis of  Multi-Clock SVA

57

Proof

!clk1[*0:$] ##1 clk1 ##1 !clk2[*0:$] ##1 clk2

8. @clk1 R1 ##0 @clk11 ##1 @clk21 ##0 @clk2 R2

9. !clk1[*0:$] ##1 clk1 ##1 !clk2[*0:$] ##1 clk2

Ap Apstartstart

IA

@clk1

R1 R2

@clk2

and or

and

1

s0

Page 57: On-the-fly Synthesis of  Multi-Clock SVA

58

Special Case: @clk(R1 ##1 R2)

Ap Ap

startstart

IA

@clk

R1

01

R21

Page 58: On-the-fly Synthesis of  Multi-Clock SVA

59

Ap Ap

startstart

IA

@clk

R1

01

R21

clk1==clk2

Special Case: @clk(R1 ##1 R2)

Ap Apstartstart

IA

@clk1

R1 R2

@clk2

and or

and

1

s0

Page 59: On-the-fly Synthesis of  Multi-Clock SVA

60

Experimental Results

Page 60: On-the-fly Synthesis of  Multi-Clock SVA

61

Experimental Results

Page 61: On-the-fly Synthesis of  Multi-Clock SVA

62

Experimental Results

2x

Page 62: On-the-fly Synthesis of  Multi-Clock SVA

63

Conclusion

Efficient synthesis of multi-clock assertions— Create a generic checker logic— Direct modeling to avoid the doubling penalty— Proof of correctness

Page 63: On-the-fly Synthesis of  Multi-Clock SVA

On-the-fly Synthesis of Multi-Clock SVA

Jiang Long

Andrew Seawright

Paparao Kavalipati

IWLS’ 2008