Subversion Repositories Vertical

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 mjames 1
/* $Id: cdi_main.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $
2
 *
3
 * $Log: cdi_main.c,v $
4
 * Revision 1.1.1.1  2003/11/04 23:34:57  mjames
5
 * Imported into local repositrory
6
 *
7
 * Revision 1.10  2002/09/09 10:36:19  mjames
8
 * Checkpoint checkin
9
 *
10
 * Revision 1.9  2002/08/14 12:03:07  mjames
11
 * Added an 'external' tag to the documentation
12
 *
13
 * Revision 1.9  2002/04/04 15:04:28  mjames
14
 * Fixed #ident problem
15
 *
16
 * Revision 1.8  2001/10/31 22:19:58  mjames
17
 * Tidying up problematical comments caused by CVS
18
 * 'intelligent' comment guessing
19
 *
20
 * Revision 1.7  2001/10/22 11:01:36  mjames
21
 * Modified list_devices to take an options flag
22
 *
23
 * Revision 1.6  2001/10/02 20:55:37  mjames
24
 * Moved documentation about code to main program module.
25
 *
26
 * Revision 1.5  2001/09/28 14:34:13  mjames
27
 * FIxed yydebug variable to exist when YYDEBUG macro
28
 * is not defined. Otherwise linker error will be reported.
29
 *
30
 * Revision 1.4  2001/07/09 15:36:57  mjames
31
 * Placed the version string in an independent file to save time on building
32
 * all of the variants of Vertical
33
 *
34
 * Revision 1.3  2001/06/06 12:10:26  mjames
35
 * Move from HPUX
36
 *
37
 * Revision 1.2  2000/12/04 13:14:01  mjames
38
 * Imported all of the PCB syntax readers.
39
 *
40
 * Converted "a/b" to mean "a" divided by "b" insted of a single string
41
 * "a/b" in Verilog
42
 *
43
 * Revision 1.1.1.1  2000/10/19 21:58:34  mjames
44
 * Mike put it here
45
 *
46
 *
47
 * Revision 1.29  2000/10/04  10:37:01  10:37:01  mjames (Mike James)
48
 * Modified to become part of vertical2, complete
49
 * with VHDL COMPONENT and SIGNAL declarations.
50
 *
51
 * Revision 1.29  2000/10/04  10:37:01  10:37:01  mjames (Mike James)
52
 * Part of Release PSAVAT01
53
 *
54
 * Revision 1.28  2000/10/02  11:04:07  11:04:07  mjames (Mike James)
55
 * new_vhdl
56
 *
57
 * Revision 1.27  2000/09/27  14:42:07  14:42:07  mjames (Mike James)
58
 * Part of Release Sep_27_ST_2000
59
 *
60
 * Revision 1.26  2000/09/27  10:41:21  10:41:21  mjames (Mike James)
61
 * Modified to use correct return code from yyparse.
62
 *
63
 * Revision 1.25  2000/09/21  10:15:37  10:15:37  mjames (Mike James)
64
 * Part of Release Sep21Alpha
65
 *
66
 * Revision 1.24  2000/08/25  09:57:06  09:57:06  mjames (Mike James)
67
 * Part of Release Aug25_alpha
68
 *
69
 * Revision 1.23  2000/08/16  08:57:23  08:57:23  mjames (Mike James)
70
 * Part of Release CD01_Aug2000
71
 *
72
 * Revision 1.22  2000/08/14  14:45:05  14:45:05  mjames (Mike James)
73
 * Part of Release Aug_14_2000
74
 *
75
 * Revision 1.21  2000/08/11  08:30:26  08:30:26  mjames (Mike James)
76
 * Part of Release Aug_11_2000
77
 *
78
 * Revision 1.20  2000/08/09  10:31:39  10:31:39  mjames (Mike James)
79
 * Part of Release Aug__9_2000
80
 *
81
 * Revision 1.19  2000/05/31  11:42:44  11:42:44  mjames (Mike James)
82
 * Part of Release May_31_2000
83
 *
84
 * Revision 1.18  2000/05/31  11:29:15  11:29:15  mjames (Mike James)
85
 * Added acfread.ini file reading
86
 *
87
 * Revision 1.17  2000/05/08  17:01:30  17:01:30  mjames (Mike James)
88
 * Part of Release May__8_2000
89
 *
90
 * Revision 1.16  2000/05/08  16:59:24  16:59:24  mjames (Mike James)
91
 * Part of Release May__8_2000
92
 *
93
 * Revision 1.15  2000/05/08  16:57:00  16:57:00  mjames (Mike James)
94
 * Part of Release May__8_2000
95
 *
96
 * Revision 1.14  2000/03/08  16:17:24  16:17:24  mjames (Mike James)
97
 * Removed syntactically confused 'junk'
98
 *
99
 * Revision 1.11  2000/01/20  15:58:38  15:58:38  mjames (Mike James)
100
 * Part of Release R22
101
 *
102
 * Revision 1.10  99/12/22  11:15:19  11:15:19  mjames (Mike James)
103
 * Part of Release Dec_22_1999
104
 *
105
 * Revision 1.9  99/06/25  14:34:26  14:34:26  mjames (Mike James)
106
 * Added in reference to expression.h, but no changes made
107
 * to the function of acfread yet.
108
 *
109
 * Revision 1.8  99/06/18  09:06:34  09:06:34  mjames (Mike James)
110
 * Checkin before major design changes
111
 *
112
 * Revision 1.7  1999/06/14  10:47:18  mjames
113
 * *** empty log message ***
114
 *
115
 * Revision 1.7  1999/06/14  10:47:18  mjames
116
 * *** empty log message ***
117
 *
118
 * Revision 1.6  1999/06/11  14:21:15  mjames
119
 * *** empty log message ***
120
 *
121
 * Revision 1.6  1999/06/11  14:21:15  mjames
122
 * *** empty log message ***
123
 *
124
 * Revision 1.5  99/05/04  09:48:09  09:48:09  mjames (Mike James)
125
 *
126
 *
127
 * Revision 1.3  98/02/11  11:24:57  11:24:57  mjames (Mike James)
128
 * Checked in for version 6.2a
129
 *
130
 * Revision 1.2  97/04/23  08:42:39  08:42:39  mjames (Mike James)
131
 * CHecked in for release rel23041997
132
 *
133
 * Revision 1.1  97/01/03  13:33:57  13:33:57  mjames (Mike James)
134
 * Initial revision
135
 *
136
 *
11 mjames 137
*/
2 mjames 138
/*
139
@title
140
PROGRAM cdiread: Converter for .CDI files
141
@application external
142
@text
143
PCB netlist to ACFP converter. Looks for netlists in ASCII containing tags like:
144
@listing
145
.ASS
146
.IMP
147
.COM
148
.CSP
149
.PCB
150
.CON
151
.COD
152
.REM
153
.EOD
154
@text
155
Commonly seen with a '.CDI' file suffix. I think this is one of the random Racal-Zuken output
156
file types.
157
@end
158
*/
159
#include <stdio.h>
11 mjames 160
#include <string.h>
2 mjames 161
#include <stdlib.h>
162
#if defined HAS_TCL
163
#include "tcl_l.h"
164
#endif
165
#include "expression.h"
166
#include "generic.h"
11 mjames 167
#include "database.h"
2 mjames 168
#include "printout.h"
169
#include "routing.h"
11 mjames 170
#include "cmdparse.h"
171
#include "cmdlog.h"
172
#include "yacc_common.h"
2 mjames 173
 
