Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | /* |
| 2 | * $Header: c:\\cygwin\\cvsroot/Vert03/frb_src/frb_main.c,v 1.1.1.1 2003/11/04 23:34:59 mjames |
||
| 3 | Exp $ |
||
| 4 | * |
||
| 5 | * $Log: frb_main.c,v $ |
||
| 6 | * Revision 1.1.1.1 2003/11/04 23:34:59 mjames |
||
| 7 | * Imported into local repositrory |
||
| 8 | * |
||
| 9 | * Revision 1.10 2002/09/09 10:36:19 mjames |
||
| 10 | * Checkpoint checkin |
||
| 11 | * |
||
| 12 | * Revision 1.9 2002/08/14 12:11:31 mjames |
||
| 13 | * Added an 'external' tag to the documentation |
||
| 14 | * |
||
| 15 | * Revision 1.9 2002/04/04 14:53:06 mjames |
||
| 16 | * Added mentor board station reader to the portfolio |
||
| 17 | * |
||
| 18 | * Revision 1.8 2001/10/31 22:20:05 mjames |
||
| 19 | * Tidying up problematical comments caused by CVS |
||
| 20 | * 'intelligent' comment guessing |
||
| 21 | * |
||
| 22 | * Revision 1.7 2001/10/22 11:00:15 mjames |
||
| 23 | * Modified list_devices to take an options flag |
||
| 24 | * |
||
| 25 | * Revision 1.6 2001/10/02 20:53:47 mjames |
||
| 26 | * Moved documentation about code to main program module. |
||
| 27 | * |
||
| 28 | * Revision 1.5 2001/09/28 14:34:12 mjames |
||
| 29 | * FIxed yydebug variable to exist when YYDEBUG macro |
||
| 30 | * is not defined. Otherwise linker error will be reported. |
||
| 31 | * |
||
| 32 | * Revision 1.4 2001/07/09 15:47:35 mjames |
||
| 33 | * Placed the version string in an independent file to save time on building |
||
| 34 | * all of the variants of Vertical |
||
| 35 | * |
||
| 36 | * Revision 1.3 2001/06/06 12:10:22 mjames |
||
| 37 | * Move from HPUX |
||
| 38 | * |
||
| 39 | * Revision 1.2 2000/12/04 13:14:02 mjames |
||
| 40 | * Imported all of the PCB syntax readers. |
||
| 41 | * |
||
| 42 | * Converted "a/b" to mean "a" divided by "b" insted of a single string |
||
| 43 | * "a/b" in Verilog |
||
| 44 | * |
||
| 45 | * Revision 1.1.1.1 2000/10/19 21:58:38 mjames |
||
| 46 | * Mike put it here |
||
| 47 | * |
||
| 48 | * |
||
| 49 | * Revision 1.36 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
||
| 50 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
||
| 51 | * |
||
| 52 | * Revision 1.36 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
||
| 53 | * Part of Release PSAVAT01 |
||
| 54 | * |
||
| 55 | * Revision 1.35 2000/10/02 11:04:13 11:04:13 mjames (Mike James) |
||
| 56 | * new_vhdl |
||
| 57 | * |
||
| 58 | |||
| 59 | * Revision 1.34 2000/09/27 14:42:13 14:42:13 mjames (Mike James) |
||
| 60 | |||
| 61 | * Part of Release Sep_27_ST_2000 |
||
| 62 | |||
| 63 | * |
||
| 64 | |||
| 65 | * Revision 1.33 2000/09/27 10:45:08 10:45:08 mjames (Mike James) |
||
| 66 | |||
| 67 | * Corrected to use correct return code from yyparse() |
||
| 68 | |||
| 69 | * |
||
| 70 | |||
| 71 | * Revision 1.32 2000/09/21 10:15:43 10:15:43 mjames (Mike James) |
||
| 72 | |||
| 73 | * Part of Release Sep21Alpha |
||
| 74 | |||
| 75 | * |
||
| 76 | |||
| 77 | * Revision 1.31 2000/08/25 09:57:11 09:57:11 mjames (Mike James) |
||
| 78 | |||
| 79 | * Part of Release Aug25_alpha |
||
| 80 | |||
| 81 | * |
||
| 82 | |||
| 83 | * Revision 1.30 2000/08/16 08:57:27 08:57:27 mjames (Mike James) |
||
| 84 | |||
| 85 | * Part of Release CD01_Aug2000 |
||
| 86 | |||
| 87 | * |
||
| 88 | |||
| 89 | * Revision 1.29 2000/08/14 14:45:09 14:45:09 mjames (Mike James) |
||
| 90 | |||
| 91 | * Part of Release Aug_14_2000 |
||
| 92 | |||
| 93 | * |
||
| 94 | |||
| 95 | * Revision 1.28 2000/08/11 08:30:29 08:30:29 mjames (Mike James) |
||
| 96 | |||
| 97 | * Part of Release Aug_11_2000 |
||
| 98 | |||
| 99 | * |
||
| 100 | |||
| 101 | * Revision 1.27 2000/08/09 10:31:43 10:31:43 mjames (Mike James) |
||
| 102 | |||
| 103 | * Part of Release Aug__9_2000 |
||
| 104 | |||
| 105 | * |
||
| 106 | |||
| 107 | * Revision 1.26 2000/05/31 11:42:52 11:42:52 mjames (Mike James) |
||
| 108 | |||
| 109 | * Part of Release May_31_2000 |
||
| 110 | |||
| 111 | * |
||
| 112 | |||
| 113 | * Revision 1.25 2000/05/31 11:30:11 11:30:11 mjames (Mike James) |
||
| 114 | |||
| 115 | * Added acfread.ini file reading |
||
| 116 | |||
| 117 | * |
||
| 118 | |||
| 119 | * Revision 1.24 2000/05/08 17:01:35 17:01:35 mjames (Mike James) |
||
| 120 | |||
| 121 | * Part of Release May__8_2000 |
||
| 122 | |||
| 123 | * |
||
| 124 | |||
| 125 | * Revision 1.23 2000/05/08 16:59:28 16:59:28 mjames (Mike James) |
||
| 126 | |||
| 127 | * Part of Release May__8_2000 |
||
| 128 | |||
| 129 | * |
||
| 130 | |||
| 131 | * Revision 1.22 2000/05/08 16:57:04 16:57:04 mjames (Mike James) |
||
| 132 | |||
| 133 | * Part of Release May__8_2000 |
||
| 134 | |||
| 135 | * |
||
| 136 | |||
| 137 | * Revision 1.21 2000/03/08 16:19:02 16:19:02 mjames (Mike James) |
||
| 138 | |||
| 139 | * New version including PC |
||
| 140 | |||
| 141 | * |
||
| 142 | |||
| 143 | * Revision 1.18 2000/01/20 15:58:44 15:58:44 mjames (Mike James) |
||
| 144 | |||
| 145 | * Part of Release R22 |
||
| 146 | |||
| 147 | * |
||
| 148 | |||
| 149 | * Revision 1.17 99/12/22 11:15:24 11:15:24 mjames (Mike James) |
||
| 150 | |||
| 151 | * Part of Release Dec_22_1999 |
||
| 152 | |||
| 153 | * |
||
| 154 | |||
| 155 | * Revision 1.16 99/06/25 14:35:32 14:35:32 mjames (Mike James) |
||
| 156 | |||
| 157 | * Added in reference to expression.h, but no changes made |
||
| 158 | |||
| 159 | * to the function of acfread yet. |
||
| 160 | |||
| 161 | * |
||
| 162 | |||
| 163 | * Revision 1.15 99/05/04 09:51:08 09:51:08 mjames (Mike James) |
||
| 164 | |||
| 165 | * General checkin |
||
| 166 | |||
| 167 | * |
||
| 168 | |||
| 169 | * Revision 1.13 98/02/11 11:26:01 11:26:01 mjames (Mike James) |
||
| 170 | |||
| 171 | * Checked in for version 6.2a |
||
| 172 | |||
| 173 | * |
||
| 174 | |||
| 175 | * Revision 1.12 97/04/23 08:42:53 08:42:53 mjames (Mike James) |
||
| 176 | |||
| 177 | * CHecked in for release rel23041997 |
||
| 178 | |||
| 179 | * |
||
| 180 | |||
| 181 | * Revision 1.11 97/01/03 13:33:14 13:33:14 mjames (Mike James) |
||
| 182 | |||
| 183 | * Changed the order of printing the banner on startup so that it is before all |
||
| 184 | |||
| 185 | * other output from the tool. |
||
| 186 | |||
| 187 | * |
||
| 188 | |||
| 189 | * Revision 1.10 96/08/06 13:35:32 13:35:32 mjames (Mike James) |
||
| 190 | |||
| 191 | * Changed date of compile |
||
| 192 | |||
| 193 | * |
||
| 194 | |||
| 195 | * Revision 1.9 96/07/19 14:36:33 14:36:33 mjames (Mike James) |
||
| 196 | |||
| 197 | * Amended major revision |
||
| 198 | |||
| 199 | * |
||
| 200 | |||
| 201 | * Revision 1.8 1996/07/12 15:52:12 mjames |
||
| 202 | |||
| 203 | * Sorted out things like Alias and Jumpers |
||
| 204 | |||
| 205 | * Work Correctly |
||
| 206 | |||
| 207 | * Print COrrectly |
||
| 208 | |||
| 209 | * |
||
| 210 | |||
| 211 | * Revision 1.7 96/03/29 14:46:09 14:46:09 mjames (Mike James) |
||
| 212 | |||
| 213 | * Added VHDL netlist writing to the capabilities of ACFREAD |
||
| 214 | |||
| 215 | * |
||
| 216 | |||
| 217 | * Revision 1.6 96/03/18 13:50:34 13:50:34 mjames (Mike James) |
||
| 218 | |||
| 219 | * Real Revision 2.1 |
||
| 220 | |||
| 221 | * |
||
| 222 | |||
| 223 | * Revision 1.3 96/02/13 09:13:04 09:13:04 mjames (Mike James) |
||
| 224 | |||
| 225 | * Updated to be version 2.0 with net joining |
||
| 226 | |||
| 227 | * |
||
| 228 | |||
| 229 | * Revision 1.2 96/02/07 16:01:19 16:01:19 mjames (Mike James) |
||
| 230 | |||
| 231 | * Added correct RCS header |
||
| 232 | |||
| 233 | * |
||
| 234 | |||
| 235 | * Revision 1.1 96/02/07 15:49:03 15:49:03 mjames (Mike James) |
||
| 236 | |||
| 237 | * Initial revision |
||
| 238 | |||
| 239 | * |
||
| 240 | |||
| 241 | * Revision 1.5 96/02/07 11:04:14 11:04:14 mjames (Mike James) |
||
| 242 | |||
| 243 | * Checkin before adding new command parsing to program |
||
| 244 | |||
| 245 | * |
||
| 246 | |||
| 247 | * Revision 1.4 96/01/10 13:12:59 13:12:59 mjames (Mike James) |
||
| 248 | |||
| 249 | * Works in debug mode with EPLD listings and PCB layout |
||
| 250 | |||
| 251 | * |
||
| 252 | |||
| 253 | * Revision 1.3 96/01/08 15:23:13 15:23:13 mjames (Mike James) |
||
| 254 | |||
| 255 | * Managing to make sense of things now |
||
| 256 | |||
| 257 | * |
||
| 258 | |||
| 259 | * Revision 1.2 96/01/07 20:23:01 Mike_James |
||
| 260 | |||
| 261 | * |
||
| 262 | |||
| 263 | * Revision 1.1 96/01/07 12:38:41 Mike_James |
||
| 264 | |||
| 265 | * Initial revision |
||
| 266 | |||
| 267 | * |
||
| 268 | |||
| 269 | * Revision 1.2 96/01/04 17:54:41 17:54:41 mjames (Mike James) |
||
| 270 | |||
| 271 | * Altered to conditionally debug |
||
| 272 | |||
| 273 | * |
||
| 274 | |||
| 275 | * Revision 1.1 96/01/04 10:17:57 10:17:57 mjames (Mike James) |
||
| 276 | |||
| 277 | * Initial revision |
||
| 278 | |||
| 279 | * |
||
| 280 | |||
| 281 | */ |
||
| 282 | /* |
||
| 283 | @title |
||
| 284 | PROGRAM frbread: Converter for .FRB files |
||
| 285 | @application external |
||
| 286 | @text |
||
| 287 | PCB netlist to ACFP converter. Looks for netlists in ASCII containing tags like: |
||
| 288 | @listing |
||
| 289 | .HEA |
||
| 290 | .END |
||
| 291 | .TIM |
||
| 292 | .UNI |
||
| 293 | .JOB |
||
| 294 | .TYP |
||
| 295 | .APP |
||
| 296 | .ADD_COM |
||
| 297 | .ADD_TER |
||
| 298 | .ATT_COM |
||
| 299 | .ATT_TRE |
||
| 300 | .TER |
||
| 301 | @text |
||
| 302 | Commonly seen with a '.FRB' file suffix or '.CDI' file suffix. |
||
| 303 | More common Racal-Zuken CadStar |
||
| 304 | file format. |
||
| 305 | One of several file formats the Southampton |
||
| 306 | Drawing office is likely to hand out. See also PROGRAM repread and PROGRAM rep2read. |
||
| 307 | |||
| 308 | @break |
||
| 309 | Invocation |
||
| 310 | @listing |
||
| 311 | frbread <frb_file> [d] |
||
| 312 | @text |
||
| 313 | The frb file name is the first argument, the third argument is a debug flag. |
||
| 314 | If a lower |
||
| 315 | case 'd' is present, the Bison parser (interpreter of keywords and syntax) prints extremely |
||
| 316 | verbose diagnostics. |
||
| 317 | @break |
||
| 318 | Normally the acfp file produced on standard output is redirected to a file e.g. |
||
| 319 | @listing |
||
| 320 | frbread file.frb > file.acfp |
||
| 321 | @text |
||
| 322 | Will produce file.acfp from file.frb. |
||
| 323 | @break |
||
| 324 | 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 |
||
| 326 | del routable command. Alternatively the acfp file can be edited to set the net routing flags |
||
| 327 | for these nets. |
||
| 328 | @end |
||
| 329 | */ |
||
| 330 | |||
| 331 | #include <stdio.h> |
||
| 332 | #include <stdlib.h> |
||
| 333 | #include <string.h> |
||
| 334 | #if defined HAS_TCL |
||
| 335 | #include "tcl_l.h" |
||
| 336 | #endif |
||
| 337 | #include "cmdlog.h" |
||
| 338 | #include "cmdparse.h" |
||
| 339 | #include "database.h" |
||
| 340 | #include "expression.h" |
||
| 341 | #include "generic.h" |
||
| 342 | #include "printout.h" |
||
| 343 | #include "routing.h" |
||
| 344 | |||
| 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 | |||
| 356 | int main (int argc, char *argv[]) |
||
| 357 | |||
| 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 | } |