Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 11 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /* rep_main*/ |
1 | /* rep_main*/ |
| 2 | /* |
2 | /* |
| 3 | * $Id: rep_main.c,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ |
3 | * $Id: rep_main.c,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $ |
| 4 | * |
4 | * |
| 5 | * $Log: rep_main.c,v $ |
5 | * $Log: rep_main.c,v $ |
| 6 | * Revision 1.1.1.1 2003/11/04 23:34:58 mjames |
6 | * Revision 1.1.1.1 2003/11/04 23:34:58 mjames |
| 7 | * Imported into local repositrory |
7 | * Imported into local repositrory |
| 8 | * |
8 | * |
| Line 46... | Line 46... | ||
| 46 | * Mike put it here |
46 | * Mike put it here |
| 47 | * |
47 | * |
| 48 | * |
48 | * |
| 49 | * Revision 1.21 2000/10/04 10:37:09 10:37:09 mjames (Mike James) |
49 | * Revision 1.21 2000/10/04 10:37:09 10:37:09 mjames (Mike James) |
| 50 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
50 | * Modified for Vertical2 : support COMPONENTS and SIGNALS |
| 51 | * |
51 | * |
| 52 | * Revision 1.21 2000/10/04 10:37:09 10:37:09 mjames (Mike James) |
52 | * Revision 1.21 2000/10/04 10:37:09 10:37:09 mjames (Mike James) |
| 53 | * Part of Release PSAVAT01 |
53 | * Part of Release PSAVAT01 |
| 54 | * |
54 | * |
| 55 | * Revision 1.20 2000/10/02 11:04:19 11:04:19 mjames (Mike James) |
55 | * Revision 1.20 2000/10/02 11:04:19 11:04:19 mjames (Mike James) |
| 56 | * new_vhdl |
56 | * new_vhdl |
| 57 | * |
57 | * |
| 58 | * Revision 1.19 2000/09/27 14:42:19 14:42:19 mjames (Mike James) |
58 | * Revision 1.19 2000/09/27 14:42:19 14:42:19 mjames (Mike James) |
| 59 | * Part of Release Sep_27_ST_2000 |
59 | * Part of Release Sep_27_ST_2000 |
| 60 | * |
60 | * |
| 61 | * Revision 1.18 2000/09/27 10:58:36 10:58:36 mjames (Mike James) |
61 | * Revision 1.18 2000/09/27 10:58:36 10:58:36 mjames (Mike James) |
| 62 | * Started using correct return code for yyparse() |
62 | * Started using correct return code for yyparse() |
| 63 | * |
63 | * |
| 64 | * Revision 1.17 2000/09/21 10:15:50 10:15:50 mjames (Mike James) |
64 | * Revision 1.17 2000/09/21 10:15:50 10:15:50 mjames (Mike James) |
| 65 | * Part of Release Sep21Alpha |
65 | * Part of Release Sep21Alpha |
| 66 | * |
66 | * |
| 67 | * Revision 1.16 2000/08/25 09:57:15 09:57:15 mjames (Mike James) |
67 | * Revision 1.16 2000/08/25 09:57:15 09:57:15 mjames (Mike James) |
| 68 | * Part of Release Aug25_alpha |
68 | * Part of Release Aug25_alpha |
| 69 | * |
69 | * |
| 70 | * Revision 1.15 2000/08/16 08:57:31 08:57:31 mjames (Mike James) |
70 | * Revision 1.15 2000/08/16 08:57:31 08:57:31 mjames (Mike James) |
| 71 | * Part of Release CD01_Aug2000 |
71 | * Part of Release CD01_Aug2000 |
| 72 | * |
72 | * |
| 73 | * Revision 1.14 2000/08/14 14:45:12 14:45:12 mjames (Mike James) |
73 | * Revision 1.14 2000/08/14 14:45:12 14:45:12 mjames (Mike James) |
| 74 | * Part of Release Aug_14_2000 |
74 | * Part of Release Aug_14_2000 |
| 75 | * |
75 | * |
| 76 | * Revision 1.13 2000/08/11 08:30:33 08:30:33 mjames (Mike James) |
76 | * Revision 1.13 2000/08/11 08:30:33 08:30:33 mjames (Mike James) |
| 77 | * Part of Release Aug_11_2000 |
77 | * Part of Release Aug_11_2000 |
| 78 | * |
78 | * |
| 79 | * Revision 1.12 2000/08/09 10:31:48 10:31:48 mjames (Mike James) |
79 | * Revision 1.12 2000/08/09 10:31:48 10:31:48 mjames (Mike James) |
| 80 | * Part of Release Aug__9_2000 |
80 | * Part of Release Aug__9_2000 |
| 81 | * |
81 | * |
| 82 | * Revision 1.11 2000/05/31 11:42:59 11:42:59 mjames (Mike James) |
82 | * Revision 1.11 2000/05/31 11:42:59 11:42:59 mjames (Mike James) |
| 83 | * Part of Release May_31_2000 |
83 | * Part of Release May_31_2000 |
| 84 | * |
84 | * |
| 85 | * Revision 1.10 2000/05/31 11:13:52 11:13:52 mjames (Mike James) |
85 | * Revision 1.10 2000/05/31 11:13:52 11:13:52 mjames (Mike James) |
| 86 | * Added use of vertical.ini |
86 | * Added use of vertical.ini |
| 87 | * |
87 | * |
| 88 | * Revision 1.9 2000/05/08 17:01:39 17:01:39 mjames (Mike James) |
88 | * Revision 1.9 2000/05/08 17:01:39 17:01:39 mjames (Mike James) |
| 89 | * Part of Release May__8_2000 |
89 | * Part of Release May__8_2000 |
| 90 | * |
90 | * |
| 91 | * Revision 1.8 2000/05/08 16:59:32 16:59:32 mjames (Mike James) |
91 | * Revision 1.8 2000/05/08 16:59:32 16:59:32 mjames (Mike James) |
| 92 | * Part of Release May__8_2000 |
92 | * Part of Release May__8_2000 |
| 93 | * |
93 | * |
| 94 | * Revision 1.7 2000/05/08 16:57:09 16:57:09 mjames (Mike James) |
94 | * Revision 1.7 2000/05/08 16:57:09 16:57:09 mjames (Mike James) |
| 95 | * Part of Release May__8_2000 |
95 | * Part of Release May__8_2000 |
| 96 | * |
96 | * |
| 97 | * Revision 1.6 2000/03/08 16:19:27 16:19:27 mjames (Mike James) |
97 | * Revision 1.6 2000/03/08 16:19:27 16:19:27 mjames (Mike James) |
| 98 | * New version including PC |
98 | * New version including PC |
| 99 | * |
99 | * |
| 100 | * Revision 1.3 2000/01/20 15:58:49 15:58:49 mjames (Mike James) |
100 | * Revision 1.3 2000/01/20 15:58:49 15:58:49 mjames (Mike James) |
| 101 | * Part of Release R22 |
101 | * Part of Release R22 |
| 102 | * |
102 | * |
| 103 | * Revision 1.2 99/12/22 11:15:29 11:15:29 mjames (Mike James) |
103 | * Revision 1.2 99/12/22 11:15:29 11:15:29 mjames (Mike James) |
| 104 | * Part of Release Dec_22_1999 |
104 | * Part of Release Dec_22_1999 |
| 105 | * |
105 | * |
| 106 | * Revision 1.1 99/11/23 13:54:30 13:54:30 mjames (Mike James) |
106 | * Revision 1.1 99/11/23 13:54:30 13:54:30 mjames (Mike James) |
| 107 | * Initial revision |
107 | * Initial revision |
| - | 108 | * |
|
| - | 109 | * |
|
| 108 | * |
110 | * |
| 109 | * |
111 | */ |
| 110 | * |
112 | |
| 111 | */ |
- | |
| 112 | 113 | ||
| 113 | /* |
114 | /* |
| 114 | @title |
115 | @title |
| 115 | PROGRAM repread: Converter number 1 for .REP files |
116 | PROGRAM repread: Converter number 1 for .REP files |
| 116 | @application external |
117 | @application external |
| 117 | @text |
118 | @text |
| 118 | PCB netlist to ACFP converter. The netlist file has net names in the first column of the |
119 | PCB netlist to ACFP converter. The netlist file has net names in the first column of the |
| 119 | file and then connected pins on the net listed as indented by one character. |
120 | file and then connected pins on the net listed as indented by one character. |
| 120 | @break |
121 | @break |
| 121 | Example Netlist |
122 | Example Netlist |
| 122 | @listing |
123 | @listing |
| 123 | NETNAME1 |
124 | NETNAME1 |
| Line 127... | Line 128... | ||
| 127 | U1 A4 |
128 | U1 A4 |
| 128 | G1 12 |
129 | G1 12 |
| 129 | X1 A2 |
130 | X1 A2 |
| 130 | @text |
131 | @text |
| 131 | Invocation |
132 | Invocation |
| 132 | @listing |
133 | @listing |
| 133 | repread <rep_file> [ d ] |
134 | repread <rep_file> [ d ] |
| 134 | @text |
135 | @text |
| 135 | If a lower |
136 | If a lower |
| 136 | case 'd' is present as the second argument, the Bison parser |
137 | case 'd' is present as the second argument, the Bison parser |
| 137 | (interpreter of keywords and syntax) prints extremely verbose diagnostics. |
138 | (interpreter of keywords and syntax) prints extremely verbose diagnostics. |
| 138 | @break |
139 | @break |
| 139 | Normally the acfp file produced on standard output is redirected to a file e.g. |
140 | Normally the acfp file produced on standard output is redirected to a file e.g. |
| 140 | @listing |
141 | @listing |
| 141 | repread file.rep > file.acfp |
142 | repread file.rep > file.acfp |
| 142 | @text |
143 | @text |
| 143 | Will produce file.acfp from file.rep. |
144 | Will produce file.acfp from file.rep. |
| 144 | @break |
145 | @break |
| 145 | Following this it is necessary to run the output through Vertical again in order to |
146 | Following this it is necessary to run the output through Vertical again in order to |
| 146 | set up properties on nets (power and ground being made not routable for instance) using the |
147 | set up properties on nets (power and ground being made not routable for instance) using the |
| 147 | del routable command. Alternatively the acfp file can be edited to set the net routing |
148 | del routable command. Alternatively the acfp file can be edited to set the net routing |
| 148 | flags for these nets. |
149 | flags for these nets. |
| 149 | @break |
150 | @break |
| 150 | Netlist is commonly seen with a '.REP' file suffix. One of several file formats the Southampton |
151 | Netlist is commonly seen with a '.REP' file suffix. One of several file formats the Southampton |
| 151 | Drawing office is likely to hand out. See also PROGRAM frbread and PROGRAM rep2read . |
152 | Drawing office is likely to hand out. See also PROGRAM frbread and PROGRAM rep2read . |
| 152 | @end |
153 | @end |
| 153 | */ |
154 | */ |
| 154 | 155 | ||
| 155 | #include <stdio.h> |
156 | #include <stdio.h> |
| 156 | #include <stdlib.h> |
- | |
| 157 | #include <string.h> |
157 | #include <string.h> |
| - | 158 | #include <stdlib.h> |
|
| - | 159 | ||
| 158 | 160 | ||
| 159 | #if defined HAS_TCL |
161 | #if defined HAS_TCL |
| 160 | #include "tcl_l.h" |
162 | #include "tcl_l.h" |
| 161 | #endif |
163 | #endif |
| 162 | #include "cmdlog.h" |
- | |
| 163 | #include "cmdparse.h" |
- | |
| 164 | #include "database.h" |
- | |
| 165 | #include "expression.h" |
164 | #include "expression.h" |
| 166 | #include "generic.h" |
165 | #include "generic.h" |
| - | 166 | #include "database.h" |
|
| 167 | #include "printout.h" |
167 | #include "printout.h" |
| 168 | #include "routing.h" |
168 | #include "routing.h" |
| 169 | #ident \ |
- | |
| 170 | "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/rep_src/rep_main.c,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $"; |
- | |
| 171 | #if defined YYDEBUG |
169 | #include "cmdparse.h" |
| 172 | extern int yydebug; |
170 | #include "cmdlog.h" |
| 173 | #else |
- | |
| 174 | int yydebug = 1; |
171 | #include "yacc_common.h" |
| 175 | #endif |
172 | |
| 176 | extern FILE *yyin; |
173 | #ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/rep_src/rep_main.c,v 1.1.1.1 2003/11/04 23:34:58 mjames Exp $" |
| - | 174 | ||
| - | 175 | ||
| 177 | int main (int argc, char *argv[]) |
176 | int main(int argc , char * argv[]) |
| 178 | { |
177 | { |
| 179 | InitialiseData (); |
178 | InitialiseData(); |
| 180 | ExecuteString ( |
- | |
| 181 | "echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", |
179 | ExecuteString("echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", argc-1, (argv+1)); |
| 182 | argc - 1, |
- | |
| 183 | (argv + 1)); |
- | |
| 184 | ExecuteString ("do $(VERTICAL_INIT) ", argc - 2, (argv + 2)); |
180 | ExecuteString("do $(VERTICAL_INIT) ", argc-2, (argv+2)); |
| - | 181 | Log(LOG_GENERAL, |
|
| 185 | Log (LOG_GENERAL, "# Finished initialisation script\n"); |
182 | "# Finished initialisation script\n"); |
| 186 | print_header (stdout, "'repread': From .rep file"); |
183 | print_header(stdout,"'repread': From .rep file"); |
| 187 | yydebug = 0; |
184 | yydebug = 0; |
| 188 | if (argc > 2 && argv[2][0] == 'd') |
185 | if (argc>2 && argv[2][0]=='d') |
| 189 | yydebug = 1; |
186 | yydebug = 1; |
| 190 | if (argc > 1) |
187 | if (argc>1) |
| 191 | yyin = fopen (argv[1], "r"); |
188 | yyin = fopen(argv[1],"r"); |
| 192 | else |
189 | else |
| 193 | yyin = stdin; |
190 | yyin = stdin; |
| 194 | if (!yyin) |
191 | if(!yyin) |
| 195 | Log (LOG_ERROR, "cannot open input file (%s)\n", argv[1]); |
192 | Log(LOG_ERROR,"cannot open input file (%s)\n",argv[1]); |
| 196 | else |
193 | else |
| 197 | while (yyparse () == 0) |
194 | while(yyparse()==0); |
| 198 | ; |
- | |
| 199 | perform_routing (Free); |
195 | perform_routing(Free); |
| 200 | 196 | ||
| 201 | list_database (stdout, 0); |
197 | list_database(stdout,0); |
| 202 | list_devices ( |
198 | list_devices(stdout, |
| 203 | stdout, |
199 | PRINT_TYPE|PRINT_EXPAND_BUS| |
| 204 | PRINT_TYPE | PRINT_EXPAND_BUS | PRINT_GENERIC | PRINT_GROUP | PRINT_ROUTE_FLAGS | |
200 | PRINT_GENERIC|PRINT_GROUP| |
| 205 | PRINT_EQUIVALENT_PINS); |
201 | PRINT_ROUTE_FLAGS | PRINT_EQUIVALENT_PINS); |
| 206 | } |
202 | } |