Definition at line 28 of file tp.c.
28 {
29 long out;
30 long t;
31 char *tg = (char*) NULL;
32 char *nm = (char*) NULL;
33 unsigned long *ml = (unsigned long*) NULL;
34 unsigned long *mf = (unsigned long*) NULL;
35 long kd;
36 long tp;
37 char sgn[2] = {'\0'};
38 char brck[3] = {'\0'};
42 char *str = (char*) NULL;
43
45
53
54 switch (kd) {
55
56
57
64 (void) fprintf(
STDERR,
" number of levels <%s> must be digital type\n", tok1);
66 }
71 (void) fprintf(
STDERR,
" input <%s> of the converter must be analog type\n", tok1);
73 }
78 (void) fprintf(
STDERR,
" reference <%s> of the converter must be analog type\n", tok1);
80 }
81 break;
82
83
84
86 for (;;) {
89 break;
90 }
91 if ((0 == strcmp(tok1, "after")) || (0 == strcmp(tok1, "with"))) {
93 continue;
94 }
99 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
100 (void) fprintf(
STDERR,
" input nodes must be all digital type or all analog type\n");
102 }
103 }
104 }
105 break;
106
107
108
115 (void) fprintf(
STDERR,
" opcode <%s> must be digital type\n", tok1);
117 }
118 for (;;) {
121 break;
122 }
124 if (tp != t) {
126 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
128 }
129 }
130 break;
131
132
133
145 for (;;) {
148 break;
149 }
153 (void) fprintf(
STDERR,
" input <%s> must be digital type\n", tok1);
155 }
156 }
157 break;
158
159
160
166 (void) fprintf(
STDERR,
" input <%s> must be analog type\n", tok1);
168 }
169 break;
170
171
172
182 (void) fprintf(
STDERR,
" shift value <%s> must be digital type\n", tok1);
184 }
189 (void) fprintf(
STDERR,
" input <%s> must be digital type\n", tok1);
191 }
192 break;
193
194
195
197 for (;;) {
200 break;
201 }
205 (void) fprintf(
STDERR,
" input <%s> must be digital type\n", tok1);
207 }
208 }
209 break;
210
211
212
223 (void) fprintf(
STDERR,
" input <%s> should be a hexadecimal constant or a digital type node\n", tok1);
225 break;
226 }
227 for (;;) {
230 break;
231 }
235 (void) fprintf(
STDERR,
" input <%s> must be digital type\n", tok1);
237 }
238 }
239 break;
240
241
242
245 break;
246
247
248
252 if (tp != t) {
254 (void) fprintf(
STDERR,
" type inconsistency between clip level low <%s> and output node <%s>\n", tok1, nm);
256 }
259 if (tp != t) {
261 (void) fprintf(
STDERR,
" type inconsistency between clip level high <%s> and output node <%s>\n", tok1, nm);
263 }
266 if (tp != t) {
268 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
270 }
271 break;
272
273
274
276 break;
277
278
279
285 if (tp != t) {
287 (void) fprintf(
STDERR,
" type inconsistency between inputs <%s> and <%s>\n", tok1, tok2);
289 }
290 break;
291
292
293
303 (void) fprintf(
STDERR,
" offset <%s> must be analog type\n", tok1);
305 }
310 (void) fprintf(
STDERR,
" amplitude <%s> must be analog type\n", tok1);
312 }
317 (void) fprintf(
STDERR,
" frequency <%s> must be analog type\n", tok1);
319 }
325 (void) fprintf(
STDERR,
" phase <%s> must be analog type\n", tok1);
327 } else {
329 (void) fprintf(
STDERR,
" delay <%s> must be analog type\n", tok1);
331 }
332 }
338 (void) fprintf(
STDERR,
" optional duty cycle <%s> must be analog type\n", tok1);
340 }
341 }
342 break;
343
344
345
346
347
348
349
361 for (;;) {
364 break;
365 }
367 if (tp != t) {
369 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
371 }
372 }
373 break;
374
375
376
383 (void) fprintf(
STDERR,
" number of levels <%s> must be digital type\n", tok1);
385 }
390 (void) fprintf(
STDERR,
" input <%s> of the converter must be digital type\n", tok1);
392 }
397 (void) fprintf(
STDERR,
" reference <%s> of the converter must be analog type\n", tok1);
399 }
400 break;
401
402
403
404
405
409 break;
410
411
412
414 break;
415
416
417
424 if (tp != t) {
426 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
428 }
429 break;
430
431
432
438 (void) fprintf(
STDERR,
" input <%s> must be analog type\n", tok1);
440 }
441 break;
442
443
444
445
450 break;
451
452
453
459 if (tp != t) {
461 (void) fprintf(
STDERR,
" type inconsistency between inputs <%s> and <%s>\n", tok1, tok2);
463 }
464 if (0 != strcmp(str, "")) {
467 if (tp != t) {
469 (void) fprintf(
STDERR,
" type inconsistency between inputs <%s>, <%s> and precision <%s>\n", tok1, tok2, tok3);
471 }
472 }
473 break;
474
475
476
485 for (;;) {
488 break;
489 }
493 (void) fprintf(
STDERR,
" input <%s> must be analog type>\n", tok1);
495 }
496 }
497 break;
498
499
500
506 if (tp != t) {
508 (void) fprintf(
STDERR,
" type inconsistency between parameter <%s> and output node <%s>\n", tok1, nm);
510 }
513 if (tp != t) {
515 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
517 }
518 break;
519
520
521
522
527 if (tp != t) {
529 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
531 }
532 break;
533
534
535
541 (void) fprintf(
STDERR,
" bit number <%s> must be digital type\n", tok1);
543 }
548 (void) fprintf(
STDERR,
" input node <%s> must be digital type\n", tok1);
550 }
551 break;
552
553
554
561 (void) fprintf(
STDERR,
" control <%s> must be digital type\n", tok1);
563 }
566 if (tp != t) {
568 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok2, nm);
570 }
571 break;
572
573
574
580 (void) fprintf(
STDERR,
" input <%s> must be digital type\n", tok1);
582 }
583 break;
584
585
586
592 (void) fprintf(
STDERR,
" set <%s> must be digital type\n", tok1);
594 }
599 (void) fprintf(
STDERR,
" reset <%s> must be digital type\n", tok1);
601 }
602 break;
603
604
605
611 (void) fprintf(
STDERR,
" control <%s> must be digital type\n", tok1);
613 }
614 for (;;) {
617 break;
618 }
619 if (0 == strcmp(tok1, "void")) {
620 continue;
621 }
623 if (tp != t) {
625 (void) fprintf(
STDERR,
" type inconsistency between the input <%s> and output node <%s>\n", tok1, nm);
627 }
628 }
629 break;
630
631
632
634 for (;;) {
637 break;
638 }
640 if (tp != t) {
642 (void) fprintf(
STDERR,
" type inconsistency between the input <%s> and output node <%s>\n", tok1, nm);
644 }
645 }
646 break;
647
648
649
655 (void) fprintf(
STDERR,
" number of delays <%s> must be a positive digital\n", tok1);
657 }
660 if (tp != t) {
662 (void) fprintf(
STDERR,
" type inconsistency between input <%s> and output node <%s>\n", tok1, nm);
664 }
665 break;
666
667
668
674 (void) fprintf(
STDERR,
" DC value <%s> must be analog type\n", tok1);
676 }
681 (void) fprintf(
STDERR,
" RMS value <%s> must be analog type\n", tok1);
683 }
684 break;
685
686
687
695 (void) fprintf(
STDERR,
" address <%s> must be digital type\n", tok1);
697 }
702 (void) fprintf(
STDERR,
" chip select <%s> must be digital type\n", tok1);
704 }
709 (void) fprintf(
STDERR,
" read/write <%s> must be digital type\n", tok1);
711 }
714 if (tp != t) {
716 (void) fprintf(
STDERR,
" type inconsistency between write port <%s> and read port <%s>\n", tok1, nm);
718 }
719 break;
720
721
722
730 (void) fprintf(
STDERR,
" address <%s> must be digital type\n", tok1);
732 }
737 (void) fprintf(
STDERR,
" chip select <%s> must be digital type\n", tok1);
739 }
740 break;
741
742
743
749 (void) fprintf(
STDERR,
" control <%s> must be digital type\n", tok1);
751 }
754 if (tp != t) {
756 (void) fprintf(
STDERR,
" type inconsistency between the input <%s> and output node <%s>\n", tok1, nm);
758 }
760 break;
761 }
764 if (tp != t) {
766 (void) fprintf(
STDERR,
" type inconsistency between setting value <%s> and output node <%s>\n", tok1, nm);
768 }
769 break;
770
771
772
778 (void) fprintf(
STDERR,
" mask <%s> must be a hexadecimal constant\n", tok1);
780 }
781 for (;;) {
784 break;
785 }
789 (void) fprintf(
STDERR,
" input <%s> must be digital type\n", tok1);
791 }
792 }
793 break;
794
795
796
802 (void) fprintf(
STDERR,
" first level <%s> must be analog type\n", tok1);
804 }
809 (void) fprintf(
STDERR,
" second level <%s> must be analog type>\n", tok1);
811 }
816 (void) fprintf(
STDERR,
" step time <%s> must be analog type\n", tok1);
818 }
824 (void) fprintf(
STDERR,
" step time <%s> must be analog type\n", tok1);
826 }
827 }
828 break;
829
830
831
837 if (tp != t) {
839 (void) fprintf(
STDERR,
" type inconsistency between trigger threshold <%s> and input node <%s>\n", tok1, tok2);
841 }
842 break;
843
844
845
851 (void) fprintf(
STDERR,
" decimation factor <%s> must be digital type\n", tok1);
853 }
858 (void) fprintf(
STDERR,
" decimation offset <%s> must be digital type\n", tok1);
860 }
861 break;
862
863
864
866 default :
868 (void) fprintf(
STDERR,
" unknown node kind [#%ld] detected when checking node type\n", kd);
869 break;
870 }
871 }
872 return;
873}
void print_warning_location(const char *type, const unsigned long *mlin, const unsigned long *mfil)
void print_error_location(const char *type, const unsigned long *mlin, const unsigned long *mfil)
long get_type(char *identifier)
long node_id(const char *identifier)
EXTERN NODE_TYPE Node_List[4095L]
#define DIFFERENTIATOR_KIND
#define DIGITAL_DATA_TYPE
char * get_token_between_braces(char *str, char *brc, char *tok)
char * get_sign_and_token(char *str, char *sgn, char *tok)
References ADC_KIND, ALGEBRA_KIND, ALU_KIND, ANALOG_DATA_TYPE, AND_KIND, AVERAGE_KIND, BSHIFT_KIND, BTOI_KIND, BUF_KIND, BWAND_KIND, BWINV_KIND, BWNAND_KIND, BWNOR_KIND, BWOR_KIND, BWXNOR_KIND, BWXOR_KIND, CHG_KIND, CLIP_KIND, CLOCK_KIND, COMP_KIND, COPY_KIND, COS_KIND, DAC_KIND, DALGEBRA_KIND, DC_KIND, DELAY1_KIND, DELAY2_KIND, DELAY3_KIND, DELAY_KIND, DIFFERENTIATOR_KIND, DIGITAL_DATA_TYPE, DIV_KIND, DTOI_KIND, DTOOL_KIND, DUSER_KIND, EQUAL_KIND, flag_node(), FZAND_KIND, FZBUF_KIND, FZINV_KIND, FZNAND_KIND, FZNOR_KIND, FZOR_KIND, FZXNOR_KIND, FZXOR_KIND, GAIN_KIND, get_sign_and_token(), get_token_between_braces(), get_type(), HEX_DATA_TYPE, HOLD_KIND, IALGEBRA_KIND, INTEGRATOR_KIND, INV_KIND, ISEMPTY, ISNOTEMPTY, ITOB_KIND, ITOD_KIND, ITOOL_KIND, IUSER_KIND, LATCH_KIND, LSHIFT_KIND, MAX_KIND, MERGE_KIND, MIN_KIND, MOD_KIND, MULLER_KIND, MUX_KIND, NAND_KIND, node_id(), Node_List, NOISE_KIND, NOR_KIND, Num_Nodes, OFFSET_KIND, OR_KIND, OSC_KIND, POLY_KIND, print_error_location(), print_warning_location(), PROD_KIND, QUANT_KIND, RAM2_KIND, RAM_KIND, RECT_KIND, RELAY_KIND, RIP_KIND, ROM2_KIND, ROM_KIND, RSHIFT1_KIND, RSHIFT2_KIND, RSHIFT_KIND, SIGN_KIND, SIN_KIND, SQUARE_KIND, STDERR, STEP_KIND, STRLENGTH, SUB_KIND, SUM_KIND, TEST_KIND, TOGGLE_KIND, TRACK_KIND, TRIANGLE_KIND, TRIG_KIND, UADC_KIND, UDAC_KIND, UNDEFINED, UNKNOWN_KIND, UNKNOWN_TYPE, WSUM_KIND, XNOR_KIND, XOR_KIND, and ZERO_KIND.
Referenced by main().