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/gen_src/gen_main.c,v 1.1.1.1 2003/11/04 23:34:57 mjames |
2 | * $Header: c:\\cygwin\\cvsroot/Vert03/gen_src/gen_main.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $ |
3 | Exp $ |
- | |
4 | * |
3 | * |
5 | * $Log: gen_main.c,v $ |
4 | * $Log: gen_main.c,v $ |
6 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
5 | * Revision 1.1.1.1 2003/11/04 23:34:57 mjames |
7 | * Imported into local repositrory |
6 | * Imported into local repositrory |
8 | * |
7 | * |
Line 37... | Line 36... | ||
37 | * Mike put it here |
36 | * Mike put it here |
38 | * |
37 | * |
39 | * |
38 | * |
40 | * Revision 1.19 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
39 | * Revision 1.19 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
41 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
40 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
42 | * |
41 | * |
43 | * Revision 1.19 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
42 | * Revision 1.19 2000/10/04 10:37:05 10:37:05 mjames (Mike James) |
44 | * Part of Release PSAVAT01 |
43 | * Part of Release PSAVAT01 |
45 | * |
44 | * |
46 | * Revision 1.18 2000/10/02 11:04:14 11:04:14 mjames (Mike James) |
45 | * Revision 1.18 2000/10/02 11:04:14 11:04:14 mjames (Mike James) |
47 | * new_vhdl |
46 | * new_vhdl |
48 | * |
47 | * |
49 | 48 | ||
50 | * Revision 1.17 2000/09/27 14:42:14 14:42:14 mjames (Mike James) |
49 | * Revision 1.17 2000/09/27 14:42:14 14:42:14 mjames (Mike James) |
51 | 50 | ||
52 | * Part of Release Sep_27_ST_2000 |
51 | * Part of Release Sep_27_ST_2000 |
53 | 52 | ||
54 | * |
53 | * |
55 | 54 | ||
56 | * Revision 1.16 2000/09/27 10:45:39 10:45:39 mjames (Mike James) |
55 | * Revision 1.16 2000/09/27 10:45:39 10:45:39 mjames (Mike James) |
57 | 56 | ||
58 | * Corrected to use correct return code from yyparse() |
57 | * Corrected to use correct return code from yyparse() |
59 | 58 | ||
60 | * |
59 | * |
61 | 60 | ||
62 | * Revision 1.15 2000/09/21 10:15:44 10:15:44 mjames (Mike James) |
61 | * Revision 1.15 2000/09/21 10:15:44 10:15:44 mjames (Mike James) |
63 | 62 | ||
64 | * Part of Release Sep21Alpha |
63 | * Part of Release Sep21Alpha |
65 | 64 | ||
66 | * |
65 | * |
67 | 66 | ||
68 | * Revision 1.14 2000/08/25 09:57:18 09:57:18 mjames (Mike James) |
67 | * Revision 1.14 2000/08/25 09:57:18 09:57:18 mjames (Mike James) |
69 | 68 | ||
70 | * Part of Release Aug25_alpha |
69 | * Part of Release Aug25_alpha |
71 | 70 | ||
72 | * |
71 | * |
73 | 72 | ||
74 | * Revision 1.13 2000/08/16 08:57:35 08:57:35 mjames (Mike James) |
73 | * Revision 1.13 2000/08/16 08:57:35 08:57:35 mjames (Mike James) |
75 | 74 | ||
76 | * Part of Release CD01_Aug2000 |
75 | * Part of Release CD01_Aug2000 |
77 | 76 | ||
78 | * |
77 | * |
79 | 78 | ||
80 | * Revision 1.12 2000/08/14 14:45:15 14:45:15 mjames (Mike James) |
79 | * Revision 1.12 2000/08/14 14:45:15 14:45:15 mjames (Mike James) |
81 | 80 | ||
82 | * Part of Release Aug_14_2000 |
81 | * Part of Release Aug_14_2000 |
83 | 82 | ||
84 | * |
83 | * |
85 | 84 | ||
86 | * Revision 1.11 2000/08/11 08:30:36 08:30:36 mjames (Mike James) |
85 | * Revision 1.11 2000/08/11 08:30:36 08:30:36 mjames (Mike James) |
87 | 86 | ||
88 | * Part of Release Aug_11_2000 |
87 | * Part of Release Aug_11_2000 |
89 | 88 | ||
90 | * |
89 | * |
91 | 90 | ||
92 | * Revision 1.10 2000/08/09 10:31:52 10:31:52 mjames (Mike James) |
91 | * Revision 1.10 2000/08/09 10:31:52 10:31:52 mjames (Mike James) |
93 | 92 | ||
94 | * Part of Release Aug__9_2000 |
93 | * Part of Release Aug__9_2000 |
95 | 94 | ||
96 | * |
95 | * |
97 | 96 | ||
98 | * Revision 1.9 2000/05/31 11:43:03 11:43:03 mjames (Mike James) |
97 | * Revision 1.9 2000/05/31 11:43:03 11:43:03 mjames (Mike James) |
99 | 98 | ||
100 | * Part of Release May_31_2000 |
99 | * Part of Release May_31_2000 |
101 | 100 | ||
102 | * |
101 | * |
103 | 102 | ||
104 | * Revision 1.8 2000/05/31 11:30:30 11:30:30 mjames (Mike James) |
103 | * Revision 1.8 2000/05/31 11:30:30 11:30:30 mjames (Mike James) |
105 | 104 | ||
106 | * Added acfread.ini file reading |
105 | * Added acfread.ini file reading |
107 | 106 | ||
108 | * |
107 | * |
109 | 108 | ||
110 | * Revision 1.7 2000/05/08 17:01:42 17:01:42 mjames (Mike James) |
109 | * Revision 1.7 2000/05/08 17:01:42 17:01:42 mjames (Mike James) |
111 | 110 | ||
112 | * Part of Release May__8_2000 |
111 | * Part of Release May__8_2000 |
113 | 112 | ||
114 | * |
113 | * |
115 | 114 | ||
116 | * Revision 1.6 2000/05/08 16:59:35 16:59:35 mjames (Mike James) |
115 | * Revision 1.6 2000/05/08 16:59:35 16:59:35 mjames (Mike James) |
117 | 116 | ||
118 | * Part of Release May__8_2000 |
117 | * Part of Release May__8_2000 |
119 | 118 | ||
120 | * |
119 | * |
121 | 120 | ||
122 | * Revision 1.5 2000/05/08 16:57:12 16:57:12 mjames (Mike James) |
121 | * Revision 1.5 2000/05/08 16:57:12 16:57:12 mjames (Mike James) |
123 | 122 | ||
124 | * Part of Release May__8_2000 |
123 | * Part of Release May__8_2000 |
125 | 124 | ||
126 | * |
125 | * |
127 | 126 | ||
128 | * Revision 1.4 2000/03/08 16:19:06 16:19:06 mjames (Mike James) |
127 | * Revision 1.4 2000/03/08 16:19:06 16:19:06 mjames (Mike James) |
129 | 128 | ||
130 | * New version including PC |
129 | * New version including PC |
131 | 130 | ||
132 | * |
131 | * |
133 | 132 | ||
134 | * Revision 1.1 2000/02/23 13:17:30 13:17:30 mjames (Mike James) |
133 | * Revision 1.1 2000/02/23 13:17:30 13:17:30 mjames (Mike James) |
135 | 134 | ||
136 | * Initial revision |
135 | * Initial revision |
137 | 136 | ||
138 | * |
137 | * |
139 | 138 | ||
140 | * Revision 1.8 2000/01/20 15:58:46 15:58:46 mjames (Mike James) |
139 | * Revision 1.8 2000/01/20 15:58:46 15:58:46 mjames (Mike James) |
141 | 140 | ||
142 | * Part of Release R22 |
141 | * Part of Release R22 |
143 | 142 | ||
144 | * |
143 | * |
145 | 144 | ||
146 | * Revision 1.7 99/12/22 11:15:27 11:15:27 mjames (Mike James) |
145 | * Revision 1.7 99/12/22 11:15:27 11:15:27 mjames (Mike James) |
147 | 146 | ||
148 | * Part of Release Dec_22_1999 |
147 | * Part of Release Dec_22_1999 |
149 | 148 | ||
150 | * |
149 | * |
151 | 150 | ||
152 | * Revision 1.6 99/06/25 14:35:44 14:35:44 mjames (Mike James) |
151 | * Revision 1.6 99/06/25 14:35:44 14:35:44 mjames (Mike James) |
153 | 152 | ||
154 | * Added in reference to expression.h, but no changes made |
153 | * Added in reference to expression.h, but no changes made |
155 | 154 | ||
156 | * to the function of acfread yet. |
155 | * to the function of acfread yet. |
157 | 156 | ||
158 | * |
157 | * |
159 | 158 | ||
160 | * Revision 1.5 99/05/04 09:52:29 09:52:29 mjames (Mike James) |
159 | * Revision 1.5 99/05/04 09:52:29 09:52:29 mjames (Mike James) |
161 | 160 | ||
162 | * General checkin |
161 | * General checkin |
163 | 162 | ||
164 | * |
163 | * |
165 | 164 | ||
166 | * Revision 1.3 98/02/11 11:26:44 11:26:44 mjames (Mike James) |
165 | * Revision 1.3 98/02/11 11:26:44 11:26:44 mjames (Mike James) |
167 | 166 | ||
168 | * Checked in for version 6.2a |
167 | * Checked in for version 6.2a |
169 | 168 | ||
170 | * |
169 | * |
171 | 170 | ||
172 | * Revision 1.2 97/04/23 08:43:16 08:43:16 mjames (Mike James) |
171 | * Revision 1.2 97/04/23 08:43:16 08:43:16 mjames (Mike James) |
173 | 172 | ||
174 | * CHecked in for release rel23041997 |
173 | * CHecked in for release rel23041997 |
175 | 174 | ||
176 | * |
175 | * |
177 | 176 | ||
178 | * Revision 1.1 97/01/03 13:32:40 13:32:40 mjames (Mike James) |
177 | * Revision 1.1 97/01/03 13:32:40 13:32:40 mjames (Mike James) |
179 | 178 | ||
180 | * Initial revision |
179 | * Initial revision |
181 | 180 | ||
182 | * |
181 | * |
183 | 182 | ||
184 | * |
183 | * |
185 | 184 | ||
186 | */ |
185 | */ |
187 | 186 | ||
188 | #include <stdio.h> |
187 | #include <stdio.h> |
189 | #include <stdlib.h> |
- | |
- | 188 | ||
190 | #include <string.h> |
189 | #include <string.h> |
191 | 190 | ||
- | 191 | #include <stdlib.h> |
|
- | 192 | ||
- | 193 | ||
- | 194 | ||
192 | #if defined HAS_TCL |
195 | #if defined HAS_TCL |
193 | #include "tcl_l.h" |
196 | #include "tcl_l.h" |
194 | #endif |
197 | #endif |
195 | #include "cmdlog.h" |
- | |
196 | #include "cmdparse.h" |
- | |
197 | #include "database.h" |
- | |
198 | #include "expression.h" |
198 | #include "expression.h" |
199 | #include "generic.h" |
199 | #include "generic.h" |
- | 200 | ||
- | 201 | ||
- | 202 | #include "database.h" |
|
- | 203 | ||
200 | #include "printout.h" |
204 | #include "printout.h" |
- | 205 | ||
201 | #include "routing.h" |
206 | #include "routing.h" |
202 | 207 | ||
- | 208 | #include "cmdparse.h" |
|
- | 209 | ||
- | 210 | #include "cmdlog.h" |
|
- | 211 | ||
- | 212 | ||
- | 213 | ||
203 | static char IDstr[] = "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/gen_src/gen_main.c,v 1.1.1.1 " |
214 | static char IDstr[] = "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/gen_src/gen_main.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $"; |
204 | "2003/11/04 23:34:57 mjames Exp $"; |
- | |
- | 215 | ||
205 | 216 | ||
206 | #if defined YYDEBUG |
217 | #if defined YYDEBUG |
207 | extern int yydebug; |
218 | extern int yydebug; |
208 | #else |
219 | #else |
209 | int yydebug = 0; |
220 | int yydebug = 0; |
210 | #endif |
221 | #endif |
211 | 222 | ||
212 | extern FILE *yyin; |
223 | extern FILE * yyin; |
- | 224 | ||
- | 225 | extern int yyparse(); |
|
- | 226 | ||
- | 227 | int main(int argc , char * argv[]) |
|
- | 228 | { |
|
- | 229 | InitialiseData(); |
|
- | 230 | ExecuteString("echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", argc-1, (argv+1)); |
|
- | 231 | ExecuteString("do $(VERTICAL_INIT) ", argc-2, (argv+2)); |
|
- | 232 | Log(LOG_GENERAL, |
|
- | 233 | "# Finished initialisation script\n"); |
|
- | 234 | ||
- | 235 | print_header(stdout,"'genread': From .gen file"); |
|
- | 236 | yydebug = 0; |
|
- | 237 | ||
- | 238 | if (argc>2 && argv[2][0]=='d') |
|
- | 239 | yydebug = 1; |
|
- | 240 | ||
- | 241 | if (argc>1) |
|
- | 242 | yyin = fopen(argv[1],"r"); |
|
- | 243 | else |
|
- | 244 | yyin = stdin; |
|
- | 245 | ||
- | 246 | if(!yyin) |
|
- | 247 | printf("cannot open input file (%s)\n",argv[1]); |
|
- | 248 | else |
|
- | 249 | while(yyparse()==0); |
|
- | 250 | ||
- | 251 | perform_routing(Free); |
|
- | 252 | list_database(stdout,0); /* no jumpers : 0=no flatten jumper */ |
|
- | 253 | list_devices(stdout, |
|
- | 254 | PRINT_TYPE|PRINT_EXPAND_BUS| |
|
- | 255 | PRINT_GENERIC|PRINT_GROUP| |
|
- | 256 | PRINT_ROUTE_FLAGS | PRINT_EQUIVALENT_PINS); |
|
- | 257 | } |
|
- | 258 | ||
- | 259 | ||
213 | 260 | ||
214 | int main (int argc, char *argv[]) |
- | |
215 | { |
- | |
216 | InitialiseData (); |
- | |
217 | ExecuteString ( |
- | |
218 | "echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", |
- | |
219 | argc - 1, |
- | |
220 | (argv + 1)); |
- | |
221 | ExecuteString ("do $(VERTICAL_INIT) ", argc - 2, (argv + 2)); |
- | |
222 | Log (LOG_GENERAL, "# Finished initialisation script\n"); |
- | |
223 | - | ||
224 | print_header (stdout, "'genread': From .gen file"); |
- | |
225 | yydebug = 0; |
- | |
226 | - | ||
227 | if (argc > 2 && argv[2][0] == 'd') |
- | |
228 | yydebug = 1; |
- | |
229 | - | ||
230 | if (argc > 1) |
- | |
231 | yyin = fopen (argv[1], "r"); |
- | |
232 | else |
- | |
233 | yyin = stdin; |
- | |
234 | - | ||
235 | if (!yyin) |
- | |
236 | printf ("cannot open input file (%s)\n", argv[1]); |
- | |
237 | else |
- | |
238 | while (yyparse () == 0) |
- | |
239 | ; |
- | |
240 | - | ||
241 | perform_routing (Free); |
- | |
242 | list_database (stdout, 0); /* no jumpers : 0=no flatten jumper */ |
- | |
243 | list_devices ( |
- | |
244 | stdout, |
- | |
245 | PRINT_TYPE | PRINT_EXPAND_BUS | PRINT_GENERIC | PRINT_GROUP | PRINT_ROUTE_FLAGS | |
- | |
246 | PRINT_EQUIVALENT_PINS); |
- | |
247 | } |
- |