ESD_UNIVR
Newbie level 6
Dear all,
does exist a procedure to convert implicit FSMDs (based on wait statements) to explicit FSMDs (based on switch-case statements)?
For example
has to be converted in
Or more complicate
is converted in
does exist a procedure to convert implicit FSMDs (based on wait statements) to explicit FSMDs (based on switch-case statements)?
For example
Code:
i1
i2
i3
wait(clock = 1)
i4
i5
i6
wait(clock = 1)
i7
i8
has to be converted in
Code:
state := A
if (clock = 1) then
switch (state)
case A:
i1
i2
i3
state := B
case B:
i4
i5
i6
state := C
case C:
i7
i8
end switch
end if
Or more complicate
Code:
i1
wait(clock = 1)
i2
if ( a ) then
i3
if ( b) then
i4
wait(clock = 1)
i5
else
i6
end if
i7
else
i8
end if
i9
wait(clock = 1)
i10
is converted in
Code:
state := A
if (clock = 1) then
switch (state)
case A:
i1
state := B
case B:
i2
if ( a ) then
i3
if ( b ) then
i4
state := B’
else
i6
end if
i7
else
i8
end if
i9
state := C
case B’:
i5
i7
i9
state := C
case C:
i10
end switch
end if