Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mechanical Certification of Loop Pipelining Transformations: A Preview

Similar presentations


Presentation on theme: "Mechanical Certification of Loop Pipelining Transformations: A Preview"— Presentation transcript:

1 Mechanical Certification of Loop Pipelining Transformations: A Preview
Disha Puri*, Sandip Ray+, Kecheng Hao*, Fei Xie* In the context of 16 July 2014 *Computer Science Department, Portland State University +Strategic CAD Labs, Intel Corporation

2 Agenda Background Need for Certified Loop Pipelining Algorithm
Framework for Certified Pipelining Algorithm Current Status & Future Work Related Work

3 Agenda Background Need for Certified Loop Pipelining Algorithm
Framework for Certified Pipelining Algorithm Current Status & Future Work Related Work

4 Behavioral Synthesis High level specification of hardware design
(in C, C++, System C) Compiler Transformations (e.g., dead code elimination) Behavioral synthesis tool (e.g., Vivado, CtoSilicon, Cynthesizer) Scheduling Transformations (e.g., Loop pipelining) Resource Allocation and Control Synthesis Implementation in hardware description language (in VHDL, Verilog)

5 Loop in Behavioral Synthesis
Entry Exit c := i + 3 i′ := a′ + c X Y Z { a := ϕ [0,Entry] [a′,Z] i := ϕ [0,Entry] [i′,Z] } if [not (a < N)] goto Exit a′ := a + 2 a = 0; i = 0; while(a < N) { a = a + 2; c = i + 3; i = a + c; } Loop in C Loop before pipelining

6 Loop Pipelining Sequential Execution Pipelined Execution Entry Entry X
Z Exit Pipeline Prologue X Y X Pipeline Full Z Y X Pipeline Epilogue Z Exit Sequential Execution Pipelined Execution

7 Motivation behind Loop Pipelining
X Y Z Execution order before pipelining X Y Z Execution order after pipelining “ Pipeline interval is 1”

8 Agenda Background Need for Certified Loop Pipelining Algorithm
Framework for Certified Pipelining Algorithm Current Status & Future Work Related Work

9 Certification of Loop Pipelining
Entry X Y Z Exit X Y Z Entry Exit ? Mechanical reasoning of synthesis tool’s implementation Implementation is not disclosed by vendors, so we cannot certify the transformation by theorem proving

10 Certification of Loop Pipelining
Entry X Y Z Exit X Y Z Entry Exit Sequential Equivalence Checking Sequential equivalence checking does not work due to huge abstraction gap between the two designs

11 Certifying Loop Pipelining Transformation
X Y Z Entry Exit Entry X Y Z Exit Loop Pipelining Transformation Pipeline parameters Certified Pipelining Algorithm SEC Pipeline Reference Model 1. Create a correct pipeline reference model 2. Compare using sequential equivalence checking (SEC) Hao, et al “Equivalence checking for behaviorally synthesized pipelines”. DAC 2012

12 Goal: A Certified Loop Pipelining Algo
Entry X Y Z Exit X Y Z Entry Exit ? Certified Pipelining Algo Pipeline Reference Model Sequential Execution

13 Agenda Background Need for Certified Loop Pipelining Algorithm
Framework for Certified Pipelining Algorithm Current Status & Future Work Related Work

14 Challenges in Loop Pipelining
Correspondence?? Entry Entry X Y Z Exit Pipeline Prologue X Y X Pipeline Full Z Y X Pipeline Epilogue Z Exit Sequential Execution Pipelined Execution

15 Our Approach Framework of certified pipelining primitives to build pipelining algorithms Shadow register primitive Interchange primitive Phi-elimination primitive Branch-handling primitive Develop a simple loop pipelining algorithm from ground up using our framework Certify the algorithm

16 Loop Pipelining Invariant
X Pipeline Prologue X Y Y X Z Pipeline Full X Z Y X Pipeline Epilogue Y Z X Executing pipeline prologue + k iterations of pipeline full = Executing k iterations of sequential loop + m blocks of sequential loop+ (m-I) blocks of sequential loop + …

17 Loop Invariant: Base case (k=1)
X' Pipeline Prologue X' Y Y X Z Pipeline Full Z Y X X Y X Executing pipeline prologue + “1” iterations of pipeline full = Executing “1” iterations of sequential loop + 2 blocks of first iteration + 1 blocks of second iteration

18 Loop Invariant: Inductive Step
X' X' Pipeline Prologue X' Y Y X Y Z Z X X Pipeline Full Y Y Z Y X X Z Z X Y Y X X

19 Invariant Implies Completeness
X' X' Pipeline Prologue X' Y Y Y X Z Z Pipeline Full X X Z Y X Y Y Pipeline Epilogue Z X Z Z X

20 Agenda Background Need for Certified Loop Pipelining Algorithm
Framework for Certified Pipelining Algorithm Current Status & Future Work Related Work

21 Current Status Completed Work Developed framework of primitives
Certified primitives: Phi-removal primitive Shadow register primitive Formalized algorithm using framework Certified the correspondence invariant

22 Next Steps Ongoing Work Certify remaining invariants
Certify the algorithm end-to-end Future Work Function pipelining algorithm There are other pipelining algortihms such as not details…

23 Agenda Background Need for Certified Loop Pipelining Algorithm
Framework for Certified Pipelining Algorithm Current Status & Future Work Related Work

24 Related Work Pipelines in processors [Manolios et al., 2000] [Sawada and Hunt, 2002] [Beyer et al., 2006] Similar in notions of correctness Work on one instance of a pipeline, not an entire algorithm Software pipelines [Tristan and Leroy, 2010] Works on instances of designs Symbolic simulation

25 Thanks !!


Download ppt "Mechanical Certification of Loop Pipelining Transformations: A Preview"

Similar presentations


Ads by Google