1 /* ###--------------------------------------------------------------### */
2 /* file : bvl_bspec.c */
3 /* date : Jan 18 1993 */
5 /* authors : Pirouz BAZARGAN SABET, VUONG Huu Nghia */
6 /* content : contains all specific functions used to build */
7 /* behaviour data structures : */
8 /* bvl_addgen , bvl_tobin , bvl_cpyabllst, */
9 /* bvl_cpyablstr, bvl_crtabl, bvl_select */
10 /* ###--------------------------------------------------------------### */
19 #include "bvl_byacc.h"
20 #include "bvl_bspec.h"
21 #include "bvl_bedef.h"
23 /* ###--------------------------------------------------------------### */
24 /* function : bvl_addgen */
25 /* description : create one or more BEGEN structures */
26 /* For a scalar a BEGEN is created at the head of */
27 /* existing BEGEN list. */
28 /* For an array (including arraies of one element) a set */
29 /* of BEGENs are created in a sorted list. BEGEN related */
30 /* to the index i of the array is named `name(i)`. The */
31 /* head of the list represents the right bound of the */
32 /* array. This list is then chained to the head of */
33 /* existing BEGEN list. */
34 /* called func. : beh_addbegen, namealloc */
35 /* ###--------------------------------------------------------------### */
38 bvl_addgen (struct begen
*lastgeneric
, chain_list
*nat_lst
, chain_list
*nam_lst
, char *type
, short left
, short right
)
40 /* pointer on the last begen structure */
41 /* generic's value list */
42 /* generic's name list */
44 /* array's left bound (= -1 if scalar) */
45 /* array's right bound (= -1 if scalar) */
51 struct chain
*ptauxnam
;
52 struct chain
*ptauxnat
;
60 if ((left
== -1) && (right
== -1))
61 if ((ptauxnat
!= NULL
) && (ptauxnat
->NEXT
== NULL
))
62 while (ptauxnam
!= NULL
)
64 name
= namealloc((char *)ptauxnam
->DATA
);
65 ptgen
= beh_addbegen (ptgen
,name
,type
,(void *)ptauxnat
->DATA
);
66 ptauxnam
= ptauxnam
->NEXT
;
74 while (ptauxnam
!= NULL
)
76 for (i
=left
; i
!=(right
+inc
) ; i
+=inc
)
78 sprintf (extname
,"%s %d",(char *)ptauxnam
->DATA
,i
);
79 name
= namealloc(extname
);
82 ptgen
= beh_addbegen (ptgen
,name
,type
,(void *)ptauxnat
->DATA
);
83 ptauxnat
= ptauxnat
->NEXT
;
91 ptauxnam
= ptauxnam
->NEXT
;
97 /* ###--------------------------------------------------------------### */
98 /* function : bvl_cpyabllst */
99 /* description : duplicate bvl_abllst structure */
100 /* called func. : addchain, reverse, copyExpr */
101 /* ###--------------------------------------------------------------### */
104 bvl_cpyabllst (chain_list
*abllst
)
106 struct chain
*ptabllst
= NULL
;
108 while (abllst
!= NULL
)
110 ptabllst
= addchain (ptabllst
,copyExpr((struct chain
*)abllst
->DATA
));
111 abllst
= abllst
->NEXT
;
113 ptabllst
= reverse (ptabllst
);
117 /* ###--------------------------------------------------------------### */
118 /* function : bvl_cpyablstr */
119 /* description : duplicate bvlexpr structure */
120 /* called func. : mbkalloc <mbk>, bvl_cpyabllst */
121 /* ###--------------------------------------------------------------### */
124 bvl_cpyablstr (bvlexpr ablstr
)
128 ptablstr
.IDENT
= NULL
;
129 ptablstr
.WIDTH
= ablstr
.WIDTH
;
130 ptablstr
.LIST_ABL
= bvl_cpyabllst (ablstr
.LIST_ABL
);
134 /* ###--------------------------------------------------------------### */
135 /* function : bvl_crtabl */
136 /* description : combine at most two ABLs and build a new one */
137 /* The following operations can be performed : */
138 /* CONC perform concatenation */
139 /* NOPI initialize a structure for a signal (scalar */
141 /* NOPS initialize a structure for a literal */
142 /* NE create a structure with an ABL representing */
143 /* the 'non equality' of two expressions */
144 /* EQ create a structure with an ABL representing */
145 /* the 'equality' of two expressions */
146 /* NOT perform logical not of an expression */
147 /* AND perform logical and between two expressions*/
148 /* OR perform logical or between two expressions*/
149 /* NAND perform logical nand between two expressions*/
150 /* NOR perform logical nor between two expressions*/
151 /* XOR perform logical xor between two expressions*/
152 /* ANDM perform logical and between two expressions*/
153 /* (the second expression is a scalar) */
154 /* called func. : createAtom , createExpr, addQExpr , beh_toolbug, */
155 /* bvl_error , addchain , freechain */
156 /* ###--------------------------------------------------------------### */
159 bvl_crtabl (short oper
, bvlexpr expr1
, bvlexpr expr2
, int left
, int right
)
163 struct chain
*ptabl1
;
164 struct chain
*ptabl2
;
165 struct chain
*ptaux1
;
166 struct chain
*ptaux2
;
168 char lcl_buffer
[256];
171 char true_flag_un
= 0;
172 char true_flag_zero
= 0;
173 struct chain
*abl_un
= createAtom("'1'");
174 struct chain
*abl_zero
= createAtom("'0'");
178 result
.LIST_ABL
= NULL
;
184 if ((expr1
.LIST_ABL
== NULL
) || (expr2
.LIST_ABL
== NULL
))
185 beh_toolbug (4,"bvl_crtabl",NULL
,0);
188 if (expr1
.LIST_ABL
== expr2
.LIST_ABL
)
189 beh_toolbug (16,"bvl_crtabl",NULL
,0);
192 ptaux2
= expr2
.LIST_ABL
;
193 while (ptaux2
->NEXT
!= NULL
)
194 ptaux2
= ptaux2
->NEXT
;
196 ptaux2
->NEXT
= expr1
.LIST_ABL
;
198 result
.LIST_ABL
= expr2
.LIST_ABL
;
199 result
.WIDTH
= expr1
.WIDTH
+ expr2
.WIDTH
;
201 expr1
.LIST_ABL
= NULL
;
202 expr2
.LIST_ABL
= NULL
;
208 if ( expr1
.IDENT
== NULL
)
209 beh_toolbug (2,"bvl_crtabl",NULL
,0);
212 if ((left
== -1) && (right
== -1))
214 result
.LIST_ABL
= addchain(result
.LIST_ABL
,createAtom(expr1
.IDENT
));
222 result
.WIDTH
= right
- left
+ 1;
227 result
.WIDTH
= left
- right
+ 1;
230 for (i
=left
; i
!=(right
+inc
) ; i
+=inc
)
232 sprintf (name
,"%s %i",expr1
.IDENT
,i
);
233 name2
= namealloc (name
);
234 result
.LIST_ABL
= addchain (result
.LIST_ABL
,createAtom(name2
));
242 if ( expr1
.IDENT
== NULL
)
243 beh_toolbug (2,"bvl_crtabl",NULL
,0);
246 bvl_tobin (lcl_buffer
,expr1
.IDENT
,-1,-1);
247 if ((left
== -1) && (right
== -1))
250 right
= strlen (lcl_buffer
) - 1;
253 for (i
=left
; i
<=right
; i
++)
255 switch ( lcl_buffer
[i
] )
258 result
.LIST_ABL
= addchain (result
.LIST_ABL
,createAtom("'0'"));
261 result
.LIST_ABL
= addchain (result
.LIST_ABL
,createAtom("'1'"));
264 result
.LIST_ABL
= addchain (result
.LIST_ABL
,createAtom("'Z'"));
267 result
.LIST_ABL
= addchain (result
.LIST_ABL
,createAtom("'U'"));
269 /*----------- Beware Not VHDL -------------*/
271 result
.LIST_ABL
= addchain (result
.LIST_ABL
,createAtom("'D'"));
274 beh_toolbug (15,"bvl_crtabl",NULL
,expr1
.IDENT
[i
]);
277 result
.WIDTH
= right
- left
+ 1;
282 if (expr1
.LIST_ABL
== NULL
)
283 beh_toolbug (3,"bvl_crtabl",NULL
,0);
286 ptaux1
= expr1
.LIST_ABL
;
287 while (ptaux1
!= NULL
)
289 ptabl1
= createExpr (STABLE
);
290 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
291 ptaux1
->DATA
= ptabl1
;
292 ptaux1
= ptaux1
->NEXT
;
295 result
.LIST_ABL
= expr1
.LIST_ABL
;
296 result
.WIDTH
= expr1
.WIDTH
;
298 expr1
.LIST_ABL
= NULL
;
303 if (expr1
.LIST_ABL
== NULL
)
304 beh_toolbug (3,"bvl_crtabl",NULL
,0);
307 ptaux1
= expr1
.LIST_ABL
;
308 while (ptaux1
!= NULL
)
310 ptabl1
= createExpr (NOT
);
311 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
312 ptaux1
->DATA
= ptabl1
;
313 ptaux1
= ptaux1
->NEXT
;
316 result
.LIST_ABL
= expr1
.LIST_ABL
;
317 result
.WIDTH
= expr1
.WIDTH
;
319 expr1
.LIST_ABL
= NULL
;
324 if ((expr1
.LIST_ABL
== NULL
) || (expr2
.LIST_ABL
== NULL
))
325 beh_toolbug (4,"bvl_crtabl",NULL
,0);
328 if (expr1
.WIDTH
!= expr2
.WIDTH
)
331 ptabl2
= createAtom ("'1'");
333 ptaux1
= expr1
.LIST_ABL
;
334 while (ptaux1
!= NULL
)
336 freeExpr (ptaux1
->DATA
);
337 ptaux1
= ptaux1
->NEXT
;
339 ptaux2
= expr2
.LIST_ABL
;
340 while (ptaux2
!= NULL
)
342 freeExpr (ptaux2
->DATA
);
343 ptaux2
= ptaux2
->NEXT
;
348 ptaux1
= expr1
.LIST_ABL
;
349 ptaux2
= expr2
.LIST_ABL
;
350 /* If expr2 = '1' then return expr1 */
351 while(ptaux2
!= NULL
)
354 if(!equalExpr(ptaux2
->DATA
,abl_un
))
356 /* One abl not abl_un */
360 ptaux2
= ptaux2
->NEXT
;
362 if(true_flag_un
== 1)
364 ptabl1
= (struct chain
*)ptaux1
->DATA
;
365 ptaux1
= ptaux1
->NEXT
;
368 ptabl2
= createExpr(AND
);
369 addQExpr(ptabl2
,ptabl1
);
372 while(ptaux1
!= NULL
)
374 addQExpr(ptabl1
,(struct chain
*)ptaux1
->DATA
);
375 ptaux1
= ptaux1
->NEXT
;
377 result
.LIST_ABL
= addchain(result
.LIST_ABL
,ptabl1
);
379 expr1
.LIST_ABL
= NULL
;
380 expr2
.LIST_ABL
= NULL
;
382 /* If expr2 = '0' then return NOT(expr1) */
383 ptaux2
= expr2
.LIST_ABL
;
385 while(ptaux2
!= NULL
)
388 if(!equalExpr(ptaux2
->DATA
,abl_zero
))
390 /* One abl not abl_zero */
394 ptaux2
= ptaux2
->NEXT
;
396 if(true_flag_zero
== 1)
398 while(ptaux1
!= NULL
)
400 ptabl1
= createExpr(NOT
);
401 addQExpr(ptabl1
,(struct chain
*)ptaux1
->DATA
);
402 ptaux1
= ptaux1
->NEXT
;
405 ptabl2
= createExpr(AND
);
406 addQExpr(ptabl2
,ptabl1
);
409 while(ptaux1
!= NULL
)
411 ptabl2
= createExpr(NOT
);
412 addQExpr(ptabl2
,(struct chain
*)ptaux1
->DATA
);
413 addQExpr(ptabl1
,ptabl2
);
414 ptaux1
= ptaux1
->NEXT
;
416 /* --ptabl1 = createExpr(NOT);
417 addQExpr(ptabl1,(struct chain *)ptaux1->DATA);
418 ptaux1->DATA = ptabl1;
419 ptaux1 = ptaux1->NEXT;
422 result
.LIST_ABL
= addchain(result
.LIST_ABL
,ptabl1
);
424 expr1
.LIST_ABL
= NULL
;
425 expr2
.LIST_ABL
= NULL
;
429 ptaux2
= expr2
.LIST_ABL
;
430 if((true_flag_zero
== 0) && (true_flag_un
== 0))
432 ptabl1
= createExpr (XOR
);
433 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
434 addQExpr (ptabl1
, (struct chain
*)ptaux2
->DATA
);
436 ptaux1
= ptaux1
->NEXT
;
437 ptaux2
= ptaux2
->NEXT
;
439 while (ptaux1
!= NULL
)
441 ptabl2
= createExpr (OR
);
442 addQExpr (ptabl2
,ptabl1
);
444 ptabl1
= createExpr (XOR
);
445 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
446 addQExpr (ptabl1
, (struct chain
*)ptaux2
->DATA
);
448 addQExpr (ptabl2
, ptabl1
);
451 ptaux1
= ptaux1
->NEXT
;
452 ptaux2
= ptaux2
->NEXT
;
454 ptabl2
= createExpr (NOT
);
455 addQExpr (ptabl2
, ptabl1
);
457 result
.LIST_ABL
= addchain (result
.LIST_ABL
,ptabl2
);
459 freechain (expr1
.LIST_ABL
);
460 freechain (expr2
.LIST_ABL
);
461 expr1
.LIST_ABL
= NULL
;
462 expr2
.LIST_ABL
= NULL
;
470 if ((expr1
.LIST_ABL
== NULL
) || (expr2
.LIST_ABL
== NULL
))
471 beh_toolbug (4,"bvl_crtabl",NULL
,0);
474 if (expr1
.WIDTH
!= expr2
.WIDTH
)
477 ptabl1
= createAtom ("'1'");
479 ptaux1
= expr1
.LIST_ABL
;
480 while (ptaux1
!= NULL
)
482 freeExpr (ptaux1
->DATA
);
483 ptaux1
= ptaux1
->NEXT
;
485 ptaux2
= expr2
.LIST_ABL
;
486 while (ptaux2
!= NULL
)
488 freeExpr (ptaux2
->DATA
);
489 ptaux2
= ptaux2
->NEXT
;
494 ptaux1
= expr1
.LIST_ABL
;
495 ptaux2
= expr2
.LIST_ABL
;
497 /* If expr2 = '0' then return expr1 */
498 while(ptaux2
!= NULL
)
501 if(!equalExpr(ptaux2
->DATA
,abl_zero
))
503 /* One abl not abl_zero */
507 ptaux2
= ptaux2
->NEXT
;
509 if(true_flag_zero
== 1)
511 result
.LIST_ABL
= expr1
.LIST_ABL
;
513 expr1
.LIST_ABL
= NULL
;
514 expr2
.LIST_ABL
= NULL
;
516 /* If expr2 = '1' then return NOT(expr1) */
517 ptaux2
= expr2
.LIST_ABL
;
519 while(ptaux2
!= NULL
)
522 if(!equalExpr(ptaux2
->DATA
,abl_un
))
524 /* One abl not abl_un */
528 ptaux2
= ptaux2
->NEXT
;
530 if(true_flag_un
== 1)
532 while(ptaux1
!= NULL
)
534 ptabl1
= createExpr(NOT
);
535 addQExpr(ptabl1
,(struct chain
*)ptaux1
->DATA
);
536 ptaux1
->DATA
= ptabl1
;
537 ptaux1
= ptaux1
->NEXT
;
539 result
.LIST_ABL
= expr1
.LIST_ABL
;
541 expr1
.LIST_ABL
= NULL
;
542 expr2
.LIST_ABL
= NULL
;
546 ptaux2
= expr2
.LIST_ABL
;
547 if((true_flag_zero
== 0) && (true_flag_un
== 0))
549 ptabl1
= createExpr (XOR
);
550 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
551 addQExpr (ptabl1
, (struct chain
*)ptaux2
->DATA
);
553 ptaux1
= ptaux1
->NEXT
;
554 ptaux2
= ptaux2
->NEXT
;
556 for (i
=2 ; i
<=expr1
.WIDTH
; i
++)
558 ptabl2
= createExpr (OR
);
559 addQExpr (ptabl2
, ptabl1
);
561 ptabl1
= createExpr (XOR
);
562 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
563 addQExpr (ptabl1
, (struct chain
*)ptaux2
->DATA
);
565 addQExpr (ptabl2
, ptabl1
);
568 ptaux1
= ptaux1
->NEXT
;
569 ptaux2
= ptaux2
->NEXT
;
571 result
.LIST_ABL
= addchain(result
.LIST_ABL
,ptabl1
);
573 freechain (expr1
.LIST_ABL
);
574 freechain (expr2
.LIST_ABL
);
575 expr1
.LIST_ABL
= NULL
;
576 expr2
.LIST_ABL
= NULL
;
588 if (expr1
.LIST_ABL
== NULL
)
590 if (expr2
.LIST_ABL
== NULL
)
591 beh_toolbug (4,"bvl_crtabl",NULL
,0);
594 result
.LIST_ABL
= expr2
.LIST_ABL
;
595 result
.WIDTH
= expr2
.WIDTH
;
596 expr2
.LIST_ABL
= NULL
;
601 if (expr2
.LIST_ABL
== NULL
)
603 result
.LIST_ABL
= expr1
.LIST_ABL
;
604 result
.WIDTH
= expr1
.WIDTH
;
605 expr1
.LIST_ABL
= NULL
;
609 if (expr1
.LIST_ABL
== expr2
.LIST_ABL
)
610 beh_toolbug (16,"bvl_crtabl",NULL
,0);
613 if (expr1
.WIDTH
!= expr2
.WIDTH
)
619 ptaux1
= expr1
.LIST_ABL
;
620 ptaux2
= expr2
.LIST_ABL
;
622 for (i
=1 ; i
<=expr1
.WIDTH
; i
++)
624 ptabl1
= createExpr (oper
);
625 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
626 addQExpr (ptabl1
, (struct chain
*)ptaux2
->DATA
);
628 ptaux1
->DATA
= (void *)ptabl1
;
630 ptaux1
= ptaux1
->NEXT
;
631 ptaux2
= ptaux2
->NEXT
;
634 result
.LIST_ABL
= expr1
.LIST_ABL
;
635 result
.WIDTH
= expr1
.WIDTH
;
636 freechain (expr2
.LIST_ABL
);
637 expr1
.LIST_ABL
= NULL
;
638 expr2
.LIST_ABL
= NULL
;
645 if ((expr1
.LIST_ABL
== NULL
) || (expr2
.LIST_ABL
== NULL
))
646 beh_toolbug (4,"bvl_crtabl",NULL
,0);
649 if (expr2
.WIDTH
!= 1)
655 ptaux1
= expr1
.LIST_ABL
;
656 ptaux2
= expr2
.LIST_ABL
;
657 while (ptaux1
!= NULL
)
659 ptabl1
= createExpr (AND
);
660 addQExpr (ptabl1
, (struct chain
*)ptaux1
->DATA
);
661 addQExpr (ptabl1
, copyExpr((struct chain
*)ptaux2
->DATA
));
662 ptaux1
->DATA
= (void *)ptabl1
;
664 ptaux1
= ptaux1
->NEXT
;
667 result
.LIST_ABL
= expr1
.LIST_ABL
;
668 result
.WIDTH
= expr1
.WIDTH
;
669 ptaux2
= expr2
.LIST_ABL
;
670 while (ptaux2
!= NULL
)
672 freeExpr (ptaux2
->DATA
);
673 ptaux2
= ptaux2
->NEXT
;
675 freechain (expr2
.LIST_ABL
);
676 expr2
.LIST_ABL
= NULL
;
677 expr1
.LIST_ABL
= NULL
;
682 beh_toolbug (1,"bvl_crtabl",NULL
,0);
692 /* ###--------------------------------------------------------------### */
693 /* function : bvl_select */
694 /* description : create an abl representing the choice in a selected */
695 /* signal assignment and perform unicity verification */
697 /* called func. : bvl_tobin , bddToAbl , addInputCct , */
698 /* substPhyExpr, initializeCct, createNodeTermBdd, */
699 /* bvl_error , notBdd , applyBinBdd , */
700 /* addchain , namealloc */
701 /* ###--------------------------------------------------------------### */
704 bvl_select (bvlexpr
*result
, chain_list
*ptstr
, pNode
*ptbdd
, bvlexpr ptablstr
)
708 struct chain
*ptauxabl
;
714 struct chain
*ptnewabl
;
715 struct chain
*ptnewabl2
;
716 static int oth_flg
=0;
717 static int last_width
=0;
718 static pCircuit pC
= NULL
;
720 result
->LIST_ABL
= NULL
;
721 result
->IDENT
= NULL
;
726 pC
= initializeCct ("-select-",200,0);
730 if (last_width
< ptablstr
.WIDTH
)
732 for (; last_width
<ptablstr
.WIDTH
; last_width
++)
734 sprintf (nomvar
,"(%d)",last_width
);
735 createNodeTermBdd (addInputCct(pC
,nomvar
));
742 while (ptstr
!= NULL
)
744 bvl_tobin (binstr
, (char *)ptstr
->DATA
,-1,-1);
750 if (strcmp("others", (char *)ptstr
->DATA
))
754 if (strlen (binstr
) != (size_t)ptablstr
.WIDTH
)
758 for (i
=0 ; binstr
[i
]!='\0' ; i
++)
760 ptbddaux
= createNodeTermBdd (i
+2);
761 if (binstr
[i
] == '0')
762 ptbddaux
= notBdd (ptbddaux
);
763 ptbddres
= applyBinBdd (AND
, ptbddaux
, ptbddres
);
765 ptbddnew
= applyBinBdd (OR
,*ptbdd
,ptbddres
);
767 if (*ptbdd
== ptbddnew
)
777 ptbddres
= notBdd (*ptbdd
);
780 ptbddtmp
= applyBinBdd (OR
,ptbddtmp
,ptbddres
);
784 ptnewabl
= bddToAbl (ptbddtmp
, pC
->pNameI
);
786 ptauxabl
= ptablstr
.LIST_ABL
;
787 i
= ptablstr
.WIDTH
- 1;
788 while (ptauxabl
!= NULL
)
790 sprintf (nomvar
,"(%i)",i
);
792 substPhyExpr (ptnewabl,namealloc(nomvar),(struct chain *)ptauxabl->DATA);
794 ptnewabl2
= substExpr (ptnewabl
,namealloc(nomvar
),
795 (struct chain
*)ptauxabl
->DATA
);
797 ptnewabl
= ptnewabl2
;
800 ptauxabl
= ptauxabl
->NEXT
;
802 result
->LIST_ABL
= addchain (NULL
, ptnewabl
);
807 /* ###--------------------------------------------------------------### */
808 /* function : bvl_tobin */
809 /* description : transform a StringLit, BitStringLit or CharacterLit */
810 /* in a string of '0' and '1's */
811 /* ###--------------------------------------------------------------### */
814 bvl_tobin (char *trg
, char *src
, int left
, int right
)
830 if (!strcmp (src
,"others"))
836 if ((src
[0] != '\'') && (src
[0] != '"') && (src
[0] != '%'))
851 while ((lcl_trg
[j
] = src
[indx
]) != '\0')
859 case 'd': /* Beware Not VHDL */
869 errflg
= 1; bvl_error(73,src
);
877 while (src
[indx
] != '\0')
883 strcat (lcl_trg
,"000"); break;
885 strcat (lcl_trg
,"001"); break;
887 strcat (lcl_trg
,"010"); break;
889 strcat (lcl_trg
,"011"); break;
891 strcat (lcl_trg
,"100"); break;
893 strcat (lcl_trg
,"101"); break;
895 strcat (lcl_trg
,"110"); break;
897 strcat (lcl_trg
,"111"); break;
903 j
-= 3; errflg
= 1; bvl_error(73,src
);
911 while (src
[indx
] != '\0')
917 strcat (lcl_trg
,"0000"); break;
919 strcat (lcl_trg
,"0001"); break;
921 strcat (lcl_trg
,"0010"); break;
923 strcat (lcl_trg
,"0011"); break;
925 strcat (lcl_trg
,"0100"); break;
927 strcat (lcl_trg
,"0101"); break;
929 strcat (lcl_trg
,"0110"); break;
931 strcat (lcl_trg
,"0111"); break;
933 strcat (lcl_trg
,"1000"); break;
935 strcat (lcl_trg
,"1001"); break;
938 strcat (lcl_trg
,"1010"); break;
941 strcat (lcl_trg
,"1011"); break;
944 strcat (lcl_trg
,"1100"); break;
947 strcat (lcl_trg
,"1101"); break;
950 strcat (lcl_trg
,"1110"); break;
953 strcat (lcl_trg
,"1111"); break;
959 j
-= 4; errflg
= 1; bvl_error(73,src
);
966 beh_toolbug (17,"bvl_tobin",NULL
,base
);
969 if ((j
== 0) || (j
<= right
))
978 strcpy (trg
, &lcl_trg
[left
]);
979 trg
[right
- left
+ 1] = '\0';
982 strcpy (trg
, lcl_trg
);