detecting state coding conflicts in stgs using sat victor khomenko, maciej koutny, and alex yakovlev...

25
Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

Post on 21-Dec-2015

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

Detecting State Coding

Conflicts in STGs Using SAT

Victor Khomenko, Maciej Koutny,

and Alex Yakovlev

University of Newcastle upon Tyne

Page 2: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

2

Talk Outline

• Introduction Asynchronous circuits Complete state coding (CSC) State graphs vs. net unfoldings

• Translating a CSC problem into a SAT one

• Analysis of the method

• Experimental results

• Future work

Page 3: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

3

Asynchronous Circuits

Asynchronous circuits – no clocks:

Low power consumption Average-case rather than worst-case

performance Low electro-magnetic emission No problems with the clock skew Hard to synthesize The theory is not sufficiently developed Limited tool support

Page 4: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

4

Example: VME Bus Controller

lds-d- ldtack- ldtack+

dsr- dtack+ d+

dtack- dsr+ lds+

DeviceVME Bus

Controller

lds

ldtack

d

Data Transceiver

Bus

dsrdsw

dtack

Page 5: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

5

Example: CSC Conflict

dtack- dsr+

dtack- dsr+

dtack- dsr+

01000

ldtack- ldtack- ldtack-

0000010000

lds- lds- lds-

01010 00010 10010

lds+

ldtack+

d+

dtack+dsr-d-

01110 00110 10110

01111 11111 10111

10110

10100

M’’ M’

Page 6: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

6

Example: enforcing CSC

dtack- dsr+

dtack- dsr+

dtack- dsr+

010000

ldtack- ldtack- ldtack-

000000 100000

lds- lds- lds-

010100 000100 100100

lds+

ldtack+

d+

dtack+dsr-

d-

011100 001100 101100

011111 111111 101111

101101

101001

011110

csc+

csc-

100001

M’’ M’

Page 7: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

7

State Graphs:

Relatively easy theory Many efficient algorithms Not visual State space explosion problem

State Graphs vs. Unfoldings

Page 8: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

8

Unfoldings:

Alleviate the state space explosion problem More visual than state graphs Proven efficient for model checking Quite complicated theory Not sufficiently investigated Relatively few algorithms

State Graphs vs. Unfoldings

Page 9: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

9

Translation Into a SAT Problem

lds-

d-

ldtack-

ldtack+ dsr- dtack+d+

dtack-

dsr+ lds+ lds+

dsr+e1 e2 e3 e4 e5 e6 e7

e9 e11

e12

e10e8

conf’=111000000000Code(conf’)=10110

conf’’=111111110100Code(conf’’)=10110

• Configuration constraint: conf’ and conf’’ are configurations

• Encoding constraint: Code(conf’) = Code(conf’’)

• Separating constraint: Out(conf’) Out(conf’’)

Page 10: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

10

Conf(conf ') Conf(conf '')

Code(conf ',…, val) Code(conf '',…, val)

Out(conf ',…, out') Out(conf '',…, out'')

out' out''

Translation Into a SAT Problem

Page 11: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

11

Conf(conf ') Conf(conf '')

Code(conf ',…, val) Code(conf '',…, val)

Out(conf ',…, out') Out(conf '',…, out'')

out' out''

Configuration constraint

Page 12: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

12

Configuration constraint

1

11

1

causality

e

0

1

0

no conflicts

e

)()(

feef

confconf

)(}\{)(

feeef

confconf

Page 13: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

13

The efficiency of the BCP rule

1

dtac

k-

d-

dsr+

ldta

ck+

dsr-

dtac

k+

d+

lds-

dsr+

lds+

lds+

ldta

ck-

dtac

k+

dtac

k+

dsw

+

d+ dsw

-

lds+

ldta

ck+

d-

dsw

+

d+ lds+

Page 14: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

14

The efficiency of the BCP rule

dtac

k-

d-

dsr+

ldta

ck+

dsr-

dtac

k+

d+

lds-

dsr+

lds+

lds+

ldta

ck-

dtac

k+

dtac

k+

dsw

+

d+ dsw

-

lds+

ldta

ck+

d-

dsw

+

d+ lds+

0

Page 15: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

15

Conf(conf ') Conf(conf '')

Code(conf ',…, val) Code(conf '',…, val)

Out(conf ',…, out') Out(conf '',…, out'')

out' out''

Encoding constraint

Page 16: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

16

Tracing the value of a signal

a+ b+ c+ a- c- a+

a=0 a=1

Page 17: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

17

Computing the signals’ values

0

0

0e1

b

fbf

eb confconfcut

b

pbhz cutval

z 1)(

Page 18: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

18

Conf(conf ') Conf(conf '')

Code(conf ',…, val) Code(conf '',…, val)

Out(conf ',…, out') Out(conf '',…, out'')

out' out''

Separating constraint

Page 19: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

19

Computing the enabled outputs

fef

fef

e confconfen

)()(

1

1

1

e

0

0

0

ezeh

z enout

)(

Page 20: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

20

Conf(conf ') Conf(conf '')

Code(conf ',…, val) Code(conf '',…, val)

Out(conf ',…, out') Out(conf '',…, out'')

out' out''

Translation Into a SAT Problem

Page 21: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

21

Analysis of the Method

A lot of clauses of length 2 – good for BCP

The method can be generalized to other

coding properties, e.g. USC and normalcy

The method can be generalized to nets with

dummy transitions

Further optimization is possible for certain

net subclasses, e.g. unique-choice nets

Page 22: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

22

Experimental Results

• Unfoldings of STGs are almost always small

in practice and thus well-suited for synthesis

• Huge memory savings

• Dramatic speedups:

A few intractable examples easily solved

Several orders of magnitude speedups for

many other examples

The hardest example we tested took less

than 3 minutes

Page 23: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

23

A philosophical remark

The combination unfolding & solver seems

to be quite powerful: unfolding reduces a

PSPACE-complete problem down to an NP-

complete one, which can efficiently be

tackled by a solver

Page 24: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

24

What about a full design cycle based on PN unfoldings?

Future Work

Page 25: Detecting State Coding Conflicts in STGs Using SAT Victor Khomenko, Maciej Koutny, and Alex Yakovlev University of Newcastle upon Tyne

25

Thank you!Any questions?