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