1 /****************************************************************************/
3 /* Chaine de CAO & VLSI AVERTEC */
5 /* Produit : CBH Version 1.00 */
6 /* Fichier : cbh_seq.c */
8 /* (c) copyright 2001 AVERTEC */
9 /* Tous droits reserves */
11 /* Auteur(s) : Anthony LESTER */
13 /****************************************************************************/
24 // this file is not to date
29 avt_errmsg(CBH_ERRMSG
,"002",AVT_FATAL
,progname
);
30 // fprintf(stderr, "%s needs a file as argument\n", progname);
35 main(int argc
, char *argv
[])
38 befig_list
*ptcellbefig
;
46 argc
= ccommand(&argv
);
55 if (argc
!= 2) usage("cbhtest");
56 ptcellbefig
= loadbefig(NULL
, argv
[1], BVL_KEEPAUX
);
58 ptcbhseq
= cbh_getseqfunc(ptcellbefig
, CBH_LIB_MODE
);
59 if (ptcbhseq
!= NULL
) {
60 switch (ptcbhseq
->SEQTYPE
) {
65 printf("\tFLIP-FLOP:\n");
68 printf("\tUNKNOWN:\n");
71 if (ptcbhseq
->NAME
!= NULL
) printf("\t\tNAME = %s\n", ptcbhseq
->NAME
);
72 if (ptcbhseq
->NEGNAME
!= NULL
) printf("\t\tNEGNAME = %s\n", ptcbhseq
->NEGNAME
);
73 if (ptcbhseq
->PIN
!= NULL
) printf("\t\tPIN = %s\n", ptcbhseq
->PIN
);
74 if (ptcbhseq
->NEGPIN
!= NULL
) printf("\t\tNEGPIN = %s\n", ptcbhseq
->NEGPIN
);
75 printf("\t\tCLOCK = ");
76 cbh_writeabl(stdout
, ptcbhseq
->CLOCK
);
78 printf("\t\tSLAVECLOCK = ");
79 cbh_writeabl(stdout
, ptcbhseq
->SLAVECLOCK
);
81 printf("\t\tDATA = ");
82 cbh_writeabl(stdout
, ptcbhseq
->DATA
);
84 printf("\t\tRESET = ");
85 cbh_writeabl(stdout
, ptcbhseq
->RESET
);
88 cbh_writeabl(stdout
, ptcbhseq
->SET
);
90 printf("\t\tRSCONF = ");
91 cbh_writeabl(stdout
, ptcbhseq
->RSCONF
);
93 printf("\t\tRSCONFNEG = ");
94 cbh_writeabl(stdout
, ptcbhseq
->RSCONFNEG
);
98 for (ptbeout
= ptcellbefig
->BEOUT
; ptbeout
; ptbeout
= ptbeout
->NEXT
) {
99 ptcbhcomb
= cbh_getcombfunc(ptcellbefig
, ptcbhseq
, ptbeout
->NAME
);
100 if (ptcbhcomb
!= NULL
) {
101 printf("\t%s: ",ptbeout
->NAME
);
102 cbh_writeabl(stdout
, ptcbhcomb
->FUNCTION
);
106 for (ptbebus
= ptcellbefig
->BEBUS
; ptbebus
; ptbebus
= ptbebus
->NEXT
) {
107 ptcbhcomb
= cbh_getcombfunc(ptcellbefig
, ptcbhseq
, ptbebus
->NAME
);
108 if (ptcbhcomb
!= NULL
) {
109 printf("\t%s: \n",ptbebus
->NAME
);
110 printf("\t\tFUNCTION = ");
111 cbh_writeabl(stdout
, ptcbhcomb
->FUNCTION
);
113 printf("\t\tHZFUNC = ");
114 cbh_writeabl(stdout
, ptcbhcomb
->HZFUNC
);
116 printf("\t\tCONFLICT = ");
117 cbh_writeabl(stdout
, ptcbhcomb
->CONFLICT
);
122 sprintf(buffer
, "cbh_%s", ptcellbefig
->NAME
);
123 ptcellbefig
->NAME
= namealloc(buffer
);
124 savebefig(ptcellbefig
, 0);