350 likes | 490 Views
Bounded Sequential Equivalence Checking with Range-Equivalent Circuit, Node Merging , and NAR. Speaker: Chih-Chung Wang Adviser: Chun-Yao Wang Date: 2012. 7. 24. Outline. Problem Formulation Introduction BSEC Node merging and NAR Range-equivalent circuit Discussion Problems
E N D
Bounded Sequential Equivalence Checking with Range-Equivalent Circuit, Node Merging, and NAR Speaker: Chih-Chung Wang Adviser: Chun-Yao Wang Date: 2012. 7. 24
Outline • Problem Formulation • Introduction • BSEC • Node merging and NAR • Range-equivalent circuit • Discussion • Problems • Example and Flowchart • Future Work
Problem Formulation • Given: • Two boundedsequentialcircuits • A bound timeframe k where it will take much time while using node merging and NAR optimizing BSEC, and the timeframe k-1 has been checked equivalent • Goal: • Bounded sequential equivalence checking (BSEC) at timeframe koptimized by range-equivalent circuit replacement, node merging, and NAR without spending so much time
Bounded Sequential Equivalence Checking (BSEC) • Bounded: timeframe k • Typical BSEC • Miter construction • Unroll • Sequential → Combinational
Speeding Up • Circuit optimization • Node merging • Node addition and removal (NAR)
Speeding Up • Range-equivalent circuit • Range • Range-equivalent • Circuit of timeframe 0 to k-1 replacement
Discussion • The function creating range-equivalent circuits would have runtime error if the specified timeframe k is too large • Segmentation fault • Taking too much time to run
Discussion • The function creating range-equivalent circuits would have runtime error if the specified timeframe k is too large • Segmentation fault • Taking too much time to run • Using a smaller timeframe n to create range-equivalent circuit • Replacing the circuit 0 to n • Connecting to the next timeframe n+1 • Repeatedly running until n equals k
Discussion n • Using a smaller timeframe n to create range-equivalent circuit • Replacing the circuit 0 to n • Connecting to the next timeframe n+1 • Repeatedly running until n equals k
Discussion n+1 • Using a smaller timeframe n to create range-equivalent circuit • Replacing the circuit 0 to n • Connecting to the next timeframe n+1 • Repeatedly running until n equals k
Discussion • Using a smaller timeframe n to create range-equivalent circuit • Replacing the circuit 0 to n • Connecting to the next timeframe n+1 • Repeatedly running until n equals k
Discussion • BSEC with NAR • Using the network Ntk and Resyn2(Ntk) • Unroll • Optimize by resyn2 and NAR • BSEC with NAR and range-equivalent circuit replacement
Resyn2 Original Optimized Construct miter pMiter Resyn2 Optimize NAR pMiterOpt timeframe: 1 Resyn2 Unroll k times pFrame Resyn2 Optimize NAR pFrameOpt timeframe: k Resyn2 SAT solver
Resyn2 Original Optimized Construct miter pMiter Resyn2 NAR Optimize pMiterOpt timeframe: 1 Resyn2 0 to n, n < k Unroll pFramePre Range-equivalent circuit replacement pRange timeframe: n Combine “0ton”and “1” no n = k ? yes pFrame Optimize NAR Resyn2 pFrameOpt timeframe: k Resyn2 SAT solver
Discussion • Smaller input circuits for the range-equivalent circuits producing function • Decreasing the runtime error cases • Much more faster • Functions should be rewritten • One timeframe addition • Range-equivalent circuit handling
Range-equivalent circuits only created by combinational circuits
Discussion • Abc_NtkAddFrame cannot run because only sequential circuits can be its input • PIs would be removed by the range-equivalent circuit creating function
Range-equivalent Circuit Creation and One Timeframe Addition • To simplify the problem, set n = 1 • Loop from timeframe 0 to k • One timeframe addition • Range-equivalent circuit replacement • Need some constraints during the range-equivalent circuits creating process • No pseudo primary input (PPI) and pseudo primary output (PPO) removed
Resyn2 Original Optimized Construct miter pMiter Resyn2 NAR Optimize pMiterOpt timeframe: 0 Resyn2 Add one timeframe pFrames Range-equivalent circuit replacement pFrames timeframe: n no n = k ? yes pFrames Resyn2 Optimize NAR pFramesOpt timeframe: k Resyn2 SAT solver
0 1 2 3 4 16 15 17 6 7 18 8 9 22 19 10 AIG node graph of s27 11 12 20 Const1 PI PO BI(PPI) BO(PPO) Latch Node 13 14 21 5
0 1 2 3 4 pMiter s27 5 7 Resyn2(s27) 8 6 s27 at timeframe 0 Const1 PI PO Node
0 1 2 3 4 pMiter s27 5 7 Resyn2(s27) 8 6 s27 at timeframe 0 Const1 PI PO Node
0 1 2 3 4 pMiter s27 5 7 Resyn2(s27) 8 6 s27 at timeframe 0 Const1 PI PO Node Range: the set of all possible output combinations
0 1 2 3 4 pMiter s27 5 7 Resyn2(s27) 8 6 PO PO PO s27 at timeframe 0 Const1 PI PO Node Added PO Range: the set of all possible output combinations
0 1 2 3 4 pMiter s27 5 7 Resyn2(s27) 8 6 s27 at timeframe 0 Const1 PI PO Node
0 1 2 3 4 9 10 11 12 5 7 8 6 13 15 14 16 20 21 s27 at timeframe 1 pMiter pMiter 17 22 s27 s27 Const1 PI PO Node PI PO Node 18 23 Resyn2(s27) Resyn2(s27) 19 24 25 26 27 28
0 1 2 3 4 9 10 11 12 5 7 8 6 13 15 14 16 20 21 s27 at timeframe 1 pMiter pMiter 17 22 s27 s27 Const1 PI PO Node PI PO Node 18 23 Resyn2(s27) Resyn2(s27) 19 24 25 26 27 28
Resyn2 Original Optimized Construct miter pMiter Resyn2 NAR Optimize pMiterOpt timeframe: 0 Resyn2 Add one timeframe pFrames Range-equivalent circuit replacement pFrames timeframe: n no n = k ? yes pFrames Optimize NAR Resyn2 pFramesOpt timeframe: k Resyn2 SAT solver
Future Work • Debug • Sometimes the circuit is not available for Abc after modifying it. • Experiment Design • Comparing to traditional BSEC and BSEC with NAR • Using the circuit optimized by resyn2 and the original circuit to check equivalence sometimes makes a constant value linked to PO directly after the range-equivalent circuit replacing. • UNSAT before solving
Resyn2 Original Optimized Construct miter pMiter timeframe: 0 Add one timeframe pFrames Range-equivalent circuit replacement pFrames timeframe: 0 ~ k no n = k ? yes pFrames Optimize NAR Resyn2 pFramesOpt timeframe: k Resyn2 SAT solver
Experiment Result • Some errors happen in range-equivalent circuit creation • ss_pcm at timeframe 48 • Some happen in Abc’s network checking • s9234