Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 11 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * $Header: c:\\cygwin\\cvsroot/Vert03/frb_src/frb_main.c,v 1.1.1.1 2003/11/04 23:34:59 mjames |
2 | * $Header: c:\\cygwin\\cvsroot/Vert03/frb_src/frb_main.c,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $ |
3 | Exp $ |
- | |
4 | * |
3 | * |
5 | * $Log: frb_main.c,v $ |
4 | * $Log: frb_main.c,v $ |
6 | * Revision 1.1.1.1 2003/11/04 23:34:59 mjames |
5 | * Revision 1.1.1.1 2003/11/04 23:34:59 mjames |
7 | * Imported into local repositrory |
6 | * Imported into local repositrory |
8 | * |
7 | * |
Line 46... | Line 45... | ||
46 | * Mike put it here |
45 | * Mike put it here |
47 | * |
46 | * |
48 | * |
47 | * |
49 | * Revision 1.36 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
48 | * Revision 1.36 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
50 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
49 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
51 | * |
50 | * |
52 | * Revision 1.36 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
51 | * Revision 1.36 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
53 | * Part of Release PSAVAT01 |
52 | * Part of Release PSAVAT01 |
54 | * |
53 | * |
55 | * Revision 1.35 2000/10/02 11:04:13 11:04:13 mjames (Mike James) |
54 | * Revision 1.35 2000/10/02 11:04:13 11:04:13 mjames (Mike James) |
56 | * new_vhdl |
55 | * new_vhdl |
57 | * |
56 | * |
58 | 57 | ||
59 | * Revision 1.34 2000/09/27 14:42:13 14:42:13 mjames (Mike James) |
58 | * Revision 1.34 2000/09/27 14:42:13 14:42:13 mjames (Mike James) |
60 | 59 | ||
61 | * Part of Release Sep_27_ST_2000 |
60 | * Part of Release Sep_27_ST_2000 |
62 | 61 | ||
63 | * |
62 | * |
64 | 63 | ||
65 | * Revision 1.33 2000/09/27 10:45:08 10:45:08 mjames (Mike James) |
64 | * Revision 1.33 2000/09/27 10:45:08 10:45:08 mjames (Mike James) |
66 | 65 | ||
67 | * Corrected to use correct return code from yyparse() |
66 | * Corrected to use correct return code from yyparse() |
68 | 67 | ||
69 | * |
68 | * |
70 | 69 | ||
71 | * Revision 1.32 2000/09/21 10:15:43 10:15:43 mjames (Mike James) |
70 | * Revision 1.32 2000/09/21 10:15:43 10:15:43 mjames (Mike James) |
72 | 71 | ||
73 | * Part of Release Sep21Alpha |
72 | * Part of Release Sep21Alpha |
74 | 73 | ||
75 | * |
74 | * |
76 | 75 | ||
77 | * Revision 1.31 2000/08/25 09:57:11 09:57:11 mjames (Mike James) |
76 | * Revision 1.31 2000/08/25 09:57:11 09:57:11 mjames (Mike James) |
78 | 77 | ||
79 | * Part of Release Aug25_alpha |
78 | * Part of Release Aug25_alpha |
80 | 79 | ||
81 | * |
80 | * |
82 | 81 | ||
83 | * Revision 1.30 2000/08/16 08:57:27 08:57:27 mjames (Mike James) |
82 | * Revision 1.30 2000/08/16 08:57:27 08:57:27 mjames (Mike James) |
84 | 83 | ||
85 | * Part of Release CD01_Aug2000 |
84 | * Part of Release CD01_Aug2000 |
86 | 85 | ||
87 | * |
86 | * |
88 | 87 | ||
89 | * Revision 1.29 2000/08/14 14:45:09 14:45:09 mjames (Mike James) |
88 | * Revision 1.29 2000/08/14 14:45:09 14:45:09 mjames (Mike James) |
90 | 89 | ||
91 | * Part of Release Aug_14_2000 |
90 | * Part of Release Aug_14_2000 |
92 | 91 | ||
93 | * |
92 | * |
94 | 93 | ||
95 | * Revision 1.28 2000/08/11 08:30:29 08:30:29 mjames (Mike James) |
94 | * Revision 1.28 2000/08/11 08:30:29 08:30:29 mjames (Mike James) |
96 | 95 | ||
97 | * Part of Release Aug_11_2000 |
96 | * Part of Release Aug_11_2000 |
98 | 97 | ||
99 | * |
98 | * |
100 | 99 | ||
101 | * Revision 1.27 2000/08/09 10:31:43 10:31:43 mjames (Mike James) |
100 | * Revision 1.27 2000/08/09 10:31:43 10:31:43 mjames (Mike James) |
102 | 101 | ||
103 | * Part of Release Aug__9_2000 |
102 | * Part of Release Aug__9_2000 |
104 | 103 | ||
105 | * |
104 | * |
106 | 105 | ||
107 | * Revision 1.26 2000/05/31 11:42:52 11:42:52 mjames (Mike James) |
106 | * Revision 1.26 2000/05/31 11:42:52 11:42:52 mjames (Mike James) |
108 | 107 | ||
109 | * Part of Release May_31_2000 |
108 | * Part of Release May_31_2000 |
110 | 109 | ||
111 | * |
110 | * |
112 | 111 | ||
113 | * Revision 1.25 2000/05/31 11:30:11 11:30:11 mjames (Mike James) |
112 | * Revision 1.25 2000/05/31 11:30:11 11:30:11 mjames (Mike James) |
114 | 113 | ||
115 | * Added acfread.ini file reading |
114 | * Added acfread.ini file reading |
116 | 115 | ||
117 | * |
116 | * |
118 | 117 | ||
119 | * Revision 1.24 2000/05/08 17:01:35 17:01:35 mjames (Mike James) |
118 | * Revision 1.24 2000/05/08 17:01:35 17:01:35 mjames (Mike James) |
120 | 119 | ||
121 | * Part of Release May__8_2000 |
120 | * Part of Release May__8_2000 |
122 | 121 | ||
123 | * |
122 | * |
124 | 123 | ||
125 | * Revision 1.23 2000/05/08 16:59:28 16:59:28 mjames (Mike James) |
124 | * Revision 1.23 2000/05/08 16:59:28 16:59:28 mjames (Mike James) |
126 | 125 | ||
127 | * Part of Release May__8_2000 |
126 | * Part of Release May__8_2000 |
128 | 127 | ||
129 | * |
128 | * |
130 | 129 | ||
131 | * Revision 1.22 2000/05/08 16:57:04 16:57:04 mjames (Mike James) |
130 | * Revision 1.22 2000/05/08 16:57:04 16:57:04 mjames (Mike James) |
132 | 131 | ||
133 | * Part of Release May__8_2000 |
132 | * Part of Release May__8_2000 |
134 | 133 | ||
135 | * |
134 | * |
136 | 135 | ||
137 | * Revision 1.21 2000/03/08 16:19:02 16:19:02 mjames (Mike James) |
136 | * Revision 1.21 2000/03/08 16:19:02 16:19:02 mjames (Mike James) |
138 | 137 | ||
139 | * New version including PC |
138 | * New version including PC |
140 | 139 | ||
141 | * |
140 | * |
142 | 141 | ||
143 | * Revision 1.18 2000/01/20 15:58:44 15:58:44 mjames (Mike James) |
142 | * Revision 1.18 2000/01/20 15:58:44 15:58:44 mjames (Mike James) |
144 | 143 | ||
145 | * Part of Release R22 |
144 | * Part of Release R22 |
146 | 145 | ||
147 | * |
146 | * |
148 | 147 | ||
149 | * Revision 1.17 99/12/22 11:15:24 11:15:24 mjames (Mike James) |
148 | * Revision 1.17 99/12/22 11:15:24 11:15:24 mjames (Mike James) |
150 | 149 | ||
151 | * Part of Release Dec_22_1999 |
150 | * Part of Release Dec_22_1999 |
152 | 151 | ||
153 | * |
152 | * |
154 | 153 | ||
155 | * Revision 1.16 99/06/25 14:35:32 14:35:32 mjames (Mike James) |
154 | * Revision 1.16 99/06/25 14:35:32 14:35:32 mjames (Mike James) |
156 | 155 | ||
157 | * Added in reference to expression.h, but no changes made |
156 | * Added in reference to expression.h, but no changes made |
158 | 157 | ||
159 | * to the function of acfread yet. |
158 | * to the function of acfread yet. |
160 | 159 | ||
161 | * |
160 | * |
162 | 161 | ||
163 | * Revision 1.15 99/05/04 09:51:08 09:51:08 mjames (Mike James) |
162 | * Revision 1.15 99/05/04 09:51:08 09:51:08 mjames (Mike James) |
164 | 163 | ||
165 | * General checkin |
164 | * General checkin |
166 | 165 | ||
167 | * |
166 | * |
168 | 167 | ||
169 | * Revision 1.13 98/02/11 11:26:01 11:26:01 mjames (Mike James) |
168 | * Revision 1.13 98/02/11 11:26:01 11:26:01 mjames (Mike James) |
170 | 169 | ||
171 | * Checked in for version 6.2a |
170 | * Checked in for version 6.2a |
172 | 171 | ||
173 | * |
172 | * |
174 | 173 | ||
175 | * Revision 1.12 97/04/23 08:42:53 08:42:53 mjames (Mike James) |
174 | * Revision 1.12 97/04/23 08:42:53 08:42:53 mjames (Mike James) |
176 | 175 | ||
177 | * CHecked in for release rel23041997 |
176 | * CHecked in for release rel23041997 |
178 | 177 | ||
179 | * |
178 | * |
180 | 179 | ||
181 | * Revision 1.11 97/01/03 13:33:14 13:33:14 mjames (Mike James) |
180 | * Revision 1.11 97/01/03 13:33:14 13:33:14 mjames (Mike James) |
182 | 181 | ||
183 | * Changed the order of printing the banner on startup so that it is before all |
182 | * Changed the order of printing the banner on startup so that it is before all |
184 | 183 | ||
185 | * other output from the tool. |
184 | * other output from the tool. |
186 | 185 | ||
187 | * |
186 | * |
188 | 187 | ||
189 | * Revision 1.10 96/08/06 13:35:32 13:35:32 mjames (Mike James) |
188 | * Revision 1.10 96/08/06 13:35:32 13:35:32 mjames (Mike James) |
190 | 189 | ||
191 | * Changed date of compile |
190 | * Changed date of compile |
192 | 191 | ||
193 | * |
192 | * |
194 | 193 | ||
195 | * Revision 1.9 96/07/19 14:36:33 14:36:33 mjames (Mike James) |
194 | * Revision 1.9 96/07/19 14:36:33 14:36:33 mjames (Mike James) |
196 | 195 | ||
197 | * Amended major revision |
196 | * Amended major revision |
198 | 197 | ||
199 | * |
198 | * |
200 | 199 | ||
201 | * Revision 1.8 1996/07/12 15:52:12 mjames |
200 | * Revision 1.8 1996/07/12 15:52:12 mjames |
202 | 201 | ||
203 | * Sorted out things like Alias and Jumpers |
202 | * Sorted out things like Alias and Jumpers |
204 | 203 | ||
Line 210... | Line 209... | ||
210 | 209 | ||
211 | * Revision 1.7 96/03/29 14:46:09 14:46:09 mjames (Mike James) |
210 | * Revision 1.7 96/03/29 14:46:09 14:46:09 mjames (Mike James) |
212 | 211 | ||
213 | * Added VHDL netlist writing to the capabilities of ACFREAD |
212 | * Added VHDL netlist writing to the capabilities of ACFREAD |
214 | 213 | ||
215 | * |
214 | * |
216 | 215 | ||
217 | * Revision 1.6 96/03/18 13:50:34 13:50:34 mjames (Mike James) |
216 | * Revision 1.6 96/03/18 13:50:34 13:50:34 mjames (Mike James) |
218 | 217 | ||
219 | * Real Revision 2.1 |
218 | * Real Revision 2.1 |
220 | 219 | ||
221 | * |
220 | * |
222 | 221 | ||
223 | * Revision 1.3 96/02/13 09:13:04 09:13:04 mjames (Mike James) |
222 | * Revision 1.3 96/02/13 09:13:04 09:13:04 mjames (Mike James) |
224 | 223 | ||
225 | * Updated to be version 2.0 with net joining |
224 | * Updated to be version 2.0 with net joining |
226 | 225 | ||
227 | * |
226 | * |
228 | 227 | ||
229 | * Revision 1.2 96/02/07 16:01:19 16:01:19 mjames (Mike James) |
228 | * Revision 1.2 96/02/07 16:01:19 16:01:19 mjames (Mike James) |
230 | 229 | ||
231 | * Added correct RCS header |
230 | * Added correct RCS header |
232 | 231 | ||
233 | * |
232 | * |
234 | 233 | ||
235 | * Revision 1.1 96/02/07 15:49:03 15:49:03 mjames (Mike James) |
234 | * Revision 1.1 96/02/07 15:49:03 15:49:03 mjames (Mike James) |
236 | 235 | ||
237 | * Initial revision |
236 | * Initial revision |
238 | 237 | ||
239 | * |
238 | * |
240 | 239 | ||
241 | * Revision 1.5 96/02/07 11:04:14 11:04:14 mjames (Mike James) |
240 | * Revision 1.5 96/02/07 11:04:14 11:04:14 mjames (Mike James) |
242 | 241 | ||
243 | * Checkin before adding new command parsing to program |
242 | * Checkin before adding new command parsing to program |
244 | 243 | ||
245 | * |
244 | * |
246 | 245 | ||
247 | * Revision 1.4 96/01/10 13:12:59 13:12:59 mjames (Mike James) |
246 | * Revision 1.4 96/01/10 13:12:59 13:12:59 mjames (Mike James) |
248 | 247 | ||
249 | * Works in debug mode with EPLD listings and PCB layout |
248 | * Works in debug mode with EPLD listings and PCB layout |
250 | 249 | ||
251 | * |
250 | * |
252 | 251 | ||
253 | * Revision 1.3 96/01/08 15:23:13 15:23:13 mjames (Mike James) |
252 | * Revision 1.3 96/01/08 15:23:13 15:23:13 mjames (Mike James) |
254 | 253 | ||
255 | * Managing to make sense of things now |
254 | * Managing to make sense of things now |
256 | 255 | ||
257 | * |
256 | * |
258 | 257 | ||
259 | * Revision 1.2 96/01/07 20:23:01 Mike_James |
258 | * Revision 1.2 96/01/07 20:23:01 Mike_James |
260 | 259 | ||
261 | * |
260 | * |
262 | 261 | ||
263 | * Revision 1.1 96/01/07 12:38:41 Mike_James |
262 | * Revision 1.1 96/01/07 12:38:41 Mike_James |
264 | 263 | ||
265 | * Initial revision |
264 | * Initial revision |
266 | 265 | ||
Line 284... | Line 283... | ||
284 | PROGRAM frbread: Converter for .FRB files |
283 | PROGRAM frbread: Converter for .FRB files |
285 | @application external |
284 | @application external |
286 | @text |
285 | @text |
287 | PCB netlist to ACFP converter. Looks for netlists in ASCII containing tags like: |
286 | PCB netlist to ACFP converter. Looks for netlists in ASCII containing tags like: |
288 | @listing |
287 | @listing |
289 | .HEA |
288 | .HEA |
290 | .END |
289 | .END |
291 | .TIM |
290 | .TIM |
292 | .UNI |
291 | .UNI |
293 | .JOB |
292 | .JOB |
294 | .TYP |
293 | .TYP |
295 | .APP |
294 | .APP |
296 | .ADD_COM |
295 | .ADD_COM |
297 | .ADD_TER |
296 | .ADD_TER |
298 | .ATT_COM |
297 | .ATT_COM |
299 | .ATT_TRE |
298 | .ATT_TRE |
300 | .TER |
299 | .TER |
301 | @text |
300 | @text |
302 | Commonly seen with a '.FRB' file suffix or '.CDI' file suffix. |
301 | Commonly seen with a '.FRB' file suffix or '.CDI' file suffix. |
303 | More common Racal-Zuken CadStar |
302 | More common Racal-Zuken CadStar |
304 | file format. |
303 | file format. |
305 | One of several file formats the Southampton |
304 | One of several file formats the Southampton |
306 | Drawing office is likely to hand out. See also PROGRAM repread and PROGRAM rep2read. |
305 | Drawing office is likely to hand out. See also PROGRAM repread and PROGRAM rep2read. |
307 | 306 | ||
308 | @break |
307 | @break |
309 | Invocation |
308 | Invocation |
310 | @listing |
309 | @listing |
311 | frbread <frb_file> [d] |
310 | frbread <frb_file> [d] |
312 | @text |
311 | @text |
313 | The frb file name is the first argument, the third argument is a debug flag. |
312 | The frb file name is the first argument, the third argument is a debug flag. |
314 | If a lower |
313 | If a lower |
315 | case 'd' is present, the Bison parser (interpreter of keywords and syntax) prints extremely |
314 | case 'd' is present, the Bison parser (interpreter of keywords and syntax) prints extremely verbose diagnostics. |
316 | verbose diagnostics. |
- | |
317 | @break |
315 | @break |
318 | Normally the acfp file produced on standard output is redirected to a file e.g. |
316 | Normally the acfp file produced on standard output is redirected to a file e.g. |
319 | @listing |
317 | @listing |
320 | frbread file.frb > file.acfp |
318 | frbread file.frb > file.acfp |
321 | @text |
319 | @text |
322 | Will produce file.acfp from file.frb. |
320 | Will produce file.acfp from file.frb. |
323 | @break |
321 | @break |
324 | Following this it is necessary to run the output through Vertical again in order to |
322 | Following this it is necessary to run the output through Vertical again in order to |
325 | set up properties on nets (power and ground being made not routable for instance) using the |
323 | set up properties on nets (power and ground being made not routable for instance) using the |
326 | del routable command. Alternatively the acfp file can be edited to set the net routing flags |
324 | del routable command. Alternatively the acfp file can be edited to set the net routing flags for these nets. |
327 | for these nets. |
- | |
328 | @end |
325 | @end |
329 | */ |
326 | */ |
330 | 327 | ||
331 | #include <stdio.h> |
328 | #include <stdio.h> |
332 | #include <stdlib.h> |
- | |
333 | #include <string.h> |
329 | #include <string.h> |
- | 330 | #include <stdlib.h> |
|
334 | #if defined HAS_TCL |
331 | #if defined HAS_TCL |
335 | #include "tcl_l.h" |
332 | #include "tcl_l.h" |
336 | #endif |
333 | #endif |
337 | #include "cmdlog.h" |
- | |
338 | #include "cmdparse.h" |
- | |
339 | #include "database.h" |
- | |
340 | #include "expression.h" |
334 | #include "expression.h" |
341 | #include "generic.h" |
335 | #include "generic.h" |
- | 336 | #include "database.h" |
|
342 | #include "printout.h" |
337 | #include "printout.h" |
343 | #include "routing.h" |
338 | #include "routing.h" |
- | 339 | #include "cmdparse.h" |
|
- | 340 | #include "cmdlog.h" |
|
- | 341 | #include "yacc_common.h" |
|
- | 342 | ||
- | 343 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/frb_src/frb_main.c,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $" |
|
- | 344 | ||
- | 345 | int main(int argc , char * argv[]) |
|
- | 346 | ||
- | 347 | { |
|
- | 348 | ||
- | 349 | InitialiseData(); |
|
- | 350 | ExecuteString("echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", argc-1, (argv+1)); |
|
- | 351 | ExecuteString("do $(VERTICAL_INIT) ", argc-2, (argv+2)); |
|
- | 352 | Log(LOG_GENERAL, |
|
- | 353 | "# Finished initialisation script\n"); |
|
- | 354 | print_header(stdout,"'frbread': From Drawing Office file"); |
|
- | 355 | yydebug = 0; |
|
- | 356 | if (argc>2 && argv[2][0]=='d') |
|
- | 357 | yydebug = 1; |
|
- | 358 | if (argc>1) |
|
- | 359 | yyin = fopen(argv[1],"r"); |
|
- | 360 | else |
|
- | 361 | yyin = stdin; |
|
- | 362 | if(!yyin) |
|
- | 363 | printf("cannot open input file (%s)\n",argv[1]); |
|
- | 364 | else |
|
- | 365 | while(yyparse()==0); |
|
- | 366 | perform_routing(Free); |
|
- | 367 | ||
- | 368 | list_database(stdout,0); /* no jumpers 0= do not flatten them */ |
|
- | 369 | list_devices(stdout, |
|
- | 370 | PRINT_TYPE|PRINT_EXPAND_BUS| |
|
- | 371 | PRINT_GENERIC|PRINT_GROUP| |
|
- | 372 | PRINT_ROUTE_FLAGS | PRINT_EQUIVALENT_PINS); |
|
- | 373 | } |
|
344 | 374 | ||
345 | #ident \ |
- | |
346 | "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/frb_src/frb_main.c,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $"; |
- | |
347 | - | ||
348 | #if defined YYDEBUG |
- | |
349 | extern int yydebug; |
- | |
350 | #else |
- | |
351 | int yydebug = 0; |
- | |
352 | #endif |
- | |
353 | - | ||
354 | extern FILE *yyin; |
- | |
355 | 375 | ||
356 | int main (int argc, char *argv[]) |
- | |
357 | 376 | ||
358 | { |
- | |
359 | InitialiseData (); |
- | |
360 | ExecuteString ( |
- | |
361 | "echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", |
- | |
362 | argc - 1, |
- | |
363 | (argv + 1)); |
- | |
364 | ExecuteString ("do $(VERTICAL_INIT) ", argc - 2, (argv + 2)); |
- | |
365 | Log (LOG_GENERAL, "# Finished initialisation script\n"); |
- | |
366 | print_header (stdout, "'frbread': From Drawing Office file"); |
- | |
367 | yydebug = 0; |
- | |
368 | if (argc > 2 && argv[2][0] == 'd') |
- | |
369 | yydebug = 1; |
- | |
370 | if (argc > 1) |
- | |
371 | yyin = fopen (argv[1], "r"); |
- | |
372 | else |
- | |
373 | yyin = stdin; |
- | |
374 | if (!yyin) |
- | |
375 | printf ("cannot open input file (%s)\n", argv[1]); |
- | |
376 | else |
- | |
377 | while (yyparse () == 0) |
- | |
378 | ; |
- | |
379 | perform_routing (Free); |
- | |
380 | - | ||
381 | list_database (stdout, 0); /* no jumpers 0= do not flatten them */ |
- | |
382 | list_devices ( |
- | |
383 | stdout, |
- | |
384 | PRINT_TYPE | PRINT_EXPAND_BUS | PRINT_GENERIC | PRINT_GROUP | PRINT_ROUTE_FLAGS | |
- | |
385 | PRINT_EQUIVALENT_PINS); |
- | |
386 | } |
- |