2 /* ###--------------------------------------------------------------### */
3 /* file : beh_indexbdd.c */
4 /* date : Aug 28 1997 */
6 /* authors : Pirouz BAZARGAN SABET */
7 /* description : high level function */
8 /* ###--------------------------------------------------------------### */
13 /* ###--------------------------------------------------------------### */
14 /* function : beh_indexbdd */
15 /* description : initilize the index table for bdd */
16 /* called func. : initializeCct, addInputCct */
17 /* ###--------------------------------------------------------------### */
19 void beh_indexbdd (befig_list
*pt_fig
)
22 struct berin
*pt_rin
= NULL
;
23 struct beout
*pt_out
= NULL
;
24 struct bebus
*pt_bus
= NULL
;
25 struct beaux
*pt_aux
= NULL
;
26 struct bebux
*pt_bux
= NULL
;
27 struct bereg
*pt_reg
= NULL
;
28 struct bemsg
*pt_msg
= NULL
;
29 struct biabl
*pt_bia
= NULL
;
30 unsigned int cnt_in
= 0 ;
31 unsigned int cnt_out
= 0 ;
33 if ((pt_fig
!= NULL
) && (pt_fig
->CIRCUI
== NULL
))
35 /* ###--------------------------------------------------------### */
37 /* ###--------------------------------------------------------### */
39 pt_rin
= pt_fig
->BERIN
;
40 while (pt_rin
!= NULL
)
43 pt_rin
= pt_rin
->NEXT
;
46 /* ###--------------------------------------------------------### */
48 /* ###--------------------------------------------------------### */
50 pt_out
= pt_fig
->BEOUT
;
51 while (pt_out
!= NULL
)
54 pt_out
= pt_out
->NEXT
;
57 pt_bus
= pt_fig
->BEBUS
;
58 while (pt_bus
!= NULL
)
60 pt_bia
= pt_bus
->BIABL
;
61 while (pt_bia
!= NULL
)
64 pt_bia
= pt_bia
->NEXT
;
66 pt_bus
= pt_bus
->NEXT
;
69 pt_aux
= pt_fig
->BEAUX
;
70 while (pt_aux
!= NULL
)
73 pt_aux
= pt_aux
->NEXT
;
76 pt_aux
= pt_fig
->BEDLY
;
77 while (pt_aux
!= NULL
)
80 pt_aux
= pt_aux
->NEXT
;
83 pt_bux
= pt_fig
->BEBUX
;
84 while (pt_bux
!= NULL
)
86 pt_bia
= pt_bux
->BIABL
;
87 while (pt_bia
!= NULL
)
90 pt_bia
= pt_bia
->NEXT
;
92 pt_bux
= pt_bux
->NEXT
;
95 pt_reg
= pt_fig
->BEREG
;
96 while (pt_reg
!= NULL
)
98 pt_bia
= pt_reg
->BIABL
;
99 while (pt_bia
!= NULL
)
102 pt_bia
= pt_bia
->NEXT
;
104 pt_reg
= pt_reg
->NEXT
;
107 pt_msg
= pt_fig
->BEMSG
;
108 while (pt_msg
!= NULL
)
111 pt_msg
= pt_msg
->NEXT
;
114 /* ###--------------------------------------------------------### */
116 /* ###--------------------------------------------------------### */
118 pt_fig
->CIRCUI
= initializeCct (pt_fig
->NAME
, cnt_in
*2, cnt_out
);
120 /* ###--------------------------------------------------------### */
121 /* define an index for each primary signal */
122 /* ###--------------------------------------------------------### */
124 pt_rin
= pt_fig
->BERIN
;
125 while (pt_rin
!= NULL
)
127 addInputCct (pt_fig
->CIRCUI
, pt_rin
->NAME
);
128 pt_rin
= pt_rin
->NEXT
;