Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | mjames | 1 | /* net_main*/ |
| 2 | |||
| 3 | /* contains the database functions that store the pin configurations */ |
||
| 4 | |||
| 5 | /* |
||
| 11 | mjames | 6 | * $Header: c:\\cygwin\\cvsroot/Vert03/net_src/net_main.c,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $ |
| 2 | mjames | 7 | * |
| 8 | * $Log: net_main.c,v $ |
||
| 9 | * Revision 1.1.1.1 2003/11/04 23:34:59 mjames |
||
| 10 | * Imported into local repositrory |
||
| 11 | * |
||
| 12 | * Revision 1.10 2002/09/09 10:36:20 mjames |
||
| 13 | * Checkpoint checkin |
||
| 14 | * |
||
| 15 | * Revision 1.9 2002/08/14 12:08:43 mjames |
||
| 16 | * Added an 'external' tag to the documentation |
||
| 17 | * |
||
| 18 | * Revision 1.9 2002/04/04 15:04:27 mjames |
||
| 19 | * Fixed #ident problem |
||
| 20 | * |
||
| 21 | * Revision 1.8 2001/10/31 22:20:09 mjames |
||
| 22 | * Tidying up problematical comments caused by CVS |
||
| 23 | * 'intelligent' comment guessing |
||
| 24 | * |
||
| 25 | * Revision 1.7 2001/10/22 10:59:03 mjames |
||
| 26 | * Modified list_devices to take an options flag |
||
| 27 | * |
||
| 28 | * Revision 1.6 2001/10/02 20:53:28 mjames |
||
| 29 | * Moved documentation about code to main program module. |
||
| 30 | * |
||
| 31 | * Revision 1.5 2001/09/28 14:34:11 mjames |
||
| 32 | * FIxed yydebug variable to exist when YYDEBUG macro |
||
| 33 | * is not defined. Otherwise linker error will be reported. |
||
| 34 | * |
||
| 35 | * Revision 1.4 2001/07/09 15:47:36 mjames |
||
| 36 | * Placed the version string in an independent file to save time on building |
||
| 37 | * all of the variants of Vertical |
||
| 38 | * |
||
| 39 | * Revision 1.3 2001/06/06 12:10:20 mjames |
||
| 40 | * Move from HPUX |
||
| 41 | * |
||
| 42 | * Revision 1.2 2000/12/04 13:14:03 mjames |
||
| 43 | * Imported all of the PCB syntax readers. |
||
| 44 | * |
||
| 45 | * Converted "a/b" to mean "a" divided by "b" insted of a single string |
||
| 46 | * "a/b" in Verilog |
||
| 47 | * |
||
| 48 | * Revision 1.1.1.1 2000/10/19 21:58:38 mjames |
||
| 49 | * Mike put it here |
||
| 50 | * |
||
| 51 | * |
||
| 52 | * Revision 1.26 2000/10/04 10:37:07 10:37:07 mjames (Mike James) |
||
| 53 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
||
| 11 | mjames | 54 | * |
| 2 | mjames | 55 | * Revision 1.26 2000/10/04 10:37:07 10:37:07 mjames (Mike James) |
| 56 | * Part of Release PSAVAT01 |
||
| 11 | mjames | 57 | * |
| 2 | mjames | 58 | * Revision 1.25 2000/10/02 11:04:16 11:04:16 mjames (Mike James) |
| 59 | * new_vhdl |
||
| 11 | mjames | 60 | * |
| 2 | mjames | 61 | * Revision 1.24 2000/09/27 14:42:17 14:42:17 mjames (Mike James) |
| 62 | * Part of Release Sep_27_ST_2000 |
||
| 11 | mjames | 63 | * |
| 2 | mjames | 64 | * Revision 1.23 2000/09/27 10:57:51 10:57:51 mjames (Mike James) |
| 65 | * Using correct return code from yyparse() |
||
| 11 | mjames | 66 | * |
| 2 | mjames | 67 | * Revision 1.22 2000/09/21 10:15:47 10:15:47 mjames (Mike James) |
| 68 | * Part of Release Sep21Alpha |
||
| 11 | mjames | 69 | * |
| 2 | mjames | 70 | * Revision 1.21 2000/08/25 09:57:13 09:57:13 mjames (Mike James) |
| 71 | * Part of Release Aug25_alpha |
||
| 11 | mjames | 72 | * |
| 2 | mjames | 73 | * Revision 1.20 2000/08/16 08:57:29 08:57:29 mjames (Mike James) |
| 74 | * Part of Release CD01_Aug2000 |
||
| 11 | mjames | 75 | * |
| 2 | mjames | 76 | * Revision 1.19 2000/08/14 14:45:10 14:45:10 mjames (Mike James) |
| 77 | * Part of Release Aug_14_2000 |
||
| 11 | mjames | 78 | * |
| 2 | mjames | 79 | * Revision 1.18 2000/08/11 08:30:31 08:30:31 mjames (Mike James) |
| 80 | * Part of Release Aug_11_2000 |
||
| 11 | mjames | 81 | * |
| 2 | mjames | 82 | * Revision 1.17 2000/08/09 10:31:46 10:31:46 mjames (Mike James) |
| 83 | * Part of Release Aug__9_2000 |
||
| 11 | mjames | 84 | * |
| 2 | mjames | 85 | * Revision 1.16 2000/05/31 11:42:55 11:42:55 mjames (Mike James) |
| 86 | * Part of Release May_31_2000 |
||
| 11 | mjames | 87 | * |
| 2 | mjames | 88 | * Revision 1.15 2000/05/31 11:30:16 11:30:16 mjames (Mike James) |
| 89 | * Added acfread.ini file reading |
||
| 11 | mjames | 90 | * |
| 2 | mjames | 91 | * Revision 1.14 2000/05/08 17:01:36 17:01:36 mjames (Mike James) |
| 92 | * Part of Release May__8_2000 |
||
| 11 | mjames | 93 | * |
| 2 | mjames | 94 | * Revision 1.13 2000/05/08 16:59:30 16:59:30 mjames (Mike James) |
| 95 | * Part of Release May__8_2000 |
||
| 11 | mjames | 96 | * |
| 2 | mjames | 97 | * Revision 1.12 2000/05/08 16:57:06 16:57:06 mjames (Mike James) |
| 98 | * Part of Release May__8_2000 |
||
| 11 | mjames | 99 | * |
| 2 | mjames | 100 | * Revision 1.11 2000/03/08 16:19:17 16:19:17 mjames (Mike James) |
| 101 | * New version including PC |
||
| 11 | mjames | 102 | * |
| 2 | mjames | 103 | * Revision 1.8 2000/01/20 15:58:46 15:58:46 mjames (Mike James) |
| 104 | * Part of Release R22 |
||
| 11 | mjames | 105 | * |
| 2 | mjames | 106 | * Revision 1.7 99/12/22 11:15:27 11:15:27 mjames (Mike James) |
| 107 | * Part of Release Dec_22_1999 |
||
| 11 | mjames | 108 | * |
| 2 | mjames | 109 | * Revision 1.6 99/06/25 14:35:44 14:35:44 mjames (Mike James) |
| 11 | mjames | 110 | * Added in reference to expression.h, but no changes made |
| 2 | mjames | 111 | * to the function of acfread yet. |
| 11 | mjames | 112 | * |
| 2 | mjames | 113 | * Revision 1.5 99/05/04 09:52:29 09:52:29 mjames (Mike James) |
| 114 | * General checkin |
||
| 11 | mjames | 115 | * |
| 2 | mjames | 116 | * Revision 1.3 98/02/11 11:26:44 11:26:44 mjames (Mike James) |
| 117 | * Checked in for version 6.2a |
||
| 11 | mjames | 118 | * |
| 2 | mjames | 119 | * Revision 1.2 97/04/23 08:43:16 08:43:16 mjames (Mike James) |
| 120 | * CHecked in for release rel23041997 |
||
| 11 | mjames | 121 | * |
| 2 | mjames | 122 | * Revision 1.1 97/01/03 13:32:40 13:32:40 mjames (Mike James) |
| 123 | * Initial revision |
||
| 11 | mjames | 124 | * |
| 2 | mjames | 125 | * |
| 11 | mjames | 126 | */ |
| 2 | mjames | 127 | #include <stdio.h> |
| 11 | mjames | 128 | #include <string.h> |
| 2 | mjames | 129 | #include <stdlib.h> |
| 130 | /* |
||
| 131 | @title |
||
| 132 | PROGRAM netread: Converter for .NET files |
||
| 133 | @application external |
||
| 134 | @text |
||
| 135 | PCB netlist to ACFP converter. Looks for netlists in ASCII containing tags like: |
||
| 136 | @listing |
||
| 137 | $PACKAGES |
||
| 11 | mjames | 138 | $NETS |
| 139 | $END |
||
| 2 | mjames | 140 | @text |
| 141 | Invocation |
||
| 11 | mjames | 142 | @listing |
| 2 | mjames | 143 | netread <net_file> [ d ] |
| 144 | @text |
||
| 11 | mjames | 145 | If a lower |
| 146 | case 'd' is present as the second argument, the Bison parser |
||
| 2 | mjames | 147 | (interpreter of keywords and syntax) prints extremely verbose diagnostics. |
| 148 | @break |
||
| 149 | Normally the acfp file produced on standard output is redirected to a file e.g. |
||
| 150 | @listing |
||
| 151 | netread file.net > file.acfp |
||
| 152 | @text |
||
| 153 | Will produce file.acfp from file.net. |
||
| 154 | @break |
||
| 155 | Following this it is necessary to run the output through Vertical again in order to |
||
| 11 | mjames | 156 | set up properties on nets (power and ground being made not routable for instance) using the |
| 2 | mjames | 157 | delete routable command. Alternatively the acfp file can be edited to set the net routing |
| 158 | flags for these nets. |
||
| 159 | @break |
||
| 160 | Netlist is commonly seen with a '.NET' file suffix. Lots of exclamation marks '!' in the |
||
| 161 | netlist file.I believe this format comes from Mentor Graphics. |
||
| 162 | @end |
||
| 163 | */ |
||
| 164 | |||
| 165 | #if defined HAS_TCL |
||
| 166 | #include "tcl_l.h" |
||
| 167 | #endif |
||
| 168 | #include "expression.h" |
||
| 169 | #include "generic.h" |
||
| 11 | mjames | 170 | #include "database.h" |
| 2 | mjames | 171 | #include "printout.h" |
| 172 | #include "routing.h" |
||
| 11 | mjames | 173 | #include "cmdparse.h" |
| 174 | #include "cmdlog.h" |
||
| 175 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/net_src/net_main.c,v 1.1.1.1 2003/11/04 23:34:59 mjames Exp $" |
||
| 2 | mjames | 176 | #if defined YYDEBUG |
| 177 | extern int yydebug; |
||
| 178 | #else |
||
| 179 | int yydebug = 0; |
||
| 180 | #endif |
||
| 11 | mjames | 181 | extern FILE * yyin; |
| 182 | int main(int argc , char * argv[]) |
||
| 183 | { |
||
| 184 | InitialiseData(); |
||
| 185 | ExecuteString("echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", argc-1, (argv+1)); |
||
| 186 | ExecuteString("do $(VERTICAL_INIT) ", argc-2, (argv+2)); |
||
| 187 | Log(LOG_GENERAL, |
||
| 188 | "# Finished initialisation script\n"); |
||
| 189 | print_header(stdout,"'netread': From .net file"); |
||
| 190 | yydebug = 0; |
||
| 2 | mjames | 191 | |
| 11 | mjames | 192 | if (argc>2 && argv[2][0]=='d') |
| 193 | yydebug = 1; |
||
| 2 | mjames | 194 | |
| 11 | mjames | 195 | if (argc>1) |
| 196 | yyin = fopen(argv[1],"r"); |
||
| 197 | else |
||
| 198 | yyin = stdin; |
||
| 199 | if(!yyin) |
||
| 200 | printf("cannot open input file (%s)\n",argv[1]); |
||
| 201 | else |
||
| 202 | while(yyparse()==0); |
||
| 2 | mjames | 203 | |
| 11 | mjames | 204 | perform_routing(Free); |
| 205 | list_database(stdout,0); /*no jumpers so flatten jumpers arg=0 */ |
||
| 206 | list_devices(stdout, |
||
| 207 | PRINT_TYPE|PRINT_EXPAND_BUS| |
||
| 208 | PRINT_GENERIC|PRINT_GROUP| |
||
| 209 | PRINT_ROUTE_FLAGS | PRINT_EQUIVALENT_PINS); |
||
| 210 | } |
||
| 211 | |||
| 212 | |||
| 213 |