sym - computer sciencemontek/teaching/spring-04/chasm.pdf · sym bolic co v er input presen t next...
TRANSCRIPT
Symbolic Hazard�Free Minimization
and Encoding of
Asynchronous Finite State Machines
Robert Fuhrer
Columbia University
Bill Lin
IMEC Laboratory
Steven Nowick
Columbia University
�
Contribution
State assignment method yielding hazard�free� low�cost ��level
implementations for asynchronous state machines�
�
Outline
� Introduction
� Background
� Optimal Encoding for Asynchronous FSM�s
� Results
� Conclusions�Future Work
�
Introduction
Optimal State Encoding� Find encoding yielding optimal
implementation of given FSM� according to cost metric�
Well�studied� DeMicheli ��� Devadas ���� Saldanha ���
Dimensions�
� Area vs� speed vs� power
� ��level vs� multi�level logic
� Exact vs� heuristic techniques
� input encoding vs� output encoding � � �
Our focus� of product terms in ��level logic�
exact � heuristic techniques based on input encoding�
Requirements� hazard�free� critical race�free implementation�
�
Introduction �cont��
Optimal State Encoding for Asynchronous FSM�s
Several heuristic encoding techniques exist�
Tracey ���� Tan ���� Saucier ���� Fisher ���� Lam ���
None provides systematic optimal state assignment�
Our research contribution�
� First such work for asynchronous FSM�s
� Deal directly with MIC hazards
� Upper bound on overall logic
� Exactly optimal result for output logic
� Leverage o� of existing synchronous work �KISS
� Use input encoding formulation
�
Asynchronous Finite State Machines
Potential Bene�ts�
� Performance �utilize di�erence between avg � worst�case�
� Avoidance of clock skew
� Low power
Recent successes�
� HP Stetson �Marshall et al� ����
� Low�power infrared communications chip
� Nowick et al� ���
� Cache controller
� Yun et al� ��
� AMD SCSI controller
Recent work� �Nowick ��� �Yun ��� �Davis ��
�
Background� Asynchronous FSM�s
Multiple Input Change �MIC� Machines� Burst�Mode
A
B
C
D
E
F
c+ / z−
a+ c− / z+
c+ / y+
a− / y−
b− c+ / z+
a+ b+ / y+ z−
c− / −−
Initially: abc = 000 yz = 01
� Only speci�ed transitions
� Inputs arrive in any order
Huffman Machine
Inputs Outputs
State
C L
� Generalized fundamental�
mode of operation�
� Hazard�free logic�
�
Background� Asynchronous FSM�s �cont��
Two basic issues confronting asynchronous FSM synthesis�
�� Critical Races
Can cause FSM to settle in wrong state �Tracey ���
_ , _
_ , _
_ , _
11
S1,00
S1,00
S2,10
S4,11
S4,11 S4,00
S3,10
S3,10
S4,00
1000Inputs = a b
S2,10
S2,10
S3 0110
S1
S2
0000
1101
S4,01 0101
_ , _
S4
01
0101
Cause� interference in given input column between�
I� Unstable transition and stable state �fs�� s�� s�g�
�
Background� Asynchronous FSM�s �cont��
�� Critical Races �cont��
_ , _
_ , _
_ , _
11
S1,00
S1,00
S2,10
S4,11
S4,11
1000Inputs = a b
S1 0000_ , _
01
S2,10
S2,10
S4,01
S4,00
S4,00 0101S4
S2
S3
1101
0110
S3,10
S3,100100
Cause� interference in given input column between�
I� Unstable transition and stable state �fs�� s�� s�g�
II� Unstable transition and unstable transition �fs�� s�� s�� s�g�
Solution� judicious state encoding��
Background� Asynchronous FSM�s �cont��
�� Combinational Hazards
Type I� MIC Static HazardsB
A
D1
1
A’
CD0100 1011
00
0
0
0
0 00
01
00
10
11AB
1 1
11
1 11 1
Hazardous�
Background� Asynchronous FSM�s �cont��
�� Combinational Hazards
Type I� MIC Static Hazards
01AB
10
11
00
0000
0
0 0
0
1101CD
1000
1 1
11
1 1 11
A’D
B
A
1
1
B11 1
D
1
required cube Hazard-free
Solution� Some product term must cover each required cube�
��
Background� Asynchronous FSM�s �cont��
�� Combinational Hazards �cont��
Type II� MIC Dynamic Hazards
C
A
C
B
BC00 01 11 10
0
1 0
1
10
0A
10
1
A’
1
B
Hazardous
��
Background� Asynchronous FSM�s �cont��
�� Combinational Hazards �cont��
Type II� MIC Dynamic Hazards
C
A
C
B
BC00 01 11 10
0
1 0
1
10
0A
0
1
11
A’BC’
0 0
privileged cube
Hazard-free
Solution� Implicants must not illegally intersect the privileged
cube of any dynamic transition�
Use only dynamic�hazard�free �DHF� prime implicants�
��
Background� Asynchronous FSM�s �cont��
Exact Hazard�Free ��Level Logic Minimization �Nowick ��
Given� incompletely speci�ed Boolean function �
set of specied input transitions�
�� Generate required cubes
�� Generate DHF prime implicants
�� Solve unate covering problem
Covered objects� required cubes
Covering objects� DHF prime implicants
Limitations�
� BVI only
� Single�output only
��
Background� KISS Optimal State Encoding
Step �� Symbolic Logic Minimization
Goal� Find optimal symbolic cover�
input I
� �
s� s�� � s�� �
s� s�� � s�� �
s� s�� � s�� �
Minimal Symbolic Cover
input present next output
p�� � s�� s� s� �
p�� � s� s� �
p�� � s�� s�� s� s� �
Key Idea� perform symbolic minimization using multi�valued
input �mvi� minimization techniques �Sasao ���
Caveat� Only an approximation for next�state logic�
��
Background� KISS Optimal State Encoding �cont��
Can instantiate symbolic cover with an encoding�
Problem� Instantiated cover incorrect for certain encodings�
Solution� Step �� Encoding Constraints
Constraints allow direct instantiation of minimal symbolic cover�
Derive face embedding constraints� set of N � � dichotomies�
Minimal Symbolic Cover
input present next output
p�� � s�� s� s� �
p�� � s� s� �
p�� � s�� s�� s� s� �
Example� product p� yields seed dichotomy fs�� s�� s�g�
��
Background� KISS Optimal State Encoding �cont��
Step �� Solve Constraints
Solution always exists�
Various exact � heuristic solution methods�
kiss �DeMicheli �� dichot �Saldanha ���
nova �Villa ��� duet �Cieselski ��
Key Result�
Exact constraint solution yields minimum cardinality
output cover �if outputs minimized separately��
However� Approximate solution for next�state logic�
��
Optimal Encoding for Asynchronous FSM�s
Step �� Symbolic Hazard�Free ��Level Logic
Minimization
Unlike KISS� need hazard�free symbolic cover�
Generalize ��level hazard�free bvi algorithm to mvi functions�
� De�ned mvi multiple�input transitions
� De�ned static and dynamic output transitions
� Extended notion of privileged cubes� illegal intersections� etc�
� Generalized hazard�free conditions for mvi functions�
Extended previous algorithm to multiple�output minimization�
��
Step �� Hazard�Free Symbolic Logic Minimization
S1
S2
S3
,1
,1
- , - - , -
,1
,1
Illegal Intersection:
S1,1 S1,0
prime implicant
S1
S2
S3
,1 ,1 S1,0S1,1
- , -
,1 ,1
- , -
No Illegal Intersection:
DHF prime implicant
��
Optimal Encoding for Asynchronous FSM�s �cont��
Step �� Encoding Constraints
KISS face embedding constraints inadequate�
Asynchronous FSM de�nes OFF�set during state transitions�
Inputs = a b
0101
0110
1101
0000S1
S2
S3
S4 S1,00
S1,00
S2,10
S2,10
S4,01 S4,11
S4,11
S2,10 S3,10
S3,10
10110100
_ , _
_ , _ _ , _
_ , _ S4,00
S4,00
Goal� Prevent instantiated implicants from hitting OFF�set�
�
Optimal Encoding for Asynchronous FSM�s �cont��
Step �� Encoding Constraints �cont��
KISS face embedding constraints inadequate�
Asynchronous FSM de�nes OFF�set during state transitions�
00Inputs = a b01 11 10
, -, 1, 0
, 0
, 1
, 0 , 1
S4, 0
S4, 0
, -
, - , -
, 1
, 1
, 1
, 1
, 1
0000
0101
0100
S4
S1
S2 1101
0110S3
Goal� Prevent instantiated implicants from hitting OFF�set�
Example� column �� � dichotomy fs�� s�� s�� s�g�
��
Optimal Encoding for Asynchronous FSM�s �cont��
Step �� Encoding Constraints �cont��
Observation�
� Critical race�free dichotomies� �� �� �� �
� Face embedding dichotomies� N � �
Asynchronous optimality dichotomies� N � �� N � ��
Subsume both KISS optimality and critical race�free constraints�
��
Optimal Encoding for Asynchronous FSM�s �cont��
Step �� Constraint Solution
Exact solution� used dichot �Saldanha ���
Observation� More constraints than in synchronous case�
Increased code length � increased logic complexity�
Heuristic solution� Fixed code length via simulated annealing�
Idea� Satisfy maximum of constraints possible�
Successfully used in synchronous methods �e�g� Villa� Lin��
��
Optimal Encoding for Asynchronous FSM�s �cont��
Step �� Constraint Solution �cont��
Asynchronous Correctness Requirement�
Critical race�free constraints must be satis�ed�
Solution� Partition constraints into � classes�
�� compulsory constraints �for correctness�
�� optional constraints �for optimality�
Assign su�ciently large weights to compulsory constraints to
ensure satisfaction�
��
Theoretical Results
�� Overall logic�
� Unlike KISS� instantiated cover may be incorrect
� need added cubes to avoid next�state hazards
� Cardinality j �C j� O�j C j � u�
u � of unstable state transitions
� Upper bound on logic complexity� due to input encoding
�� Output logic� exactly optimal over all CRF codes
if outputs minimized separately
Important for burst�mode� where input�output latency
determines operating speed���
Experimental Results
Up to ��� improvement in overall logic with no increase in code
length� using heuristic constraint satisfaction�
heuristic exact base�crf
DESIGN I�S�O bits cubes bits cubes bits cubes
sbuf�read�ctl ����� � � � � � �
pscsi�ircv ����� � � � �� � �
pscsi�trcv ����� � � � �� � ��
sscsi�trcv�csm ���� � �� � �� � ��
pscsi�trcv�bm ����� � �� � � � ��
rf�control ���� � �� � � � �
sscsi�tsend�csm ���� � �� � � ��
it�control ��� � � � � � �
pe�send�ifc ��� � �� � �� � ��
pscsi�isend ����� � �� � �� � ��
sscsi�trcv�bm ���� � �� �� � ��
sscsi�tsend�bm ��� � �� � � � ��
sscsi�isend�bm ���� � �� �� � ��
sd�control ������� �� � �� � �
stetson�p� ������� � �� � �� � ��
stetson�p� �������� � � �� � �
��
Conclusions
� First systematic optimal encoding method for asynchronous
FSM�s
� Symbolic hazard�free ��level logic minimization
� Extended encoding constraints for asynchronous FSM�s
� Constraint solution�
� Compulsory vs� optional constraints
� Exactly optimal output logic
� Signi�cant improvement on industrial examples
��