11 mjames 174
#ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/cdi_src/cdi_main.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $"
2 mjames 175
 
11 mjames 176
int main(int argc , char * argv[])
2 mjames 177
 
178
{
11 mjames 179
    InitialiseData();
180
    ExecuteString("echo running \\$(VERTICAL_INIT) file name = $(VERTICAL_INIT) ", argc-1, (argv+1));
181
    ExecuteString("do $(VERTICAL_INIT) ", argc-2, (argv+2));
2 mjames 182
 
11 mjames 183
    Log(LOG_GENERAL,
184
        "# Finished initialisation script\n");
185
    print_header(stdout,"'cdiread': From .cdi file");
186
    yydebug = 0;
187
    if (argc>2 && argv[2][0]=='d')
188
        yydebug = 1;
189
    if (argc>1)
190
        yyin = fopen(argv[1],"r");
191
    else
192
        yyin = stdin;
193
    if(!yyin)
194
        printf("cannot open input file (%s)\n",argv[1]);
195
    else
196
        while(yyparse()==0);
2 mjames 197
 
11 mjames 198
    perform_routing(Free);
199
    list_database(stdout,0);/* no jumpers :0= no hierarchy */
200
    list_devices(stdout,
201
         PRINT_TYPE|PRINT_EXPAND_BUS|
202
         PRINT_GENERIC|PRINT_GROUP|
203
         PRINT_ROUTE_FLAGS | PRINT_EQUIVALENT_PINS);
204
    }
205
 
206
 
207