Download presentation
Presentation is loading. Please wait.
Published byLatrell Bullinger Modified over 9 years ago
1
4.2.6 2 分決定グラフに基づく記号 モデル検査 BDD における論理演算 2. f p = f p S p = S – S p 3. f p q =f p f q S p q = S p S q f p q =f p f q S p q = S p S q 4. f EXq (x1,x2)= Exist(N(x1,x2,x1’,x2’) f q (x1’,x2’), {x1’,x2’})
2
BDD における論理演算 AND 記法 f(V) = f(x 1, …, x i-1, x i, x i+1, …) f(V)| xi=0 = f(x 1, …, x i-1, 0, x i+1, …) f(V)| xi=1 = f(x 1, …, x i-1, 1, x i+1, …) シャノン展開 f(V) = x i f(V)| xi=0 x i f(V)| xi=1
3
BDD における論理演算 AND xixi f(V)| xi=1 f(V)| xi=0 f(V) = x i f(V)| xi=0 x i f(V)| xi=1 f(V) g(V) = x i (f(V)| xi=0 g(V)| xi=0 ) ( x i g(V)| xi=1 g(V)| xi=1 )
4
BDD における論理演算 AND xixi xixi AND xixi g(V)| xi=1 g(V)| xi=0 f(V)| xi=1 f(V)| xi=0 f(V)f(V) g(V)g(V) f(V)| xi=0 g(V)| xi=0 f(V)| xi=1 g(V)| xi=1 f(V) g(V) 再帰的に求めることができる
5
BDD における論理演算 AND AND { if (f = 0 or g = 0) return 0; if (f = 1) return g; if (g = 1) return f; … 0 0 AND 1
6
BDD における論理演算 AND x1x1 10 x2x2 x1x1 10 x3x3 x1x1 10 x2x2 x1x1 x3x3 x1x1 x2x2 x1 x2 x1 x3x1 x2 x1 x3
7
BDD における論理演算 OR OR { if (f = 1 or g = 1) return 1; if (f = 0) return g; if (g = 0) return f; … 1 1 OR 0
8
BDD における論理演算 OR x1x1 10 x2x2 x1x1 x3x3 x1 x2 x1 x3 x1x1 10 x2x2 x1x1 x3x3 x1 x2 x1 x3 x1x1 x2x2
9
BDD における論理演算 Exist Exist(f(x 1, x 2, x 3 ), {x 2 }) := g(x 1, x 3 ) = 1 f(x 1, x 3 ) = 1 for some x 2 x1x1 10 x2x2 x3x3 x1 x2 x3 x1x1 10 x2x2 x3x3 x1x1 E E に含まれる 変数は OR を とって消す
10
BDD における論理演算 Not x1x1 10 x2x2 x3x3 x1 x2 x3 x1x1 10 x2x2 x3x3 x1x1 (x1 x2 x3) x3x3 x2x2
11
4.2.7 SMV による適用例 アービタ e5 e4 e3 e2 e1 req in5 req in4 req in3 req in2 req in1 token in override out 0 override in grant in grant out ack out5 ack out4 ack out3 ack out2 ack out1
12
トークン e5 e4 e3 e2 e1 req in5 req in4 req in3 req in2 req in1 token in override out 0 override in grant in grant out ack out5 ack out4 ack out3 ack out2 ack out1 11111
13
アービターセル
14
トークンリング方式 e5 e4 e3 e2 e1 req in5 req in4 req in3 req in2 req in1 token in override out 0 override in grant in grant out ack out5 ack out4 ack out3 ack out2 ack out1 1
15
アービタセルの 記述 MODULE arbiter-cell(above,below,init-token) VAR Persistent : boolean; Token : boolean; Request : boolean; ASSIGN init(Token) := init-token; next(Token) := token-in; init(Persistent) := 0; next(Persistent) := Request & (Persistent | Token); DEFINE above.token-in := Token; override-out := above.override-out | (Persistent & Token); grant-out := !Request & below.grant-out; ack-out := Request & (Persistent & Token | below.grant-out);
16
アービタ全体の記述 MODULE main VAR e5 : arbiter-cell(self,e4,0); e4 : arbiter-cell(e5,e3,0); e3 : arbiter-cell(e4,e2,0); e2 : arbiter-cell(e3,e1,0); e1 : arbiter-cell(e2,self,1); DEFINE e1.token-in := token-in; override-out := 0; grant-out := !e1.override-out; e5 e4 e3 e2 e1 req in5 req in4 req in3 req in2 req in1 token in override out 0 override in grant in grant out ack out5 ack out4 ack out3 ack out2 ack out1
17
CTL 式の記述 1 どの二つの ack-out も同時に 1 とならない MODULE main … SPEC AG ( !(e1.ack-out & e2.ack-out) & !(e1.ack-out & e3.ack-out) & !(e1.ack-out & e4.ack-out) & !(e1.ack-out & e5.ack-out) & !(e2.ack-out & e3.ack-out) & !(e2.ack-out & e4.ack-out) & !(e2.ack-out & e5.ack-out) & !(e3.ack-out & e4.ack-out) & !(e3.ack-out & e5.ack-out) & !(e4.ack-out & e5.ack-out) )
18
CTL 式の記述 2 Request が1となれば,いつか必ず ack- out が 1 となる MODULE arbiter-cell(above,below,init-token) … SPEC AG(Request -> AF(ack-out)) SPEC AG(Request -> AF(Request -> ack-out)) SPEC AG(Request -> !EG(Request & !ack-out))
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.