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