1 /****************************************************************************/
3 /* Chaine de CAO & VLSI AVERTEC */
6 /* Fichier : zen_main.c */
8 /* (c) copyright 2002 AVERTEC */
9 /* Tous droits reserves */
11 /* Auteur(s) : Stephane Picault */
14 /****************************************************************************/
17 //#include <sys/types.h>
18 //#include <sys/stat.h>
23 /****************************************************************************/
24 /*{{{ zen_the_question() */
27 /****************************************************************************/
28 void zen_the_question(ZenFig
)
31 fprintf(stderr
,"\x1B[1m");
32 switch (zen_algo1(ZenFig
))
34 case 0 : fprintf(stdout
,"ALGO 1 -> FALSE\n"); break;
35 default: fprintf(stdout
,"ALGO 1 -> TRUE\n") ; break;
37 fprintf(stderr
,"\x1B[0m");
41 /*}}}************************************************************************/
45 /****************************************************************************/
51 case 'f' : ZEN_FAST
= 1 ; break;
52 case 'l' : ZEN_LEVEL
= atoi(opt
+1) ; break;
56 /*}}}************************************************************************/
60 /****************************************************************************/
61 void zen_getOpt(argc
,argv
,chip
,inf
)
70 if (argv
[i
-1][0]=='-') zen_decOpt(argv
[i
-1]+1);
76 else *chip
= argv
[i
-1];
79 /****************************************************************************/
81 /*{{{ main Fonction */
83 /****************************************************************************/
90 char *BeNameFile
= NULL
;
91 char *PaNameFile
= NULL
;
110 zen_getOpt(argc
,argv
,&BeNameFile
,&PaNameFile
);
112 if (getenv("ZEN_TRACE_MODE")) ZEN_TRACEMODE
= 1;
113 if (argc
==1) ZEN_ERROR(3,NULL
);
117 initializeBdd(LARGE_BDD
);
119 BeFigure
= loadbefig(NULL
,BeNameFile
,BVL_TRACE
|BVL_KEEPAUX
);
121 if (!beh_chkbefig(BeFigure
,0))
123 // on cree les dependances in>>out (berin) liste des sorties qui dependent
125 beh_depend(BeFigure
);
126 // on construit tous les bdds pour chaque expression
127 zen_makbehbdd(BeFigure
);
129 // st = mbkalloc(sizeof(struct stat));
130 ZEN_TRACE(0,"loaded");
133 // fgets(key,8,stdin);
134 // fread(key,1,1,stdin);
135 // if (key[0]=='q') EXIT(1);
136 // if (getch()=='q') EXIT(1);
137 // if ((file=fopen(PaNameFile,"r")))
140 // stat("/users/disk01/antony/dev/test/zen/file.inf",st);
141 // if (st->st_size!=0){
143 path
= zen_loadPath(PaNameFile
);
146 zen_remplacebebux(BeFigure
);
147 zen_remplacebebus(BeFigure
);
149 ZenFig
= zen_createzenfig(BeFigure
,path
);
150 zen_the_question(ZenFig
);
151 zen_freezenfig(ZenFig
);
152 // unlink(PaNameFile);
156 beh_frebefig(BeFigure
);