Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | mjames | 1 | /* $Id: cdi_main.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ |
2 | * |
||
3 | * $Log: cdi_main.c,v $ |
||
4 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
||
5 | * Imported into local repositrory |
||
6 | * |
||
7 | * Revision 1.10 2002/09/09 10:36:19 mjames |
||
8 | * Checkpoint checkin |
||
9 | * |
||
10 | * Revision 1.9 2002/08/14 12:03:07 mjames |
||
11 | * Added an 'external' tag to the documentation |
||
12 | * |
||
13 | * Revision 1.9 2002/04/04 15:04:28 mjames |
||
14 | * Fixed #ident problem |
||
15 | * |
||
16 | * Revision 1.8 2001/10/31 22:19:58 mjames |
||
17 | * Tidying up problematical comments caused by CVS |
||
18 | * 'intelligent' comment guessing |
||
19 | * |
||
20 | * Revision 1.7 2001/10/22 11:01:36 mjames |
||
21 | * Modified list_devices to take an options flag |
||
22 | * |
||
23 | * Revision 1.6 2001/10/02 20:55:37 mjames |
||
24 | * Moved documentation about code to main program module. |
||
25 | * |
||
26 | * Revision 1.5 2001/09/28 14:34:13 mjames |
||
27 | * FIxed yydebug variable to exist when YYDEBUG macro |
||
28 | * is not defined. Otherwise linker error will be reported. |
||
29 | * |
||
30 | * Revision 1.4 2001/07/09 15:36:57 mjames |
||
31 | * Placed the version string in an independent file to save time on building |
||
32 | * all of the variants of Vertical |
||
33 | * |
||
34 | * Revision 1.3 2001/06/06 12:10:26 mjames |
||
35 | * Move from HPUX |
||
36 | * |
||
37 | * Revision 1.2 2000/12/04 13:14:01 mjames |
||
38 | * Imported all of the PCB syntax readers. |
||
39 | * |
||
40 | * Converted "a/b" to mean "a" divided by "b" insted of a single string |
||
41 | * "a/b" in Verilog |
||
42 | * |
||
43 | * Revision 1.1.1.1 2000/10/19 21:58:34 mjames |
||
44 | * Mike put it here |
||
45 | * |
||
46 | * |
||
47 | * Revision 1.29 2000/10/04 10:37:01 10:37:01 mjames (Mike James) |
||
48 | * Modified to become part of vertical2, complete |
||
49 | * with VHDL COMPONENT and SIGNAL declarations. |
||
50 | * |
||
51 | * Revision 1.29 2000/10/04 10:37:01 10:37:01 mjames (Mike James) |
||
52 | * Part of Release PSAVAT01 |
||
53 | * |
||
54 | * Revision 1.28 2000/10/02 11:04:07 11:04:07 mjames (Mike James) |
||
55 | * new_vhdl |
||
56 | * |
||
57 | * Revision 1.27 2000/09/27 14:42:07 14:42:07 mjames (Mike James) |
||
58 | * Part of Release Sep_27_ST_2000 |
||
59 | * |
||
60 | * Revision 1.26 2000/09/27 10:41:21 10:41:21 mjames (Mike James) |
||
61 | * Modified to use correct return code from yyparse. |
||
62 | * |
||
63 | * Revision 1.25 2000/09/21 10:15:37 10:15:37 mjames (Mike James) |
||
64 | * Part of Release Sep21Alpha |
||
65 | * |
||
66 | * Revision 1.24 2000/08/25 09:57:06 09:57:06 mjames (Mike James) |
||
67 | * Part of Release Aug25_alpha |
||
68 | * |
||
69 | * Revision 1.23 2000/08/16 08:57:23 08:57:23 mjames (Mike James) |
||
70 | * Part of Release CD01_Aug2000 |
||
71 | * |
||
72 | * Revision 1.22 2000/08/14 14:45:05 14:45:05 mjames (Mike James) |
||
73 | * Part of Release Aug_14_2000 |
||
74 | * |
||
75 | * Revision 1.21 2000/08/11 08:30:26 08:30:26 mjames (Mike James) |
||
76 | * Part of Release Aug_11_2000 |
||
77 | * |
||
78 | * Revision 1.20 2000/08/09 10:31:39 10:31:39 mjames (Mike James) |
||
79 | * Part of Release Aug__9_2000 |
||
80 | * |
||
81 | * Revision 1.19 2000/05/31 11:42:44 11:42:44 mjames (Mike James) |
||
82 | * Part of Release May_31_2000 |
||
83 | * |
||
84 | * Revision 1.18 2000/05/31 11:29:15 11:29:15 mjames (Mike James) |
||
85 | * Added acfread.ini file reading |
||
86 | * |
||
87 | * Revision 1.17 2000/05/08 17:01:30 17:01:30 mjames (Mike James) |
||
88 | * Part of Release May__8_2000 |
||
89 | * |
||
90 | * Revision 1.16 2000/05/08 16:59:24 16:59:24 mjames (Mike James) |
||
91 | * Part of Release May__8_2000 |
||
92 | * |
||
93 | * Revision 1.15 2000/05/08 16:57:00 16:57:00 mjames (Mike James) |
||
94 | * Part of Release May__8_2000 |
||
95 | * |
||
96 | * Revision 1.14 2000/03/08 16:17:24 16:17:24 mjames (Mike James) |
||
97 | * Removed syntactically confused 'junk' |
||
98 | * |
||
99 | * Revision 1.11 2000/01/20 15:58:38 15:58:38 mjames (Mike James) |
||
100 | * Part of Release R22 |
||
101 | * |
||
102 | * Revision 1.10 99/12/22 11:15:19 11:15:19 mjames (Mike James) |
||
103 | * Part of Release Dec_22_1999 |
||
104 | * |
||
105 | * Revision 1.9 99/06/25 14:34:26 14:34:26 mjames (Mike James) |
||
106 | * Added in reference to expression.h, but no changes made |
||
107 | * to the function of acfread yet. |
||
108 | * |
||
109 | * Revision 1.8 99/06/18 09:06:34 09:06:34 mjames (Mike James) |
||
110 | * Checkin before major design changes |
||
111 | * |
||
112 | * Revision 1.7 1999/06/14 10:47:18 mjames |
||
113 | * *** empty log message *** |
||
114 | * |
||
115 | * Revision 1.7 1999/06/14 10:47:18 mjames |
||
116 | * *** empty log message *** |
||
117 | * |
||
118 | * Revision 1.6 1999/06/11 14:21:15 mjames |
||
119 | * *** empty log message *** |
||
120 | * |
||
121 | * Revision 1.6 1999/06/11 14:21:15 mjames |
||
122 | * *** empty log message *** |
||
123 | * |
||
124 | * Revision 1.5 99/05/04 09:48:09 09:48:09 mjames (Mike James) |
||
125 | * |
||
126 | * |
||
127 | * Revision 1.3 98/02/11 11:24:57 11:24:57 mjames (Mike James) |
||
128 | * Checked in for version 6.2a |
||
129 | * |
||
130 | * Revision 1.2 97/04/23 08:42:39 08:42:39 mjames (Mike James) |
||
131 | * CHecked in for release rel23041997 |
||
132 | * |
||
133 | * Revision 1.1 97/01/03 13:33:57 13:33:57 mjames (Mike James) |
||
134 | * Initial revision |
||
135 | * |
||
136 | * |
||
137 | */ |
||
138 | /* |
||
139 | @title |
||
140 | PROGRAM cdiread: Converter for .CDI files |
||
141 | @application external |
||
142 | @text |
||
143 | PCB netlist to ACFP converter. Looks for netlists in ASCII containing tags like: |
||
144 | @listing |
||
145 | .ASS |
||
146 | .IMP |
||
147 | .COM |
||
148 | .CSP |
||
149 | .PCB |
||
150 | .CON |
||
151 | .COD |
||
152 | .REM |
||
153 | .EOD |
||
154 | @text |
||
155 | Commonly seen with a '.CDI' file suffix. I think this is one of the random Racal-Zuken output |
||
156 | file types. |
||
157 | @end |
||
158 | */ |
||
159 | #include <stdio.h> |
||
160 | #include <stdlib.h> |
||
161 | #include <string.h> |
||
162 | #if defined HAS_TCL |
||
163 | #include "tcl_l.h" |
||
164 | #endif |
||
165 | #include "cmdlog.h" |
||
166 | #include "cmdparse.h" |
||
167 | #include "database.h" |
||
168 | #include "expression.h" |
||
169 | #include "generic.h" |
||
170 | #include "printout.h" |
||
171 | #include "routing.h" |
||
172 | |||
173 | #ident \ |
||
174 | "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/cdi_src/cdi_main.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $"; |
||
175 | #if defined YYDEBUG |
||
176 | extern int yydebug; |
||
177 | #else |
||
178 | int yydebug = 0; |
||
179 | #endif |
||
180 | extern FILE *yyin; |
||
181 | |||
182 | int main (int argc, char *argv[]) |
||
183 | |||
184 | { |
||
185 | InitialiseData (); |
||
186 | ExecuteString ( |
||
187 | "echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", |
||
188 | argc - 1, |
||
189 | (argv + 1)); |
||
190 | ExecuteString ("do $(VERTICAL_INIT) ", argc - 2, (argv + 2)); |
||
191 | |||
192 | Log (LOG_GENERAL, "# Finished initialisation script\n"); |
||
193 | print_header (stdout, "'cdiread': From .cdi file"); |
||
194 | yydebug = 0; |
||
195 | if (argc > 2 && argv[2][0] == 'd') |
||
196 | yydebug = 1; |
||
197 | if (argc > 1) |
||
198 | yyin = fopen (argv[1], "r"); |
||
199 | else |
||
200 | yyin = stdin; |
||
201 | if (!yyin) |
||
202 | printf ("cannot open input file (%s)\n", argv[1]); |
||
203 | else |
||
204 | while (yyparse () == 0) |
||
205 | ; |
||
206 | |||
207 | perform_routing (Free); |
||
208 | list_database (stdout, 0); /* no jumpers :0= no hierarchy */ |
||
209 | list_devices ( |
||
210 | stdout, |
||
211 | PRINT_TYPE | PRINT_EXPAND_BUS | PRINT_GENERIC | PRINT_GROUP | PRINT_ROUTE_FLAGS | |
||
212 | PRINT_EQUIVALENT_PINS); |
||
213 | } |