Subversion Repositories Vertical

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 11
Line 69... Line 69...
69
 *
69
 *
70
 * Revision 1.26  2001/10/31 16:23:22  mjames
70
 * Revision 1.26  2001/10/31 16:23:22  mjames
71
 * Added a datastructure to hide regular expression information from programs.
71
 * Added a datastructure to hide regular expression information from programs.
72
 * Changed call to regexec to indicate 0 subexpressions to be matched
72
 * Changed call to regexec to indicate 0 subexpressions to be matched
73
 * rather than a number dependent on strlen(string) which was wrong.
73
 * rather than a number dependent on strlen(string) which was wrong.
74
 *
74
 *
75
 * Revision 1.25  2001/10/23 21:14:28  mjames
75
 * Revision 1.25  2001/10/23 21:14:28  mjames
76
 * Added match_template command : purpose to remove connections
76
 * Added match_template command : purpose to remove connections
77
 * to device pins which do not exist in the template of that device.
77
 * to device pins which do not exist in the template of that device.
78
 *
78
 *
79
 * Modified set type_id to use wildcards (the only case where this applies)
79
 * Modified set type_id to use wildcards (the only case where this applies)
80
 *
80
 *
81
 * Revision 1.24  2001/10/18 21:36:01  mjames
81
 * Revision 1.24  2001/10/18 21:36:01  mjames
82
 * Added modify pins command : nets inherit identifier from selected socket and pin on that
82
 * Added modify pins command : nets inherit identifier from selected socket and pin on that socket to ease cross referencing.
83
 *socket to ease cross referencing.
-
 
84
 *
83
 *
85
 * Revision 1.23  2001/10/11 16:10:17  mjames
84
 * Revision 1.23  2001/10/11 16:10:17  mjames
86
 * Corrections to the SWAP command, and printout so that
85
 * Corrections to the SWAP command, and printout so that
87
 * WRITE net now outputs all chips in the design so that their generics
86
 * WRITE net now outputs all chips in the design so that their generics
88
 * can be passed forward to the next phase.
87
 * can be passed forward to the next phase.
89
 *
88
 *
90
 * Revision 1.22  2001/10/10 20:19:19  mjames
89
 * Revision 1.22  2001/10/10 20:19:19  mjames
91
 * added echoq command to give quoted arguments for checking
90
 * added echoq command to give quoted arguments for checking
92
 *
91
 *
93
 * Revision 1.21  2001/10/07 20:50:54  mjames
92
 * Revision 1.21  2001/10/07 20:50:54  mjames
94
 * Added wildcard checking (warn user about
93
 * Added wildcard checking (warn user about
95
 * using wildcard '*' on the end of a string in stead of wildcard '.*')
94
 * using wildcard '*' on the end of a string in stead of wildcard '.*')
96
 *
95
 *
97
 * Revision 1.20  2001/10/02 20:55:18  mjames
96
 * Revision 1.20  2001/10/02 20:55:18  mjames
98
 * Edited help files to try and get them more up to date.
97
 * Edited help files to try and get them more up to date.
99
 *
98
 *
100
 * Revision 1.19  2001/09/25 23:15:24  mjames
99
 * Revision 1.19  2001/09/25 23:15:24  mjames
101
 * Converted wildcards to use proper regexp pattern match library
100
 * Converted wildcards to use proper regexp pattern match library
102
 *
101
 *
103
 * Revision 1.18  2001/09/13 21:08:54  mjames
102
 * Revision 1.18  2001/09/13 21:08:54  mjames
104
 * Added initial bundle/unbundle commands.
103
 * Added initial bundle/unbundle commands.
105
 *
104
 *
106
 * Revision 1.17  2001/08/23 21:34:27  mjames
105
 * Revision 1.17  2001/08/23 21:34:27  mjames
107
 * Added version command to list out all of the tags
106
 * Added version command to list out all of the tags
108
 *
107
 *
109
 * Revision 1.16  2001/08/23 20:34:12  mjames
108
 * Revision 1.16  2001/08/23 20:34:12  mjames
110
 * Made sure that attempts to create duplicate socket identifiers or names fails with the set
109
 * Made sure that attempts to create duplicate socket identifiers or names fails with the set id and set name commands.
111
 *id and set name commands.
-
 
112
 *
110
 *
113
 * Revision 1.15  2001/08/23 20:06:30  mjames
111
 * Revision 1.15  2001/08/23 20:06:30  mjames
114
 * Added 'reserve' command for use with preroute commands.
112
 * Added 'reserve' command for use with preroute commands.
115
 * This command provides the 'correct' documented pin reservation
113
 * This command provides the 'correct' documented pin reservation
116
 * behaviour.
114
 * behaviour.
117
 *
115
 *
118
 * Revision 1.14  2001/07/20 10:47:43  mjames
116
 * Revision 1.14  2001/07/20 10:47:43  mjames
119
 * Allowed setting of pin routing group properties on pins on nets
117
 * Allowed setting of pin routing group properties on pins on nets
120
 * by the "set pin" command
118
 * by the "set pin" command
121
 *
119
 *
122
 * Revision 1.13  2001/07/02 21:21:31  mjames
120
 * Revision 1.13  2001/07/02 21:21:31  mjames
123
 * Added logging to standard output as well as standard error
121
 * Added logging to standard output as well as standard error
124
 * in the 'echoe' command
122
 * in the 'echoe' command
125
 *
123
 *
126
 * Revision 1.12  2001/06/21 10:52:43  mjames
124
 * Revision 1.12  2001/06/21 10:52:43  mjames
127
 * Added "echoe" command which echos an error string to the output file.
125
 * Added "echoe" command which echos an error string to the output file.
128
 * Also added command documentation for some more of the command line commands.
126
 * Also added command documentation for some more of the command line commands.
129
 *
127
 *
130
 * Revision 1.11  2001/06/19 05:24:34  mjames
128
 * Revision 1.11  2001/06/19 05:24:34  mjames
131
 * Created a trap_fopen to overcome trying to write to read only files.
129
 * Created a trap_fopen to overcome trying to write to read only files.
132
 * If this attempted in NT the file can be opened but not written to.
130
 * If this attempted in NT the file can be opened but not written to.
133
 *
131
 *
134
 * Revision 1.10  2001/06/06 12:10:25  mjames
132
 * Revision 1.10  2001/06/06 12:10:25  mjames
135
 * Move from HPUX
133
 * Move from HPUX
136
 *
134
 *
137
 * Revision 1.9  2001/04/09 14:58:29  mjames
135
 * Revision 1.9  2001/04/09 14:58:29  mjames
138
 * Added capability to delete generics from specific sockets.
136
 * Added capability to delete generics from specific sockets.
139
 *
137
 *
140
 * Revision 1.8  2001/04/06 22:47:01  mjames
138
 * Revision 1.8  2001/04/06 22:47:01  mjames
141
 * Added doc2, the creator of documentation to Vertical scripts uses PERL
139
 * Added doc2, the creator of documentation to Vertical scripts uses PERL
142
 *
140
 *
143
 *
141
 *
144
 * Also correcting generic behaviour and the printing of Verilog.
142
 * Also correcting generic behaviour and the printing of Verilog.
145
 *
143
 *
146
 * Revision 1.7  2001/04/04 22:12:31  mjames
144
 * Revision 1.7  2001/04/04 22:12:31  mjames
147
 * Added some online documentation to the C program command handler
145
 * Added some online documentation to the C program command handler
148
 * THis is scanned by a utility called 'doc' that currently creates
146
 * THis is scanned by a utility called 'doc' that currently creates
149
 * simple HTML from part formatted C comments
147
 * simple HTML from part formatted C comments
150
 *
148
 *
151
 * Also working well on printing VERILOG
149
 * Also working well on printing VERILOG
152
 *
150
 *
153
 * still have problems with C comments and VERTICAL pragmas.
151
 * still have problems with C comments and VERTICAL pragmas.
154
 *
152
 *
155
 * Revision 1.6  2001/03/29 22:08:55  mjames
153
 * Revision 1.6  2001/03/29 22:08:55  mjames
156
 * Modified to define the scope of set generic commands : now can be global
154
 * Modified to define the scope of set generic commands : now can be global
157
 * or defined for a socket or a simple wildcarded list of sockets.
155
 * or defined for a socket or a simple wildcarded list of sockets.
158
 *
156
 *
159
 * In addition the is_FPGA property has been activated so that FPGA components
157
 * In addition the is_FPGA property has been activated so that FPGA components
160
 * are not listed out when used in a Verilog (.vb) file.
158
 * are not listed out when used in a Verilog (.vb) file.
161
 *
159
 *
162
 * Version raised to 11.02
160
 * Version raised to 11.02
163
 *
161
 *
164
 * Revision 1.5  2001/01/26 21:50:10  mjames
162
 * Revision 1.5  2001/01/26 21:50:10  mjames
165
 * Managed to get vertical non TCL to compile again
163
 * Managed to get vertical non TCL to compile again
166
 *
164
 *
167
 * Conversion to argv, argc[] mode of operation continues
165
 * Conversion to argv, argc[] mode of operation continues
168
 *
166
 *
169
 * Revision 1.4  2001/01/04 21:26:54  mjames
167
 * Revision 1.4  2001/01/04 21:26:54  mjames
170
 * Modifications to add in the TCL style
168
 * Modifications to add in the TCL style
171
 * argument list to all of the functions
169
 * argument list to all of the functions
172
 * .
170
 * .
173
 *
171
 *
174
 * Revision 1.3  2001/01/02 07:53:51  mjames
172
 * Revision 1.3  2001/01/02 07:53:51  mjames
175
 * Made changes to allow for interface with TCL/Tk
173
 * Made changes to allow for interface with TCL/Tk
176
 *
174
 *
177
 * Revision 1.2  2000/11/29 23:25:39  mjames
175
 * Revision 1.2  2000/11/29 23:25:39  mjames
178
 * Corrected a failure to cope with integer type ports on entities
176
 * Corrected a failure to cope with integer type ports on entities
179
 * in acf_yacc.y
177
 * in acf_yacc.y
180
 *
178
 *
181
 * Altered the elaborate command to call up the template command aw well
179
 * Altered the elaborate command to call up the template command aw well
182
 *
180
 *
183
 * Altered equivalent pins handler to cope with the absence of any templates
181
 * Altered equivalent pins handler to cope with the absence of any templates
184
 *
182
 *
185
 * Altered printout routines to use correct datatype for expansion of
183
 * Altered printout routines to use correct datatype for expansion of
186
 * VHDL constants
184
 * VHDL constants
187
 *
185
 *
188
 * Revision 1.1.1.1  2000/10/19 21:58:35  mjames
186
 * Revision 1.1.1.1  2000/10/19 21:58:35  mjames
189
 * Mike put it here
187
 * Mike put it here
190
 *
188
 *
191
 *
189
 *
192
 *
190
 *
193
 *****************************************************************************/
191
*****************************************************************************/
194
 
192
 
195
#include "acf_lex_ext.h"
-
 
196
#include "acf_yacc.h"
-
 
197
#include "bundle.h"
193
#include <stdio.h>
198
#include "chck_names.h"
-
 
199
#include "cmdexec.h"
194
#include <stdlib.h>
200
#include "cmdlog.h"
195
#include <string.h>
201
#include "cmdparse.h"
196
#include <ctype.h>
202
#include "cmdutil.h"
197
#include <sys/types.h>
203
#include "database.h"
198
#include <regex.h>
-
 
199
 
204
#include "equivalent.h"
200
#include "vertcl_main.h"
205
#include "expression.h"
201
#include "expression.h"
206
#include "ext_nets.h"
-
 
207
#include "generic.h"
202
#include "generic.h"
208
#include "jumpering.h"
-
 
209
#include "partition.h"
203
#include "database.h"
210
#include "printout.h"
204
#include "printout.h"
211
#include "rename.h"
-
 
212
#include "routing.h"
205
#include "routing.h"
213
#include "sorting.h"
206
#include "jumpering.h"
-
 
207
#include "ext_nets.h"
214
#include "statistics.h"
208
#include "statistics.h"
-
 
209
#include "partition.h"
-
 
210
#include "cmdparse.h"
-
 
211
#include "cmdexec.h"
-
 
212
#include "cmdutil.h"
-
 
213
#include "cmdlog.h"
-
 
214
#include "rename.h"
215
#include "template.h"
215
#include "template.h"
-
 
216
#include "chck_names.h"
-
 
217
#include "acf_yacc.h"
-
 
218
#include "sorting.h"
-
 
219
#include "bundle.h"
-
 
220
#include "equivalent.h"
216
#include "unrouted.h"
221
#include "unrouted.h"
217
#include "vertcl_main.h"
222
#include "acf_lex_ext.h"
-
 
223
 
-
 
224
#ident "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/vertlib/cmdexec2.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $"
218
 
225
 
219
#include <ctype.h>
-
 
220
#include <regex.h>
-
 
221
#include <stdio.h>
-
 
222
#include <stdlib.h>
-
 
223
#include <string.h>
-
 
224
#include <sys/types.h>
-
 
225
 
226
 
226
#ident                                                                                        \
-
 
227
    "@(#)$Header: c:\\cygwin\\cvsroot/Vert03/vertlib/cmdexec2.c,v 1.1.1.1 2003/11/04 23:34:57 mjames Exp $"
-
 
228
 
227
 
229
/************************************************************************/
228
/************************************************************************/
230
/* Command handling code                                                */
229
/* Command handling code                                                */
231
/************************************************************************/
230
/************************************************************************/
232
 
231
 
-
 
232
 
233
/*********************** Set id (of) <name> (to) <id>Command  ***************************/
233
/*********************** Set id (of) <name> (to) <id>Command  ***************************/
234
/*
234
/*
235
@title
235
@title
236
set ID_of_name <device_name> <new_id>
236
set ID_of_name <device_name> <new_id>
237
@application vertical_pin
237
@application vertical_pin
Line 246... Line 246...
246
@text
246
@text
247
Command will fail if there is already a device with the new
247
Command will fail if there is already a device with the new
248
identifier.
248
identifier.
249
@end
249
@end
250
*/
250
*/
251
int SetIdOfNameHandler (ET_TCLARGS)
251
int SetIdOfNameHandler(ET_TCLARGS)
252
{
252
{
253
        socket_t *chip;
253
  socket_t * chip;
254
        if (argc < 2)
254
   if (argc < 2)
255
                return (TCL_ERROR);
255
       return(TCL_ERROR);
256
 
256
 
257
        /* safety catch code added : is the ident already in use ? */
257
/* safety catch code added : is the ident already in use ? */
258
        chip = find_socket (Ident, argv[1], Search, &socket_head);
258
   chip = find_socket(Ident,argv[1],Search,&socket_head);
259
        if (chip)
259
   if(chip) {
-
 
260
     Log(LOG_ERROR,"Changing socket id for name='%s' fails : id '%s' in use already\n",argv[0],argv[1]);
-
 
261
     return (TCL_ERROR);
260
        {
262
     };
-
 
263
   
261
                Log (
264
   chip = find_socket(Name,argv[0],Search,&socket_head);
262
                    LOG_ERROR,
265
   if(!chip) {
263
                    "Changing socket id for name='%s' fails : id '%s' in use already\n",
266
     Log(LOG_ERROR,"Changing ID: Cannot find socket with name='%s'\n",argv[0]);
264
                    argv[0],
267
     return (TCL_ERROR);
-
 
268
     };
265
                    argv[1]);
269
   set_socket(chip,Ident,argv[1]);
266
                return (TCL_ERROR);
270
   Log(LOG_GENERAL,"# Set ident of socket name='%s' to be '%s'\n",argv[0],argv[1]);
267
        };
271
   return(TCL_OK);
268
 
272
 
269
        chip = find_socket (Name, argv[0], Search, &socket_head);
-
 
270
        if (!chip)
-
 
271
        {
-
 
272
                Log (LOG_ERROR, "Changing ID: Cannot find socket with name='%s'\n", argv[0]);
-
 
273
                return (TCL_ERROR);
-
 
274
        };
-
 
275
        set_socket (chip, Ident, argv[1]);
-
 
276
        Log (LOG_GENERAL, "# Set ident of socket name='%s' to be '%s'\n", argv[0], argv[1]);
-
 
277
        return (TCL_OK);
-
 
278
}
273
}
279
/*********************** Set type (of) <name> (to) <type> Command  ***************************/
274
/*********************** Set type (of) <name> (to) <type> Command  ***************************/
280
/*
275
/*
281
@title
276
@title
282
set TYpe_name <device_name> <new_type>
277
set TYpe_name <device_name> <new_type>
Line 287... Line 282...
287
Provides a means of assigning a device type to a socket where
282
Provides a means of assigning a device type to a socket where
288
the socket contains a design e.g. an FPGA. This can then be
283
the socket contains a design e.g. an FPGA. This can then be
289
used to tag sockets for the application of pin templates.
284
used to tag sockets for the application of pin templates.
290
@end
285
@end
291
*/
286
*/
292
int SetTypeOfNameHandler (ET_TCLARGS)
287
int SetTypeOfNameHandler(ET_TCLARGS)
293
{
288
{
294
        socket_t *chip;
289
  socket_t * chip;
295
        if (argc < 2)
290
  if (argc < 2)
296
                return (TCL_ERROR);
291
       return(TCL_ERROR);
297
        chip = find_socket (Name, argv[0], Search, &socket_head);
292
   chip = find_socket(Name,argv[0],Search,&socket_head);
298
        if (!chip)
293
   if(!chip) {
299
        {
-
 
300
                Log (LOG_GENERAL, "Cannot find socket with name='%s'\n", argv[0]);
294
     Log(LOG_GENERAL,"Cannot find socket with name='%s'\n",argv[0]);
301
                return (TCL_ERROR);
295
     return (TCL_ERROR);
302
        };
296
     };
303
        set_socket (chip, Type, argv[1]);
297
   set_socket(chip,Type,argv[1]);
304
        Log (LOG_GENERAL, "# Set type of socket name='%s' to be '%s'\n", argv[0], argv[1]);
298
   Log(LOG_GENERAL,"# Set type of socket name='%s' to be '%s'\n",argv[0],argv[1]);
305
        return (TCL_OK);
299
   return(TCL_OK);
-
 
300
 
306
}
301
}
307
/*********************** Set type (of) <ident> (to) <type> Command ***************************/
302
/*********************** Set type (of) <ident> (to) <type> Command  ***************************/
308
/*
303
/*
309
@title
304
@title
310
set TYPE_Id <device_id> <new_type>
305
set TYPE_Id <device_id> <new_type>
311
@application vertical_pin
306
@application vertical_pin
312
@application vertical_hdl
307
@application vertical_hdl
313
@application vertical_pcb
308
@application vertical_pcb
314
@text
309
@text
315
Provides a means of assigning a device type to a socket where
310
Provides a means of assigning a device type to a socket where
316
the socket does not necessarily contain a design e.g. a
311
the socket does not necessarily contain a design e.g. a
317
resistor pack. This can then be used to tag sockets for the
312
resistor pack. This can then be used to tag sockets for the
318
application of pin templates. This has been converted to wildcard usage, as this means
313
application of pin templates. This has been converted to wildcard usage, as this means
319
all Rxxx can be made type 'resistor'.
314
all Rxxx can be made type 'resistor'.
320
 
315
 
321
@end
316
@end
322
*/
317
*/
323
int SetTypeOfIDHandler (ET_TCLARGS)
318
int SetTypeOfIDHandler(ET_TCLARGS)
324
{
319
{
325
        socket_t *skt;
320
  socket_t * skt;
326
        int rc;
321
  int rc;
327
        /* compile regular expression */
322
  /* compile regular expression */
328
        vert_regex_t *preg;
323
  vert_regex_t * preg;
329
        char *pattern;
324
  char * pattern;
330
 
325
 
331
        if (argc < 2)
326
  if(argc < 2 )
332
        {
327
    {
333
                Log (LOG_ERROR, "-- Need a device ID and a type\n");
328
    Log(LOG_ERROR,"-- Need a device ID and a type\n");
334
                return (TCL_ERROR);
329
    return(TCL_ERROR);
335
        }
330
    }
336
 
331
 
337
        pattern = argv[0];
332
  pattern = argv[0];  
338
        Log (LOG_GENERAL, "-- Beginning setting pin template: prefix '%s' --\n", pattern);
333
  Log(LOG_GENERAL,"-- Beginning setting pin template: prefix '%s' --\n",pattern);
339
 
334
 
340
        rc = vert_regcomp (&preg, pattern);
335
  rc = vert_regcomp(&preg,pattern);
-
 
336
 
-
 
337
  if (rc != 0 )
-
 
338
    {
-
 
339
    char errbuff[100];
-
 
340
    regerror(rc,preg->preg,errbuff,100);
-
 
341
    Log(LOG_ERROR,"-- Problem (rc=%d) %s with '%s' as regular expression\n",rc,errbuff,pattern);
-
 
342
   
-
 
343
    return TCL_ERROR;
-
 
344
    }
-
 
345
  else
-
 
346
    {
-
 
347
    Log(LOG_GENERAL,"-- Using '%s' as match pattern\n",pattern);
-
 
348
    }
-
 
349
 
-
 
350
  skt = socket_head;
-
 
351
  while(skt)
-
 
352
    {
-
 
353
    int found;
-
 
354
    found  = regexec(preg->preg,skt->identifier,0,preg->regpatt,0);
-
 
355
 
-
 
356
 
-
 
357
    if(!found)
-
 
358
      {
-
 
359
      set_socket(skt,Type,argv[1]);
-
 
360
      if(level & 1)
-
 
361
        {
-
 
362
        Log(LOG_GENERAL,"# Set type of socket Ident='%s' to be '%s'\n",skt->identifier,argv[1]);
-
 
363
        }
-
 
364
      }
-
 
365
    skt = skt->next;
-
 
366
    }
-
 
367
   vert_regfree(&preg);
-
 
368
   return(TCL_OK);
341
 
369
 
342
        if (rc != 0)
-
 
343
        {
-
 
344
                char errbuff[100];
-
 
345
                regerror (rc, preg->preg, errbuff, 100);
-
 
346
                Log (
-
 
347
                    LOG_ERROR,
-
 
348
                    "-- Problem (rc=%d) %s with '%s' as regular expression\n",
-
 
349
                    rc,
-
 
350
                    errbuff,
-
 
351
                    pattern);
-
 
352
 
-
 
353
                return TCL_ERROR;
-
 
354
        }
-
 
355
        else
-
 
356
        {
-
 
357
                Log (LOG_GENERAL, "-- Using '%s' as match pattern\n", pattern);
-
 
358
        }
-
 
359
 
-
 
360
        skt = socket_head;
-
 
361
        while (skt)
-
 
362
        {
-
 
363
                int found;
-
 
364
                found = regexec (preg->preg, skt->identifier, 0, preg->regpatt, 0);
-
 
365
 
-
 
366
                if (!found)
-
 
367
                {
-
 
368
                        set_socket (skt, Type, argv[1]);
-
 
369
                        if (level & 1)
-
 
370
                        {
-
 
371
                                Log (
-
 
372
                                    LOG_GENERAL,
-
 
373
                                    "# Set type of socket Ident='%s' to be '%s'\n",
-
 
374
                                    skt->identifier,
-
 
375
                                    argv[1]);
-
 
376
                        }
-
 
377
                }
-
 
378
                skt = skt->next;
-
 
379
        }
-
 
380
        vert_regfree (&preg);
-
 
381
        return (TCL_OK);
-
 
382
}
370
  }
383
/*********************** Set Partition Command  ***************************/
371
/*********************** Set Partition Command  ***************************/
384
/*
372
/*
385
@title
373
@title
386
set PARtition <socket_name> <socket_name> ......
374
set PARtition <socket_name> <socket_name> ......
387
@application vertical_pin
375
@application vertical_pin
Line 392... Line 380...
392
the names being those used in the CHIP declarations in the
380
the names being those used in the CHIP declarations in the
393
acfp file. Wildcarding can be used to select related groups of
381
acfp file. Wildcarding can be used to select related groups of
394
sockets. All this does is select a socket/entity as being a member of the
382
sockets. All this does is select a socket/entity as being a member of the
395
set of socket/entities that will be selected in this partition.
383
set of socket/entities that will be selected in this partition.
396
@break
384
@break
397
@If no arguments are given this is the same as the set all_par command, in that
385
@If no arguments are given this is the same as the set all_par command, in that
398
It routes the design before selecting the partition
386
It routes the design before selecting the partition
399
@end
387
@end
400
*/
388
*/
401
int SetPartHandler (ET_TCLARGS)
389
int SetPartHandler(ET_TCLARGS) {
402
{
-
 
403
        int i = 0;
390
  int i = 0;
404
        int Status = TCL_OK;
391
  int Status = TCL_OK;
405
        if (argc == 0)
392
  if(argc == 0)
406
        {
393
    {
407
                name_routed_nets ();
394
    name_routed_nets();
408
                Status = set_clear_partition (".*", 1);
395
    Status = set_clear_partition(".*",1);
409
        }
396
    }
410
        else
397
  else
411
        {
398
    {
412
                for (i = 0; i < argc && Status == TCL_OK; i++)
399
    for(i=0;i<argc && Status == TCL_OK;i++)
413
                {
400
      {
414
                        Status = set_clear_partition (argv[i], 1);
401
      Status = set_clear_partition(argv[i],1);
415
                }
402
      }
416
        }
403
    }
417
        if (Status != TCL_OK)
404
  if(Status != TCL_OK)
418
        {
405
    {
419
                Log (LOG_ERROR, "-- ERROR with pattern '%s'\n", argv[i]);
406
    Log(LOG_ERROR,"-- ERROR with pattern '%s'\n",argv[i]);
420
        }
407
    }
421
        return (TCL_OK);
408
  return(TCL_OK);
422
}
409
  }
423
 
410
 
424
/*********************** Set Partition Command  ***************************/
411
/*********************** Set Partition Command  ***************************/
425
/*
412
/*
426
@title
413
@title
427
set all_par
414
set all_par
428
@application vertical_hdl
415
@application vertical_hdl
429
@text
416
@text
430
All sockets are selected for the partition. This can be used
417
All sockets are selected for the partition. This can be used
431
as part of the process of creating a top level wrapper for the
418
as part of the process of creating a top level wrapper for the
432
entire design in VHDL.
419
entire design in VHDL.
433
@break
420
@break
434
This is now no different from
421
This is now no different from
435
@listing
422
@listing
436
set partition
423
set partition
437
@end
424
@end
438
*/
425
*/
439
int SetPartAllHandler (ET_TCLARGS)
426
int SetPartAllHandler(ET_TCLARGS)
440
{
427
{
441
        name_routed_nets ();
428
  name_routed_nets();
442
        return set_clear_partition (".*", 1);
429
  return set_clear_partition(".*",1);
443
}
430
}
444
 
431
 
445
/*********************** Set name (of)  <id> (to) <name> Command  ***************************/
432
/*********************** Set name (of)  <id> (to) <name> Command  ***************************/
446
/*
433
/*
447
@title
434
@title
Line 461... Line 448...
461
by this command.
448
by this command.
462
@break
449
@break
463
Fails if the name is already in use in the design.
450
Fails if the name is already in use in the design.
464
@end
451
@end
465
*/
452
*/
466
int SetNameOfIdHandler (ET_TCLARGS)
453
int SetNameOfIdHandler(ET_TCLARGS)
467
{
454
{
468
        socket_t *chip;
455
  socket_t * chip;
469
        if (argc < 2)
456
   if (argc < 2)
470
                return (TCL_ERROR);
457
       return(TCL_ERROR);
471
 
458
 
472
        /* safety catch code added : is the name already in use ? */
459
/* safety catch code added : is the name already in use ? */
473
        chip = find_socket (Name, argv[1], Search, &socket_head);
460
   chip = find_socket(Name,argv[1],Search,&socket_head);
474
        if (chip)
461
   if(chip) {
-
 
462
     Log(LOG_ERROR,"Renaming socket id='%s' fails : name '%s' in use already\n",argv[0],argv[1]);
-
 
463
     return (TCL_ERROR);
475
        {
464
     };
476
                Log (
465
   
477
                    LOG_ERROR,
-
 
-
 
466
 
-
 
467
 
478
                    "Renaming socket id='%s' fails : name '%s' in use already\n",
468
   chip = find_socket(Ident,argv[0],Search,&socket_head);
479
                    argv[0],
469
   if(!chip) {
480
                    argv[1]);
470
     Log(LOG_ERROR,"Cannot find socket with ident='%s' to rename\n",argv[0]);
481
                return (TCL_ERROR);
471
     return (TCL_ERROR);
482
        };
472
     };
-
 
473
   set_socket(chip,Name,argv[1]);
-
 
474
   Log(LOG_GENERAL,"# Set name of socket ident='%s' to be '%s'\n",argv[0],argv[1]);
-
 
475
   return(TCL_OK);
-
 
476
 
483
 
477
 
484
        chip = find_socket (Ident, argv[0], Search, &socket_head);
-
 
485
        if (!chip)
-
 
486
        {
-
 
487
                Log (LOG_ERROR, "Cannot find socket with ident='%s' to rename\n", argv[0]);
-
 
488
                return (TCL_ERROR);
-
 
489
        };
-
 
490
        set_socket (chip, Name, argv[1]);
-
 
491
        Log (LOG_GENERAL, "# Set name of socket ident='%s' to be '%s'\n", argv[0], argv[1]);
-
 
492
        return (TCL_OK);
-
 
493
}
478
}
494
/*********************** Set Port Command  ***************************/
479
/*********************** Set Port Command  ***************************/
495
/* Forces the port to leave the partition */
480
/* Forces the port to leave the partition */
496
/*
481
/*
497
@title
482
@title
Line 513... Line 498...
513
@listing
498
@listing
514
partition
499
partition
515
set port divided_clock
500
set port divided_clock
516
@end
501
@end
517
*/
502
*/
518
int SetPortHandler (ET_TCLARGS)
503
int SetPortHandler(ET_TCLARGS)
519
{
504
{
520
        int i;
505
  int i;
-
 
506
 
-
 
507
  for(i=0;i<argc;i++){
521
 
508
 
522
        for (i = 0; i < argc; i++)
-
 
523
        {
-
 
524
                force_port (argv[i]);
509
      force_port(argv[i]);
525
        }
510
    }
526
        return (TCL_OK);
511
  return(TCL_OK);
527
}
512
 
-
 
513
  }
528
 
514
 
529
/*********************** Set Routable Command  ***************************/
515
/*********************** Set Routable Command  ***************************/
530
/* Sets nets to be routable  */
516
/* Sets nets to be routable  */
531
/*
517
/*
532
@title
518
@title
Line 537... Line 523...
537
Sets the routable flags on wildcarded nets.
523
Sets the routable flags on wildcarded nets.
538
VERTICAL will see these nets as routable and therefore
524
VERTICAL will see these nets as routable and therefore
539
use them for logic signal assignments.
525
use them for logic signal assignments.
540
@end
526
@end
541
*/
527
*/
542
int SetRouteHandler (ET_TCLARGS)
528
int SetRouteHandler(ET_TCLARGS)
543
{
529
{
544
        int i;
530
  int i;
545
 
531
 
546
        for (i = 0; i < argc; i++)
532
  for(i=0;i<argc;i++){
547
        {
-
 
548
                force_route (argv[i], Free);
533
    force_route(argv[i],Free);
549
        }
534
    }
550
        return (TCL_OK);
535
  return(TCL_OK);
551
}
536
  }
552
/*********************** Set High Command  ***************************/
537
/*********************** Set High Command  ***************************/
553
/* Sets nets to be not routable  */
538
/* Sets nets to be not routable  */
554
/*
539
/*
555
@title
540
@title
556
set high <net> <net> <net>
541
set high <net> <net> <net>
557
@application vertical_pin
542
@application vertical_pin
558
@application vertical_pcb
543
@application vertical_pcb
559
@text
544
@text
560
Sets the routing flags on wildcarded nets as Not_Routable_H
545
Sets the routing flags on wildcarded nets as Not_Routable_H
561
VERTICAL will see these nets as generally not routable for signals
546
VERTICAL will see these nets as generally not routable for signals
562
but pulled up to a logic '1'.
547
but pulled up to a logic '1'.
563
@end
548
@end
564
*/
549
*/
565
int SetHighHandler (ET_TCLARGS)
550
int SetHighHandler(ET_TCLARGS)
566
{
551
{
567
        int i;
552
  int i;
568
 
553
 
569
        for (i = 0; i < argc; i++)
554
  for(i=0;i<argc;i++){
570
        {
-
 
571
                force_route (argv[i], Not_Routable_H);
555
    force_route(argv[i],Not_Routable_H);
572
        }
556
    }
573
        return (TCL_OK);
557
  return(TCL_OK);
574
}
558
  }
575
 
559
 
576
/*********************** Set Low Command  ***************************/
560
/*********************** Set Low Command  ***************************/
577
/* Sets nets to be routable  */
561
/* Sets nets to be routable  */
578
/*
562
/*
579
@title
563
@title
Line 581... Line 565...
581
@application vertical_pin
565
@application vertical_pin
582
@application vertical_pcb
566
@application vertical_pcb
583
@text
567
@text
584
Sets the routing flags on wildcarded nets as Not_Routable_L
568
Sets the routing flags on wildcarded nets as Not_Routable_L
585
VERTICAL will see these nets as generally not routable for signals
569
VERTICAL will see these nets as generally not routable for signals
586
but pulled up to a logic '0'.
570
but pulled up to a logic '0'.
587
@end
571
@end
588
*/
572
*/
589
int SetLowHandler (ET_TCLARGS)
573
int SetLowHandler(ET_TCLARGS)
590
{
574
{
591
        int i;
575
  int i;
-
 
576
 
-
 
577
  for(i=0;i<argc;i++){
-
 
578
    force_route(argv[i],Not_Routable_L);
-
 
579
    }
-
 
580
  return(TCL_OK);
-
 
581
  }
592
 
582
 
593
        for (i = 0; i < argc; i++)
-
 
594
        {
-
 
595
                force_route (argv[i], Not_Routable_L);
-
 
596
        }
-
 
597
        return (TCL_OK);
-
 
598
}
-
 
599
 
583
 
600
/*********************** Set Group ***************************/
584
/*********************** Set Group ***************************/
601
/* Sets FastTrack routing flags */
585
/* Sets FastTrack routing flags */
602
/*
586
/*
603
@title
587
@title
604
set group <control> <socket> [ <socket> * ]
588
set group <control> <socket> [ <socket> * ]
605
@application vertical_hdl
589
@application vertical_hdl
606
@text
590
@text
607
Control is an integer value. Socket is a wildcard
591
Control is an integer value. Socket is a wildcard
Line 609... Line 593...
609
Pin group control flags are setup for each socket:
593
Pin group control flags are setup for each socket:
610
for each pin on that socket , while routing , if
594
for each pin on that socket , while routing , if
611
@listing
595
@listing
612
<pin group pin A> & <control>  == <pin group pin B> & <control>
596
<pin group pin A> & <control>  == <pin group pin B> & <control>
613
@text
597
@text
614
Then the pins are seen to be interchangeable within their groups. This allows for the
598
Then the pins are seen to be interchangeable within their groups. This allows for the scrambling of
615
scrambling of a databus for e.g. a RAM chip where data in and out are shared. Some address pins
599
a databus for e.g. a RAM chip where data in and out are shared. Some address pins could also be shared
616
could also be shared in this case.
600
in this case.
617
@break
601
@break
618
Quite often a pin would be given a pin group which is a power of 2:
602
Quite often a pin would be given a pin group which is a power of 2:
619
interchangeable address pins might be placed in group 1, interchangeable data pins in group 2.
603
interchangeable address pins might be placed in group 1, interchangeable data pins in group 2.
620
 
604
 
621
@end
605
@end
622
*/
606
*/
623
int SetGroupHandler (ET_TCLARGS)
607
int SetGroupHandler(ET_TCLARGS) {
624
{
608
 
625
        int i;
609
  int  i;
626
        long num;
610
  long num;
627
        if (argc == 0)
611
  if (argc == 0)
628
                return TCL_ERROR;
612
    return TCL_ERROR;
629
        num = atoi (argv[0]); /* 16 bit number */
613
  num = atoi(argv[0]); /* 16 bit number */
630
        for (i = 1; i < argc; i++)
614
  for (i=1;i<argc;i++ ){
631
        {
-
 
632
                set_group_route_flags (argv[i], (int) num);
615
      set_group_route_flags(argv[i],(int)num);  
633
        }
616
    }
634
        return TCL_OK;
617
  return TCL_OK;
635
}
618
  }
636
 
619
 
637
/*********************** Set Group ***************************/
620
/*********************** Set Group ***************************/
638
/* Sets FastTrack pin group membership on device pins */
621
/* Sets FastTrack pin group membership on device pins */
639
/*
622
/*
640
@title
623
@title
641
set pin_group <control> <socket_id>[(<pin_id>)]
624
set pin_group <control> <socket_id>[(<pin_id>)]
642
@application vertical_pin
625
@application vertical_pin
643
@text
626
@text
644
Control is an integer value.
627
Control is an integer value.
645
@break
628
@break
646
Pin group memberships are setup for each pin on each socket. Socket identifier and pin
629
Pin group memberships are setup for each pin on each socket. Socket identifier and pin identifiers can be wildcarded.
647
identifiers can be wildcarded. The pin identifier is wrapped by "()" brackets.
630
The pin identifier is wrapped by "()" brackets.
648
@listing
631
@listing
649
set pin_group 11 X.*(.*a)
632
set pin_group 11 X.*(.*a)
650
@text
633
@text
651
All pins on sockets with identifiers beginning with 'X' and whose pin identifier ends
634
All pins on sockets with identifiers beginning with 'X' and whose pin identifier ends
652
in 'a' are to be made a member of group 11.
635
in 'a' are to be made a member of group 11.
653
@listing
636
@listing
654
set pin_group 12 X12
637
set pin_group 12 X12
655
@text
638
@text
656
All pins on X12 are members of group 12; If the pin identifier is omitted this is the same as
639
All pins on X12 are members of group 12; If the pin identifier is omitted this is the same as 'all pins on the socket'. Otherwise pins with Id matching will be processed.
657
'all pins on the socket'. Otherwise pins with Id matching will be processed.
-
 
658
 
640
 
659
@end
641
@end
660
*/
642
*/
661
 
643
 
-
 
644
 
-
 
645
 
-
 
646
 
662
int SetPinGroupHandler (ET_TCLARGS)
647
int SetPinGroupHandler(ET_TCLARGS) {
663
{
648
 
664
        int i;
649
  int  i;
665
        long num;
650
  long num;
666
        if (argc == 0)
651
  if (argc == 0)
667
                return TCL_ERROR;
652
    return TCL_ERROR;
668
        num = atoi (argv[0]); /* 16 bit number */
653
  num = atoi(argv[0]); /* 16 bit number */
669
        for (i = 1; i < argc; i++)
654
  for (i=1;i<argc;i++ ){
670
        {
-
 
671
                set_pin_group_flags (argv[i], (int) num);
655
      set_pin_group_flags(argv[i],(int)num);  
672
        }
656
    }
673
        return TCL_OK;
657
  return TCL_OK;
674
}
658
  }
675
 
659
 
676
/*********************** Set External Command  ***************************/
660
/*********************** Set External Command  ***************************/
677
/* Sets sockets as external connections. Prevents 'rsvXXXXz' nets name
661
/* Sets sockets as external connections. Prevents 'rsvXXXXz' nets name
678
   from appearing on connected nets */
662
   from appearing on connected nets */
679
/*
663
/*
Line 714... Line 698...
714
So in this case e.g. X1, X2, X100, X101_a will all be labelled
698
So in this case e.g. X1, X2, X100, X101_a will all be labelled
715
as external.
699
as external.
716
Usage of set external is cumulative.
700
Usage of set external is cumulative.
717
@break
701
@break
718
Only external sockets are listed out in write vlog command
702
Only external sockets are listed out in write vlog command
719
to filter out unwanted sockets by deleting the external
703
to filter out unwanted sockets by deleting the external
720
property.
704
property.
721
@end
705
@end
722
*/
706
*/
723
int SetExternHandler (ET_TCLARGS)
707
int SetExternHandler(ET_TCLARGS)
724
{
708
{
725
        int i;
709
  int i;
726
        for (i = 0; i < argc; i++)
710
  for(i=0;i<argc;i++) {
727
        {
-
 
728
                set_external_flags (argv[i]);
711
    set_external_flags(argv[i]);
729
        }
712
    }
730
        return (TCL_OK);
713
  return(TCL_OK);
-
 
714
  }
-
 
715
 
731
}
716
 
732
 
717
 
733
/**************************************************************/
718
/**************************************************************/
734
/* wildcard setting of generics                               */
719
/* wildcard setting of generics                               */
735
/**************************************************************/
720
/**************************************************************/
736
 
721
 
737
static void set_wildcard_generic (char *template, generic_info_t *info)
722
static void set_wildcard_generic( char * template,
-
 
723
                                  generic_info_t * info)
738
{
724
  {
739
        int rc;
725
  int rc;
740
        socket_t *skt = socket_head;
726
  socket_t * skt = socket_head;
741
        int found = 0;
727
  int found = 0;
-
 
728
 
-
 
729
  /* compile regular expression */
-
 
730
  vert_regex_t * preg;
-
 
731
 
-
 
732
/* pick out a wildcard if all sockets then scope is the global generics */
-
 
733
  if(ISNULLSTR(template))
-
 
734
     {
-
 
735
     set_generic_value(&global_generics,info);
-
 
736
     return;
-
 
737
     }
742
 
738
 
743
        /* compile regular expression */
-
 
744
        vert_regex_t *preg;
-
 
745
 
739
 
746
        /* pick out a wildcard if all sockets then scope is the global generics */
-
 
747
        if (ISNULLSTR (template))
-
 
748
        {
-
 
749
                set_generic_value (&global_generics, info);
-
 
750
                return;
-
 
751
        }
-
 
752
 
740
 
753
        rc = vert_regcomp (&preg, template);
741
  rc = vert_regcomp(&preg,template);
-
 
742
 
-
 
743
  if (rc != 0 )
-
 
744
    {
-
 
745
    char errbuff[100];
-
 
746
    regerror(rc,preg->preg,errbuff,100);
-
 
747
    Log(LOG_ERROR,"-- Problem (rc=%d) %s with '%s' as regular expression\n",rc,errbuff,template);
-
 
748
   
-
 
749
    return /*TCL_ERROR*/;
-
 
750
    }
-
 
751
  else
-
 
752
    {
-
 
753
    Log(LOG_GENERAL,"-- Using '%s' as match pattern\n",template);
-
 
754
    }
-
 
755
 
-
 
756
  while(skt) {
-
 
757
    found  = regexec(preg->preg,skt->identifier,0,preg->regpatt,0);
-
 
758
    if(!found) {
-
 
759
      set_generic_value(&skt->generics,info);
-
 
760
      }
-
 
761
    skt = skt->next;
-
 
762
    }
754
 
763
 
755
        if (rc != 0)
764
  vert_regfree(&preg);
756
        {
765
  }
757
                char errbuff[100];
-
 
758
                regerror (rc, preg->preg, errbuff, 100);
-
 
759
                Log (
-
 
760
                    LOG_ERROR,
-
 
761
                    "-- Problem (rc=%d) %s with '%s' as regular expression\n",
-
 
762
                    rc,
-
 
763
                    errbuff,
-
 
764
                    template);
-
 
765
 
766
 
766
                return /*TCL_ERROR*/;
-
 
767
        }
-
 
768
        else
-
 
769
        {
-
 
770
                Log (LOG_GENERAL, "-- Using '%s' as match pattern\n", template);
-
 
771
        }
-
 
772
 
-
 
773
        while (skt)
-
 
774
        {
-
 
775
                found = regexec (preg->preg, skt->identifier, 0, preg->regpatt, 0);
-
 
776
                if (!found)
-
 
777
                {
-
 
778
                        set_generic_value (&skt->generics, info);
-
 
779
                }
-
 
780
                skt = skt->next;
-
 
781
        }
-
 
782
 
-
 
783
        vert_regfree (&preg);
-
 
784
}
-
 
785
 
767
 
786
/*********************** Set FPGA Command  ***************************/
768
/*********************** Set FPGA Command  ***************************/
787
/* Sets a socket as containing an FPGA : if set then a module declaration will not be made in
769
/* Sets a socket as containing an FPGA : if set then a module declaration will not be made in
788
   when writing VERILOG out  */
770
   when writing VERILOG out  */
789
/*
771
/*
790
@title
772
@title
791
set fpga <socket> <line_replacing_declaration>
773
set fpga <socket> <line_replacing_declaration>
792
@application vertical_hdl
774
@application vertical_hdl
793
@text
775
@text
794
Sets sockets as containing an FPGA : if set then a module declaration will not be made in
776
Sets sockets as containing an FPGA : if set then a module declaration will not be made in
795
   when writing VERILOG out
777
   when writing VERILOG out
796
@end
778
@end
797
*/
779
*/
798
int SetFPGAHandler (ET_TCLARGS)
780
int SetFPGAHandler(ET_TCLARGS)
799
{
781
{
800
        generic_info_t info;
782
  generic_info_t info;
801
        if (argc < 2)
783
  if(argc<2) {
802
        {
-
 
803
                Log (LOG_ERROR, "-- need 2 arguments to Set FPGA\n");
784
    Log(LOG_ERROR,"-- need 2 arguments to Set FPGA\n");
804
                return TCL_ERROR;
785
    return TCL_ERROR;
805
        }
786
    }
806
        info.name = "fpga_file";
787
  info.name     = "fpga_file";
807
        info.typename = "string";
788
  info.typename = "string";
808
        info.g_type = IS_ATTRIBUTE;
789
  info.g_type   = IS_ATTRIBUTE;
809
        info.expr = compile_expression_from_string (argv[1]);
790
  info.expr     = compile_expression_from_string(argv[1]);
810
        info.g_class = DEFINED;
791
  info.g_class  = DEFINED;
811
        set_wildcard_generic (argv[0], &info);
792
  set_wildcard_generic(argv[0],&info);
812
        set_FPGA_flags (argv[0]); /* set flags */
793
  set_FPGA_flags(argv[0]); /* set flags */
813
        return (TCL_OK);
794
  return(TCL_OK);
-
 
795
  }
814
}
796
 
815
 
797
 
816
/*********************** Set Generic String ***************************/
798
/*********************** Set Generic String ***************************/
817
/* Sets a named generic to a value or string */
799
/* Sets a named generic to a value or string */
818
/*
800
/*
819
@title
801
@title
820
set generic string <ident> <scope> <string>
802
set generic string <ident> <scope> <string>
821
@application vertical_hdl
803
@application vertical_hdl
822
@text
804
@text
823
This command sets up a generic identified by name as <ident>
805
This command sets up a generic identified by name as <ident>
824
(variable) to be a string value.
806
(variable) to be a string value.
825
@break
807
@break
826
If <scope> is "" then the scope of the generic is global, applied to all sockets and signals
808
If <scope> is "" then the scope of the generic is global, applied to all sockets and signals within the design
827
within the design
-
 
828
@listing
809
@listing
829
set generic string vhdl_basetype "" "std_logic_vector"
810
set generic string vhdl_basetype "" "std_logic_vector"
830
@text
811
@text
831
Will set up a global generic called vhdl_basetype with value "std_logic_vector"
812
Will set up a global generic called vhdl_basetype with value "std_logic_vector"
832
@break
813
@break
833
If <scope> is "*" then the generic is applied to all sockets. This is used to set a default
814
If <scope> is "*" then the generic is applied to all sockets. This is used to set a default value for all instances of that
834
value for all instances of that generic to the string value given. Its scope is local to each
815
generic to the string value given. Its scope is local to each socket. It can be overridden by
835
socket. It can be overridden by specific socket generic assignments.
816
specific socket generic assignments.
836
@break
817
@break
837
If <scope> is a wildcard (ends in "*")  then all of the sockets matching will have their
818
If <scope> is a wildcard (ends in "*")  then all of the sockets matching will have their generic values set.
838
generic values set.
-
 
839
@end
819
@end
840
*/
820
*/
841
int SetGenericStringHandler (ET_TCLARGS)
821
int SetGenericStringHandler(ET_TCLARGS) {
842
{
-
 
843
        generic_info_t info;
822
  generic_info_t info;
844
        if (argc < 3)
823
  if (argc < 3)
845
                return TCL_ERROR;
824
    return TCL_ERROR;
846
        info.name = argv[1];
825
  info.name = argv[1];
847
        info.typename = "string";
826
  info.typename = "string";
848
        info.g_type = IS_STRING;
827
  info.g_type   = IS_STRING;
849
        info.expr = compile_string (argv[2]);
828
  info.expr     = compile_string(argv[2]);
850
        set_wildcard_generic (argv[0], &info);
829
  set_wildcard_generic(argv[0],&info);
851
        return (TCL_OK);
830
  return(TCL_OK);
852
}
831
  }
853
/*********************** Set Generic Declaration ***************************/
832
/*********************** Set Generic Declaration ***************************/
854
/* Sets a named generic to a value or string */
833
/* Sets a named generic to a value or string */
855
/*
834
/*
856
@title
835
@title
857
set generic declaration <ident> <scope> <string>
836
set generic declaration <ident> <scope> <string>
858
@application vertical_hdl
837
@application vertical_hdl
859
@text
838
@text
860
This sets up generics which are string generics but which are used in Verilog declarations
839
This sets up generics which are string generics but which are used in Verilog declarations
861
for use with Certify. These are enclosed in verilog comments as pragmas when written out.
840
for use with Certify. These are enclosed in verilog comments as pragmas when written out.
862
@break
841
@break
863
See set generic string for more information.
842
See set generic string for more information.
864
@end
843
@end
865
*/
844
*/
866
int SetGenericDeclarationHandler (ET_TCLARGS)
845
int SetGenericDeclarationHandler(ET_TCLARGS) {
867
{
-
 
868
        generic_info_t info;
846
  generic_info_t info;
869
 
847
 
870
        info.name = argv[1];
848
  info.name = argv[1];
871
        info.typename = "string";
849
  info.typename = "string";
872
        info.g_class = DEFINED;
850
  info.g_class  = DEFINED;
873
        info.g_type = IS_DECLARATION_DIRECTIVE;
851
  info.g_type   = IS_DECLARATION_DIRECTIVE;
874
        info.expr = compile_string (argv[2]);
852
  info.expr     = compile_string(argv[2]);
875
        set_wildcard_generic (argv[0], &info);
853
  set_wildcard_generic(argv[0],&info);
876
        return (TCL_OK);
854
  return(TCL_OK);
877
}
855
  }
878
/*********************** Set Generic instance ***************************/
856
/*********************** Set Generic instance ***************************/
879
/* Sets a named generic to a value or string */
857
/* Sets a named generic to a value or string */
880
/*
858
/*
881
@title
859
@title
882
set generic instance <ident> <scope> <string>
860
set generic instance <ident> <scope> <string>
883
@application vertical_hdl
861
@application vertical_hdl
884
@text
862
@text
885
This sets up generics which are string generics but which are used in Verilog instances
863
This sets up generics which are string generics but which are used in Verilog instances
886
for use with Certify. These are enclosed in verilog comments as pragmas when written out.
864
for use with Certify. These are enclosed in verilog comments as pragmas when written out.
887
@break
865
@break
888
See set generic string for more information.
866
See set generic string for more information.
889
@end
867
@end
890
*/
868
*/
891
 
869
 
892
int SetGenericInstanceHandler (ET_TCLARGS)
870
int SetGenericInstanceHandler(ET_TCLARGS) {
893
{
-
 
894
        generic_info_t info;
871
  generic_info_t info;
895
        if (argc < 3)
872
  if (argc < 3)
896
                return TCL_ERROR;
873
    return TCL_ERROR;
897
        info.name = argv[1];
874
  info.name = argv[1];
898
        info.typename = "string";
875
  info.typename = "string";
899
        info.g_class = DEFINED;
876
  info.g_class  = DEFINED;
900
        info.g_type = IS_INSTANCE_DIRECTIVE;
877
  info.g_type   = IS_INSTANCE_DIRECTIVE;
901
        info.expr = compile_string (argv[2]);
878
  info.expr     = compile_string(argv[2]);
902
        set_wildcard_generic (argv[0], &info);
879
  set_wildcard_generic(argv[0],&info);
903
 
880
 
904
        return (TCL_OK);
881
  return(TCL_OK);
905
}
882
 
-
 
883
  }
906
/*********************** Set Generic Integer ***************************/
884
/*********************** Set Generic Integer ***************************/
907
/* Sets a named generic to an integer value*/
885
/* Sets a named generic to an integer value*/
908
/*
886
/*
909
@title
887
@title
910
set generic integer <ident> <scope> <expression>
888
set generic integer <ident> <scope> <expression>
911
@application vertical_hdl
889
@application vertical_hdl
912
@text
890
@text
913
This sets up generics which are integer expressions, usable in place of VHDL constant
891
This sets up generics which are integer expressions, usable in place of VHDL constant declarations in .acfp files.
914
declarations in .acfp files.
-
 
915
@break
892
@break
916
See set generic string for more information.
893
See set generic string for more information.
917
@end
894
@end
918
*/
895
*/
919
 
896
 
920
int SetGenericIntegerHandler (ET_TCLARGS)
-
 
921
{
-
 
922
        generic_info_t info;
-
 
923
        if (argc < 3)
-
 
924
                return TCL_ERROR;
-
 
925
        info.name = argv[1];
-
 
926
        info.typename = "integer";
-
 
927
        info.g_type = IS_INTEGER;
-
 
928
        info.g_class = DEFINED;
-
 
929
        info.expr = compile_expression_from_string (argv[2]); /* this needs to be altered */
-
 
930
 
897
 
-
 
898
int SetGenericIntegerHandler(ET_TCLARGS) {
-
 
899
  generic_info_t info;
-
 
900
  if (argc < 3)
-
 
901
    return TCL_ERROR;
-
 
902
  info.name = argv[1];
-
 
903
  info.typename = "integer";
-
 
904
  info.g_type   = IS_INTEGER;
-
 
905
  info.g_class  = DEFINED;
-
 
906
  info.expr     = compile_expression_from_string(argv[2]); /* this needs to be altered */
-
 
907
 
-
 
908
 
931
        set_wildcard_generic (argv[0], &info);
909
  set_wildcard_generic(argv[0],&info);
932
        return (TCL_OK);
910
  return(TCL_OK);
-
 
911
 
-
 
912
 
-
 
913
 
-
 
914
 
-
 
915
  }
933
}
916
 
934
 
917
 
935
/*********************** Set Generic Value ***************************/
918
/*********************** Set Generic Value ***************************/
936
/* Sets a named generic to an integer range : workout from range whether this is TO or DOWNTO
919
/* Sets a named generic to an integer range : workout from range whether this is TO or DOWNTO  */
937
 */
-
 
938
/*
920
/*
939
@title
921
@title
940
set generic value <ident> <scope> <expression>
922
set generic value <ident> <scope> <expression>
941
@application vertical_hdl
923
@application vertical_hdl
942
@text
924
@text
943
Sets a named generic to an integer range : workout from range whether this is TO or DOWNTO, (TO
925
Sets a named generic to an integer range : workout from range whether this is TO or DOWNTO, (TO has first expression less than second), usable in place of VHDL constant declarations in .acfp files.
944
has first expression less than second), usable in place of VHDL constant declarations in .acfp
-
 
945
files.
-
 
946
@break
926
@break
947
See set generic string for more information.
927
See set generic string for more information.
948
@end
928
@end
949
*/
929
*/
950
 
930
 
951
int SetGenericValueHandler (ET_TCLARGS)
931
int SetGenericValueHandler(ET_TCLARGS) {
952
{
932
 
953
        expression_t *p;
933
 expression_t * p;
954
        generic_info_t info;
934
  generic_info_t info ;
955
        if (argc < 3)
935
  if (argc<3)
956
                return (TCL_ERROR);
936
    return (TCL_ERROR);
957
 
937
 
958
        info.name = argv[1];
938
  info.name = argv[1];
959
 
939
 
-
 
940
 
960
        p = compile_expression_from_string (argv[2]);
941
  p   = compile_expression_from_string(argv[2]);
961
 
942
 
-
 
943
  if(p)
-
 
944
    {
-
 
945
    switch(p->opcode)
-
 
946
      {
962
        if (p)
947
      case TO:
-
 
948
      case DOWNTO:
963
        {
949
        {
964
                switch (p->opcode)
-
 
965
                {
-
 
966
                case TO:
-
 
967
                case DOWNTO:
-
 
968
                {
-
 
969
                        info.g_type = p->opcode;
950
        info.g_type = p->opcode;
970
                        info.typename = "integer range";
951
        info.typename = "integer range";
971
                        break;
-
 
972
                }
-
 
973
                case TXT_STRING:
-
 
974
                {
-
 
975
                        info.g_type = IS_STRING;
-
 
976
                        info.typename = "string";
-
 
977
                        break;
-
 
978
                }
-
 
979
                default:
-
 
980
                {
-
 
981
                        info.g_type = IS_INTEGER;
-
 
982
                        info.typename = "integer";
-
 
983
                        break;
-
 
984
                }
-
 
985
                }
952
        break;
986
        }
953
        }
-
 
954
      case TXT_STRING:
-
 
955
        {
-
 
956
        info.g_type   = IS_STRING;
-
 
957
        info.typename = "string";
-
 
958
        break;
-
 
959
        }
-
 
960
      default:
-
 
961
        {
-
 
962
        info.g_type   = IS_INTEGER;
-
 
963
        info.typename = "integer";
-
 
964
        break;
-
 
965
        }
-
 
966
      }
-
 
967
    }  
-
 
968
     
-
 
969
  info.g_class  = DEFINED;
-
 
970
  info.expr    = p;
-
 
971
       
-
 
972
  set_wildcard_generic(argv[0],&info);
-
 
973
  return(TCL_OK);
-
 
974
  }
987
 
975
 
988
        info.g_class = DEFINED;
-
 
989
        info.expr = p;
-
 
990
 
-
 
991
        set_wildcard_generic (argv[0], &info);
-
 
992
        return (TCL_OK);
-
 
993
}
-
 
994
 
976
 
995
/*********************** Set Generic Attribute ***************************/
977
/*********************** Set Generic Attribute ***************************/
996
/* Sets a named generic attribute to an integer value*/
978
/* Sets a named generic attribute to an integer value*/
997
/*
979
/*
998
@title
980
@title
999
set generic attribute <ident> <scope> <expression>
981
set generic attribute <ident> <scope> <expression>
1000
@application vertical_hdl
982
@application vertical_hdl
1001
@text
983
@text
1002
This sets up generics which are integer expressions, usable in place of VHDL constant
984
This sets up generics which are integer expressions, usable in place of VHDL constant declarations in .acfp files.
1003
declarations in .acfp files.
-
 
1004
@break
985
@break
1005
See set generic string for more information.
986
See set generic string for more information.
1006
@end
987
@end
1007
*/
988
*/
1008
 
989
 
-
 
990
 
1009
int SetGenericAttributeHandler (ET_TCLARGS)
991
int SetGenericAttributeHandler(ET_TCLARGS) {
1010
{
-
 
1011
        generic_info_t info;
992
  generic_info_t info;
1012
        if (argc < 3)
993
  if (argc < 3)
1013
                return TCL_ERROR;
994
    return TCL_ERROR;
1014
        info.name = argv[1];
995
  info.name = argv[1];
1015
        info.typename = "attribute";
996
  info.typename = "attribute";
1016
        info.g_type = IS_ATTRIBUTE;
997
  info.g_type   = IS_ATTRIBUTE;
1017
        info.expr = compile_expression_from_string (argv[2]);
998
  info.expr     = compile_expression_from_string(argv[2]);
1018
        info.g_class = DEFINED;
999
  info.g_class  = DEFINED;
1019
        set_wildcard_generic (argv[0], &info);
1000
  set_wildcard_generic(argv[0],&info);
1020
        return (TCL_OK);
1001
  return(TCL_OK);
1021
}
1002
  }
1022
 
1003
 
1023
/*********************** Set Generic Boolean ***************************/
1004
/*********************** Set Generic Boolean ***************************/
1024
/* Sets a named generic to an integer value*/
1005
/* Sets a named generic to an integer value*/
1025
/*
1006
/*
1026
@title
1007
@title
1027
set generic boolean <ident> <scope> <integer>
1008
set generic boolean <ident> <scope> <integer>
1028
@application vertical_hdl
1009
@application vertical_hdl
1029
@text
1010
@text
1030
This sets up booleans containing the value of boolean expressions, usable in place of VHDL
1011
This sets up booleans containing the value of boolean expressions, usable in place of VHDL constant declarations in .acfp files.
1031
constant declarations in .acfp files.
-
 
1032
@break
1012
@break
1033
Any non-zero integer is TRUE, and zero is FALSE.
1013
Any non-zero integer is TRUE, and zero is FALSE.
1034
@break
1014
@break
1035
See set generic string for more information.
1015
See set generic string for more information.
1036
@end
1016
@end
1037
*/
1017
*/
1038
 
1018
 
1039
int SetGenericBooleanHandler (ET_TCLARGS)
-
 
1040
{
-
 
1041
        generic_info_t info;
-
 
1042
        if (argc < 3)
-
 
1043
                return TCL_ERROR;
-
 
1044
        info.name = argv[1];
-
 
1045
        info.typename = "integer";
-
 
1046
        info.g_type = IS_BOOLEAN;
-
 
1047
        /* think about using : convert_num(char * string,int * value) */
-
 
1048
        info.expr =
-
 
1049
            compile_expression_from_string (argv[2]); /* Can use true/false as well now ... */
-
 
1050
        set_wildcard_generic (argv[0], &info);
-
 
1051
        return (TCL_OK);
-
 
1052
}
-
 
1053
 
1019
 
-
 
1020
int SetGenericBooleanHandler(ET_TCLARGS) {
-
 
1021
  generic_info_t info;
-
 
1022
  if (argc < 3)
-
 
1023
    return TCL_ERROR;
-
 
1024
  info.name = argv[1];
-
 
1025
  info.typename = "integer";
-
 
1026
  info.g_type   = IS_BOOLEAN;
-
 
1027
/* think about using : convert_num(char * string,int * value) */
-
 
1028
  info.expr     = compile_expression_from_string(argv[2]); /* Can use true/false as well now ... */
-
 
1029
  set_wildcard_generic(argv[0],&info);
-
 
1030
  return(TCL_OK);
-
 
1031
  }
-
 
1032
 
-
 
1033
 
-
 
1034
 
-
 
1035
 
1054
/*********************** Set Generic Menu ***************************/
1036
/*********************** Set Generic Menu ***************************/
1055
/* Sets a named generic to a value or string */
1037
/* Sets a named generic to a value or string */
1056
 
1038
 
1057
CommandMenu const SetGenericMenu = {{"attribute",
1039
  CommandMenu SetGenericMenu= {
1058
                               3,
-
 
1059
                               SetGenericAttributeHandler,
1040
    {"attribute", 3, SetGenericAttributeHandler,NULL,
1060
                               NULL,
-
 
1061
                               "Integer instance attribute",
1041
                     "Integer instance attribute",
1062
                               "<socket*>|\"\" <name> <value>",
1042
                     "<socket*>|\"\" <name> <value>",NULL},
1063
                               NULL},
-
 
1064
                              {"string",
-
 
1065
                               3,
-
 
1066
                               SetGenericStringHandler,
1043
    {"string",    3, SetGenericStringHandler,NULL,
1067
                               NULL,
-
 
1068
                               "String constant",
1044
                     "String constant",
1069
                               "<socket*>|\"\" <name> <string text>",
1045
                     "<socket*>|\"\" <name> <string text>",NULL},
1070
                               NULL},
-
 
1071
                              {"integer",
-
 
1072
                               3,
-
 
1073
                               SetGenericIntegerHandler,
1046
    {"integer",    3, SetGenericIntegerHandler,NULL,
1074
                               NULL,
-
 
1075
                               "Integer constant expression",
1047
                     "Integer constant expression",
1076
                               "<socket*>|\"\" <name> <value>",
1048
                     "<socket*>|\"\" <name> <value>",NULL},
1077
                               NULL},
-
 
1078
                              {"boolean",
-
 
1079
                               3,
-
 
1080
                               SetGenericBooleanHandler,
1049
    {"boolean",    3, SetGenericBooleanHandler,NULL,
1081
                               NULL,
-
 
1082
                               "Boolean constant",
1050
                     "Boolean constant",
1083
                               "<socket*>|\"\" <name> <value>",
1051
                     "<socket*>|\"\" <name> <value>",NULL},
1084
                               NULL},
-
 
1085
                              {"value",
-
 
1086
                               3,
-
 
1087
                               SetGenericValueHandler,
1052
     {"value",     3, SetGenericValueHandler,NULL,
1088
                               NULL,
-
 
1089
                               "Generic expression",
1053
                     "Generic expression",
1090
                               "<socket*>|\"\" <name> <expression>",
1054
                     "<socket*>|\"\" <name> <expression>",NULL},
1091
                               NULL},
-
 
1092
                              {"declaration",
-
 
1093
                               3,
-
 
1094
                               SetGenericDeclarationHandler,
1055
    {"declaration", 3, SetGenericDeclarationHandler,NULL,
1095
                               NULL,
-
 
1096
                               "Certify .vb declaration directive",
1056
                     "Certify .vb declaration directive",
1097
                               "<socket*>|\"\" <name> <value>",
1057
                     "<socket*>|\"\" <name> <value>",NULL},
1098
                               NULL},
-
 
1099
                              {"instance",
-
 
1100
                               3,
-
 
1101
                               SetGenericInstanceHandler,
1058
    {"instance",     3, SetGenericInstanceHandler,NULL,
1102
                               NULL,
-
 
1103
                               "Certify .vb instance directive",
1059
                     "Certify .vb instance directive",
1104
                               "<socket*>|\"\" <name> <value>",
1060
                     "<socket*>|\"\" <name> <value>",NULL},
1105
                               NULL},
-
 
1106
                              {NULL, 0, NULL, NULL, NULL}
1061
    { NULL,0,NULL,NULL,NULL}
-
 
1062
 
1107
 
1063
 
1108
};
1064
 };
1109
 
1065
 
1110
/*********************** Set Command  ***************************/
1066
/*********************** Set Command  ***************************/
1111
 
1067
 
1112
CommandMenu const SetMenu = {
1068
  CommandMenu SetMenu = {
1113
    {"id_of_name",
-
 
1114
     2,
-
 
1115
     SetIdOfNameHandler,
1069
    {"id_of_name",    2, SetIdOfNameHandler,NULL,
1116
     NULL,
-
 
1117
     "Set Identifier for Name",
1070
                     "Set Identifier for Name",
1118
     "<device_name> <new_id>",
1071
                     "<device_name> <new_id>",NULL},
1119
     NULL},
-
 
1120
    {"name_id",
-
 
1121
     2,
-
 
1122
     SetNameOfIdHandler,
1072
    {"name_id",    2, SetNameOfIdHandler,NULL,
1123
     NULL,
-
 
1124
     "Sets name for socket identifier",
1073
                     "Sets name for socket identifier",
1125
     "<device_id> <new_name>",
1074
                     "<device_id> <new_name>",NULL},
1126
     NULL},
-
 
1127
    {"type_id",
-
 
1128
     6,
-
 
1129
     SetTypeOfIDHandler,
1075
    {"type_id",     6, SetTypeOfIDHandler,NULL,
1130
     NULL,
-
 
1131
     "Sets type for socket identifier",
1076
                     "Sets type for socket identifier",
1132
     "<device_id> <new_type>",
1077
                     "<device_id> <new_type>",NULL},
1133
     NULL},
-
 
1134
    {"type_name",
-
 
1135
     2,
-
 
1136
     SetTypeOfNameHandler,
1078
    {"type_name",     2, SetTypeOfNameHandler,NULL,
1137
     NULL,
-
 
1138
     "Sets type for device named",
1079
                     "Sets type for device named",
1139
     "<device_name> <new_type>",
1080
                     "<device_name> <new_type>",NULL},
1140
     NULL},
-
 
1141
    {"partition", 3, SetPartHandler, NULL, "Sets partition list", "<socket_name>*", NULL},
1081
    {"partition",    3, SetPartHandler,NULL,
1142
    {"all_partition",
1082
                     "Sets partition list",
1143
     5,
1083
                     "<socket_name>*",NULL},
1144
     SetPartAllHandler,
1084
    {"all_partition",5, SetPartAllHandler,NULL,
1145
     NULL,
-
 
1146
     "Sets partition list to all sockets",
1085
                     "Sets partition list to all sockets",
1147
     "",
-
 
1148
     NULL},
1086
                     "",NULL},
1149
    {"port",
-
 
1150
     3,
-
 
1151
     SetPortHandler,
1087
    {"port",         3, SetPortHandler,NULL,
1152
     NULL,
-
 
1153
     "Forces port on partition if used inside",
1088
                     "Forces port on partition if used inside",
1154
     "<net_name_prefix>*",
1089
                     "<net_name_prefix>*",NULL},
1155
     NULL},
1090
    {"routable", 3,  SetRouteHandler,NULL,
1156
    {"routable", 3, SetRouteHandler, NULL, "Flags routed nets as routable", "<net_id>*", NULL},
1091
                     "Flags routed nets as routable",
1157
    {"high",
1092
                     "<net_id>*",NULL},
1158
     3,
-
 
1159
     SetHighHandler,
1093
    {"high", 3,      SetHighHandler,NULL,
1160
     NULL,
-
 
1161
     "Flags routed nets as not routable logic 1",
1094
                     "Flags routed nets as not routable logic 1",
1162
     "<net_id>*",
1095
                     "<net_id>*",NULL},
1163
     NULL},
-
 
1164
    {"low",
-
 
1165
     3,
-
 
1166
     SetLowHandler,
1096
    {"low", 3,       SetLowHandler,NULL,
1167
     NULL,
-
 
1168
     "Flags routed nets as not routable logic 0",
1097
                     "Flags routed nets as not routable logic 0",
1169
     "<net_id>*",
1098
                     "<net_id>*",NULL},
1170
     NULL},
-
 
1171
    {"external",
-
 
1172
     3,
-
 
1173
     SetExternHandler,
1099
    {"external",     3, SetExternHandler,NULL,
1174
     NULL,
-
 
1175
     "Sets socket IDs prefixed by prefix as external",
1100
                     "Sets socket IDs prefixed by prefix as external",
1176
     "<prefix>*",
1101
                     "<prefix>*",NULL},
1177
     NULL},
-
 
1178
    {"fpga",
-
 
1179
     3,
-
 
1180
     SetFPGAHandler,
1102
    {"fpga",        3, SetFPGAHandler,NULL,
1181
     NULL,
-
 
1182
     "Sets socket IDs prefixed by prefix as being FPGA: no Verilog declaration",
1103
                     "Sets socket IDs prefixed by prefix as being FPGA: no Verilog declaration",
1183
     "<prefix>*",
1104
                     "<prefix>*",NULL},
1184
     NULL},
-
 
1185
    {"group",
-
 
1186
     3,
-
 
1187
     SetGroupHandler,
1105
    {"group",     3, SetGroupHandler,NULL,
1188
     NULL,
-
 
1189
     "Enables 'FastTrack group' routing: 1=row 2=col 3=both",
1106
                     "Enables 'FastTrack group' routing: 1=row 2=col 3=both",
1190
     "<mask_value> [<id_prefix>*]",
1107
                     "<mask_value> [<id_prefix>*]",NULL},
1191
     NULL},
-
 
1192
    {"pin_group",
-
 
1193
     3,
-
 
1194
     SetPinGroupHandler,
1108
    {"pin_group",     3, SetPinGroupHandler,NULL,
1195
     NULL,
-
 
1196
     "Sets pin group membership on pins of devices",
1109
                     "Sets pin group membership on pins of devices",
1197
     "<group> <id_prefix>[(<pin_prefix>)]",
1110
                     "<group> <id_prefix>[(<pin_prefix>)]",NULL},
1198
     NULL},
1111
    {"generic",  3, NULL,SetGenericMenu,
1199
    {"generic", 3, NULL, SetGenericMenu, "Sets generic value  ", "more", NULL},
1112
                     "Sets generic value  ",
-
 
1113
                     "more",NULL},
1200
    {NULL, 0, NULL, NULL, NULL, NULL},
1114
    { NULL,0,NULL,NULL,NULL,NULL},
-
 
1115
 
-
 
1116
    };
1201
 
1117
 
1202
};
-
 
1203
 
1118
 
1204
/*********************** Delete Port Command  ***************************/
1119
/*********************** Delete Port Command  ***************************/
1205
/* Deletes the ports from the partition */
1120
/* Deletes the ports from the partition */
1206
/*
1121
/*
1207
@title
1122
@title
Line 1218... Line 1133...
1218
by default, as there is a driver inside each EPLD and inputs
1133
by default, as there is a driver inside each EPLD and inputs
1219
in each EPLD, then there will be multiple driver conflicts on
1134
in each EPLD, then there will be multiple driver conflicts on
1220
the breadboard.
1135
the breadboard.
1221
@end
1136
@end
1222
*/
1137
*/
1223
int DelPortHandler (ET_TCLARGS)
1138
int DelPortHandler(ET_TCLARGS)
1224
{
1139
{
1225
        int i;
1140
  int i;
1226
        for (i = 0; i < argc; i++)
1141
  for(i=0;i<argc;i++) {
1227
        {
-
 
1228
                delete_port (argv[i]);
1142
    delete_port(argv[i]);
1229
        }
1143
  }
1230
        return (TCL_OK);
1144
  return(TCL_OK);
1231
}
1145
}
1232
 
1146
 
-
 
1147
 
1233
/*********************** Set Not Routable Command  ***************************/
1148
/*********************** Set Not Routable Command  ***************************/
1234
/* Sets nets to be not routable  */
1149
/* Sets nets to be not routable  */
1235
/*
1150
/*
1236
@title
1151
@title
1237
delete route <net> [ <net> ] *
1152
delete route <net> [ <net> ] *
1238
@application vertical_pin
1153
@application vertical_pin
1239
@application vertical_hdl
1154
@application vertical_hdl
1240
@application vertical_pcb
1155
@application vertical_pcb
1241
@text
1156
@text
1242
Remove the routable property from the named nets. These nets will not be used in routing by
1157
Remove the routable property from the named nets. These nets will not be used in routing by vertical.
1243
vertical.
-
 
1244
@listing
1158
@listing
1245
del route VCC.* GND.* NCONFIG CONF_DONE
1159
del route VCC.* GND.* NCONFIG CONF_DONE
1246
@text
1160
@text
1247
Will ensure that these nets are set as not routable.
1161
Will ensure that these nets are set as not routable.
1248
This is often seen in netlist import scripts.
1162
This is often seen in netlist import scripts.
1249
@end
1163
@end
1250
*/
1164
*/
1251
int DelRouteHandler (ET_TCLARGS)
1165
int DelRouteHandler(ET_TCLARGS)
1252
{
1166
{
1253
        int i;
1167
  int i;
1254
        for (i = 0; i < argc; i++)
1168
  for(i=0;i<argc;i++) {
1255
        {
-
 
1256
                force_route (argv[i], Not_Routable);
1169
    force_route(argv[i],Not_Routable);
1257
        }
1170
    }
1258
        return (TCL_OK);
1171
  return(TCL_OK);
1259
}
1172
}
1260
 
1173
 
-
 
1174
 
-
 
1175
 
1261
/*********************** Delete NetName Command  ***************************/
1176
/*********************** Delete NetName Command  ***************************/
1262
/* Deletes the name fileds form nets by ID  from the partition */
1177
/* Deletes the name fileds form nets by ID  from the partition */
1263
/*
1178
/*
1264
@title
1179
@title
1265
delete netname <net> [ <net> ] *
1180
delete netname <net> [ <net> ] *
1266
@application vertical_pin
1181
@application vertical_pin
1267
@application vertical_hdl
1182
@application vertical_hdl
1268
@application vertical_pcb
1183
@application vertical_pcb
1269
@text
1184
@text
1270
The signal names assigned to the nets are removed, so that clean netlists are
1185
The signal names assigned to the nets are removed, so that clean netlists are
1271
written out without any routing history. Use this if when importing netlists,
1186
written out without any routing history. Use this if when importing netlists,
1272
where the net names used may match those in the as yet unrouted design that
1187
where the net names used may match those in the as yet unrouted design that
1273
will use those nets. Routing that tries to reuse nets which were previously
1188
will use those nets. Routing that tries to reuse nets which were previously
1274
used will be confused by names appearing on the nets.
1189
used will be confused by names appearing on the nets.
1275
@end
1190
@end
1276
*/
1191
*/
1277
 
1192
 
1278
int DelNetNameHandler (ET_TCLARGS)
1193
int DelNetNameHandler(ET_TCLARGS)
1279
{
1194
{
1280
        int i;
1195
  int i;
1281
        for (i = 0; i < argc; i++)
1196
  for(i=0;i<argc;i++) {
1282
        {
-
 
1283
                del_net_names (argv[i]);
1197
    del_net_names(argv[i]);
1284
        }
1198
    }
1285
        return (TCL_OK);
1199
  return(TCL_OK);
1286
}
1200
}
1287
/*********************** Delete Port Command  ***************************/
1201
/*********************** Delete Port Command  ***************************/
1288
/* Clears the is_external bits on all sockets */
1202
/* Clears the is_external bits on all sockets */
1289
/*
1203
/*
1290
@title
1204
@title
Line 1295... Line 1209...
1295
@text
1209
@text
1296
This clears the external attribute flags from all sockets. The
1210
This clears the external attribute flags from all sockets. The
1297
name matching rules are the same as for set external command
1211
name matching rules are the same as for set external command
1298
@end
1212
@end
1299
*/
1213
*/
1300
int DelExternHandler (ET_TCLARGS)
1214
int DelExternHandler(ET_TCLARGS)
1301
{
1215
{
1302
        int i;
1216
  int i;
1303
        for (i = 0; i < argc; i++)
1217
  for(i=0;i<argc;i++) {
1304
        {
-
 
1305
                clear_external_flags (argv[i]);
1218
    clear_external_flags(argv[i]);
1306
        }
1219
    }
1307
        return (TCL_OK);
1220
  return(TCL_OK);
1308
}
1221
  }
1309
 
1222
 
1310
/*********************** Delete Port Command  ***************************/
1223
/*********************** Delete Port Command  ***************************/
1311
/* Clears the is_FPGA bits on all sockets */
1224
/* Clears the is_FPGA bits on all sockets */
1312
/*
1225
/*
1313
@title
1226
@title
Line 1316... Line 1229...
1316
@text
1229
@text
1317
This clears the FPGA attribute flags from all sockets. The
1230
This clears the FPGA attribute flags from all sockets. The
1318
name matching rules are the same as for set FPGA command
1231
name matching rules are the same as for set FPGA command
1319
@end
1232
@end
1320
*/
1233
*/
1321
int DelFPGAHandler (ET_TCLARGS)
1234
int DelFPGAHandler(ET_TCLARGS)
1322
{
1235
{
1323
        int i;
1236
  int i;
1324
        for (i = 0; i < argc; i++)
1237
  for(i=0;i<argc;i++) {
1325
        {
-
 
1326
                clear_FPGA_flags (argv[i]);
1238
    clear_FPGA_flags(argv[i]);
1327
        }
1239
    }
1328
        return (TCL_OK);
1240
  return(TCL_OK);
1329
}
1241
  }
1330
 
1242
 
1331
/*********************** Delete Partition Command  ***************************/
1243
/*********************** Delete Partition Command  ***************************/
1332
/* Clears the partition selection on all sockets */
1244
/* Clears the partition selection on all sockets */
1333
/*
1245
/*
1334
@title
1246
@title
Line 1337... Line 1249...
1337
@text
1249
@text
1338
This clears the partition flags from wildcarded named sockets. The
1250
This clears the partition flags from wildcarded named sockets. The
1339
name matching rules are the same as for set partition command
1251
name matching rules are the same as for set partition command
1340
@break
1252
@break
1341
If no arguments are given this results in routing created for the partition being
1253
If no arguments are given this results in routing created for the partition being
1342
ripped up. Use
1254
ripped up. Use
1343
@listing
1255
@listing
1344
delete partition
1256
delete partition
1345
@text
1257
@text
1346
to clean up
1258
to clean up
1347
@end
1259
@end
1348
*/
1260
*/
1349
int DelPartitionHandler (ET_TCLARGS)
1261
int DelPartitionHandler(ET_TCLARGS)
1350
{
1262
  {
1351
        int i, Status = TCL_OK;
1263
  int i,Status = TCL_OK;
1352
        if (argc == 0)
1264
  if (argc==0)
1353
        {
1265
    {
1354
                clear_partition_nets ();
1266
    clear_partition_nets();
1355
                Status = set_clear_partition (".*", 0);
1267
    Status = set_clear_partition(".*",0);
-
 
1268
    }
-
 
1269
 
-
 
1270
  for(i=0;i<argc && Status == TCL_OK;i++){
-
 
1271
    Status = set_clear_partition(argv[i],0);
-
 
1272
    }
-
 
1273
  if(Status != TCL_OK)
-
 
1274
    {
-
 
1275
    Log(LOG_ERROR,"-- ERROR with pattern '%s'\n",argv[i]);
1356
        }
1276
    }
-
 
1277
  return(Status);
-
 
1278
  }
1357
 
1279
 
1358
        for (i = 0; i < argc && Status == TCL_OK; i++)
-
 
1359
        {
-
 
1360
                Status = set_clear_partition (argv[i], 0);
-
 
1361
        }
-
 
1362
        if (Status != TCL_OK)
-
 
1363
        {
-
 
1364
                Log (LOG_ERROR, "-- ERROR with pattern '%s'\n", argv[i]);
-
 
1365
        }
-
 
1366
        return (Status);
-
 
1367
}
-
 
1368
 
1280
 
1369
/*********************** Delete Generic Command  ***************************/
1281
/*********************** Delete Generic Command  ***************************/
1370
/*
1282
/*
1371
@title
1283
@title
1372
delete generic <generic_name> <scope>
1284
delete generic <generic_name> <scope>
1373
@application vertical_hdl
1285
@application vertical_hdl
1374
@text
1286
@text
1375
This function will delete any generic given in either global generics or all sockets matching
1287
This function will delete any generic given in either global generics or all sockets matching pattern.
1376
pattern. See set generic for naming rules.
1288
See set generic for naming rules.
1377
@end
1289
@end
1378
*/
1290
*/
1379
int DelGenericHandler (ET_TCLARGS)
1291
int DelGenericHandler(ET_TCLARGS)
1380
{
1292
  {
1381
        generic_info_t info;
1293
  generic_info_t info ;
1382
        int rc;
1294
  int rc;
1383
        socket_t *skt = socket_head;
1295
  socket_t * skt = socket_head;
1384
        int found = 0;
1296
  int found = 0;
1385
        /* compile regular expression */
1297
  /* compile regular expression */
1386
        vert_regex_t *preg;
1298
  vert_regex_t * preg;
-
 
1299
 
-
 
1300
  if (argc<2)
-
 
1301
    return (TCL_ERROR);
-
 
1302
 
-
 
1303
 
-
 
1304
  info.name = argv[1];
-
 
1305
 
-
 
1306
/* pick out a wildcard if all sockets then scope is the global generics */
-
 
1307
  if(ISNULLSTR(argv[0]))
-
 
1308
     {
-
 
1309
     del_generic_value(&global_generics,&info);
-
 
1310
     return 0;
-
 
1311
     }
1387
 
1312
 
1388
        if (argc < 2)
-
 
1389
                return (TCL_ERROR);
-
 
1390
 
1313
 
1391
        info.name = argv[1];
-
 
1392
 
1314
 
1393
        /* pick out a wildcard if all sockets then scope is the global generics */
1315
  rc = vert_regcomp(&preg,argv[0]);
-
 
1316
 
1394
        if (ISNULLSTR (argv[0]))
1317
  if (rc != 0 )
1395
        {
1318
    {
-
 
1319
    char errbuff[100];
1396
                del_generic_value (&global_generics, &info);
1320
    regerror(rc,preg->preg,errbuff,100);
-
 
1321
    Log(LOG_ERROR,"-- Problem (rc=%d) %s with '%s' as regular expression\n",rc,errbuff,argv[0]);
-
 
1322
   
1397
                return 0;
1323
    return TCL_ERROR;
-
 
1324
    }
-
 
1325
  else
-
 
1326
    {
-
 
1327
    Log(LOG_GENERAL,"-- Using '%s' as match pattern\n",argv[0]);
1398
        }
1328
    }
1399
 
1329
 
1400
        rc = vert_regcomp (&preg, argv[0]);
-
 
1401
 
1330
 
1402
        if (rc != 0)
-
 
1403
        {
-
 
1404
                char errbuff[100];
-
 
1405
                regerror (rc, preg->preg, errbuff, 100);
-
 
1406
                Log (
-
 
1407
                    LOG_ERROR,
-
 
1408
                    "-- Problem (rc=%d) %s with '%s' as regular expression\n",
-
 
1409
                    rc,
-
 
1410
                    errbuff,
-
 
1411
                    argv[0]);
-
 
1412
 
1331
 
1413
                return TCL_ERROR;
-
 
1414
        }
-
 
1415
        else
-
 
1416
        {
-
 
1417
                Log (LOG_GENERAL, "-- Using '%s' as match pattern\n", argv[0]);
-
 
1418
        }
-
 
1419
 
1332
 
1420
        while (skt)
1333
  while(skt) {
1421
        {
-
 
1422
                found = regexec (preg->preg, skt->identifier, 0, preg->regpatt, 0);
1334
    found  = regexec(preg->preg,skt->identifier,0,preg->regpatt,0);
1423
                if (!found)
-
 
1424
                {
1335
    if(!found) {
1425
                        del_generic_value (&skt->generics, &info);
1336
      del_generic_value(&skt->generics,&info);
1426
                }
1337
      }
1427
                skt = skt->next;
1338
    skt = skt->next;
1428
        }
1339
    }
1429
        vert_regfree (&preg);
1340
  vert_regfree(&preg);
1430
        return 0;
1341
  return 0;
-
 
1342
  }
-
 
1343
 
1431
}
1344
 
1432
 
1345
 
1433
/*********************** Delete Command  ***************************/
1346
/*********************** Delete Command  ***************************/
1434
 
1347
 
1435
CommandMenu const DeleteMenu = {
-
 
1436
    {"port",
-
 
1437
     2,
-
 
1438
     DelPortHandler,
-
 
1439
     NULL,
-
 
1440
     "Remove port from partition",
-
 
1441
     "<net_name_prefix>* ",
-
 
1442
     NULL},
-
 
1443
    {"routable",
-
 
1444
     3,
-
 
1445
     DelRouteHandler,
-
 
1446
     NULL,
-
 
1447
     "Flags routed nets as NOT_ROUTABLE",
-
 
1448
     "<net_id>*",
-
 
1449
     NULL},
-
 
1450
    {"netname", 3, DelNetNameHandler, NULL, "Remove name from nets by ID", "<net_ID>*", NULL},
-
 
1451
    {"external",
-
 
1452
     3,
-
 
1453
     DelExternHandler,
-
 
1454
     NULL,
-
 
1455
     "Set sockets as being internal",
-
 
1456
     "<name_prefix>*",
-
 
1457
     NULL},
-
 
1458
    {"fpga",
-
 
1459
     3,
-
 
1460
     DelFPGAHandler,
-
 
1461
     NULL,
-
 
1462
     "Set sockets as not being FPGA: Verilog declaration given",
-
 
1463
     "<name_prefix>*",
-
 
1464
     NULL},
-
 
1465
    {"generic",
-
 
1466
     3,
-
 
1467
     DelGenericHandler,
-
 
1468
     NULL,
-
 
1469
     "Removes generic values from sockets",
-
 
1470
     "<socket>* <generic_name>",
-
 
1471
     NULL},
-
 
1472
    {"partition", 3, DelPartitionHandler, NULL, "Clear the partition list", "", NULL},
-
 
1473
    {NULL, 0, NULL, NULL, NULL}
-
 
1474
 
1348
 
1475
};
1349
 
-
 
1350
  CommandMenu DeleteMenu= {
-
 
1351
    {"port",    2, DelPortHandler,NULL,
-
 
1352
                     "Remove port from partition",
-
 
1353
                     "<net_name_prefix>* ",NULL},
-
 
1354
    {"routable", 3,  DelRouteHandler,NULL,
-
 
1355
                     "Flags routed nets as NOT_ROUTABLE",
-
 
1356
                     "<net_id>*",NULL},
-
 
1357
    {"netname",    3, DelNetNameHandler,NULL,
-
 
1358
                     "Remove name from nets by ID",
-
 
1359
                     "<net_ID>*",NULL},
-
 
1360
    {"external",    3, DelExternHandler,NULL,
-
 
1361
                     "Set sockets as being internal",
-
 
1362
                     "<name_prefix>*",NULL},
-
 
1363
    {"fpga",        3, DelFPGAHandler,NULL,
-
 
1364
                     "Set sockets as not being FPGA: Verilog declaration given",
-
 
1365
                     "<name_prefix>*",NULL},
-
 
1366
    {"generic",     3, DelGenericHandler,NULL,
-
 
1367
                     "Removes generic values from sockets",
-
 
1368
                     "<socket>* <generic_name>",NULL},
-
 
1369
    {"partition",   3, DelPartitionHandler,NULL,
-
 
1370
                     "Clear the partition list",
-
 
1371
                     "",NULL},
-
 
1372
    { NULL,0,NULL,NULL,NULL}
-
 
1373
 
-
 
1374
    };
-
 
1375
 
1476
 
1376
 
1477
/*********************** Partial routing calls ***************************/
1377
/*********************** Partial routing calls ***************************/
1478
 
1378
 
1479
/*********************** Route By Path ***************************/
1379
/*********************** Route By Path ***************************/
1480
/*
1380
/*
Line 1489... Line 1389...
1489
net.
1389
net.
1490
@end
1390
@end
1491
*/
1391
*/
1492
 
1392
 
1493
int RoutePathHandler (ET_TCLARGS)
1393
int RoutePathHandler (ET_TCLARGS)
1494
{
1394
   {
1495
        Log (LOG_GENERAL, "#begin routing\n");
1395
   Log (LOG_GENERAL, "#begin routing\n");
1496
        perform_routing (By_Net);
1396
   perform_routing(By_Net);
1497
        Log (LOG_GENERAL, "#done routing\n");
1397
   Log (LOG_GENERAL, "#done routing\n");
1498
        return (TCL_OK);
1398
   return (TCL_OK);
1499
}
1399
   }
1500
/*********************** Route By Exact Path ***************************/
1400
/*********************** Route By Exact Path ***************************/
1501
/*
1401
/*
1502
@title
1402
@title
1503
preroute EXact
1403
preroute EXact
1504
@application vertical_pin
1404
@application vertical_pin
Line 1516... Line 1416...
1516
if this is used.
1416
if this is used.
1517
@end
1417
@end
1518
*/
1418
*/
1519
 
1419
 
1520
int RouteExactPathHandler (ET_TCLARGS)
1420
int RouteExactPathHandler (ET_TCLARGS)
1521
{
1421
   {
1522
        Log (LOG_GENERAL, "#begin routing\n");
1422
   Log (LOG_GENERAL, "#begin routing\n");
1523
        perform_routing (By_Exact_Net);
1423
   perform_routing(By_Exact_Net);
1524
        Log (LOG_GENERAL, "#done routing\n");
1424
   Log (LOG_GENERAL, "#done routing\n");
1525
        return (TCL_OK);
1425
   return (TCL_OK);
1526
}
1426
   }
1527
/*********************** Route By Fixed Net ***************************/
1427
/*********************** Route By Fixed Net ***************************/
1528
/*
1428
/*
1529
@title
1429
@title
1530
preroute FIxed
1430
preroute FIxed
1531
@application vertical_pin
1431
@application vertical_pin
Line 1537... Line 1437...
1537
the same signal after routing. This is used to keep e.g.
1437
the same signal after routing. This is used to keep e.g.
1538
external connections.
1438
external connections.
1539
@end
1439
@end
1540
*/
1440
*/
1541
int RouteFixedNetHandler (ET_TCLARGS)
1441
int RouteFixedNetHandler (ET_TCLARGS)
1542
{
1442
   {
1543
        Log (LOG_GENERAL, "#begin routing\n");
1443
   Log (LOG_GENERAL, "#begin routing\n");
1544
        perform_routing (By_Fixed_Net);
1444
   perform_routing(By_Fixed_Net);
1545
        Log (LOG_GENERAL, "#done routing\n");
1445
   Log (LOG_GENERAL, "#done routing\n");
1546
        return (TCL_OK);
1446
   return (TCL_OK);
1547
}
1447
   }
1548
 
1448
 
1549
/*********************** Route By Name ***************************/
1449
/*********************** Route By Name ***************************/
1550
/*
1450
/*
1551
@title
1451
@title
1552
preroute NAMe
1452
preroute NAMe
Line 1563... Line 1463...
1563
again encourages successive re-routings of a design to use the
1463
again encourages successive re-routings of a design to use the
1564
same nets wherever possible.
1464
same nets wherever possible.
1565
@end
1465
@end
1566
*/
1466
*/
1567
int RouteNameHandler (ET_TCLARGS)
1467
int RouteNameHandler (ET_TCLARGS)
1568
{
1468
   {
1569
        Log (LOG_GENERAL, "#begin routing\n");
1469
   Log (LOG_GENERAL, "#begin routing\n");
1570
        perform_routing (By_Name);
1470
   perform_routing(By_Name);
1571
        Log (LOG_GENERAL, "#done routing\n");
1471
   Log (LOG_GENERAL, "#done routing\n");
1572
        return (TCL_OK);
1472
   return (TCL_OK);
1573
}
1473
   }
1574
 
1474
 
1575
/*********************** Route By creating Nets ***************************/
1475
/*********************** Route By creating Nets ***************************/
1576
/*
1476
/*
1577
@title
1477
@title
1578
preroute CREate
1478
preroute CREate
Line 1591... Line 1491...
1591
with the route command.
1491
with the route command.
1592
 
1492
 
1593
@end
1493
@end
1594
*/
1494
*/
1595
int RouteCreateHandler (ET_TCLARGS)
1495
int RouteCreateHandler (ET_TCLARGS)
1596
{
1496
   {
1597
        Log (LOG_GENERAL, "#begin routing\n");
1497
   Log (LOG_GENERAL, "#begin routing\n");
1598
        perform_routing (By_Creating);
1498
   perform_routing(By_Creating);
1599
        Log (LOG_GENERAL, "#done routing\n");
1499
   Log (LOG_GENERAL, "#done routing\n");
1600
        return (TCL_OK);
1500
   return (TCL_OK);
1601
}
1501
   }
1602
 
1502
 
1603
CommandMenu const PrerouteMenu = {
-
 
1604
    {"path", 2, RoutePathHandler, NULL, "Route by path only", "", NULL},
-
 
1605
    {"fixed", 2, RouteFixedNetHandler, NULL, "Route by fixed nets only", "", NULL},
-
 
1606
    {"exact", 2, RouteExactPathHandler, NULL, "Route by exact same path only", "", NULL},
-
 
1607
    {"name", 3, RouteNameHandler, NULL, "Route by name only", "", NULL},
-
 
1608
    {"create", 3, RouteCreateHandler, NULL, "Route by creating nets only", "", NULL},
-
 
1609
    {NULL, 0, NULL, NULL, NULL},
-
 
1610
 
1503
 
1611
};
1504
 
-
 
1505
  CommandMenu PrerouteMenu = {
-
 
1506
    {"path",    2, RoutePathHandler,NULL,
-
 
1507
                     "Route by path only",
-
 
1508
                     "",NULL},
-
 
1509
    {"fixed",    2, RouteFixedNetHandler,NULL,
-
 
1510
                     "Route by fixed nets only",
-
 
1511
                     "",NULL},
-
 
1512
    {"exact",    2, RouteExactPathHandler,NULL,
-
 
1513
                     "Route by exact same path only",
-
 
1514
                     "",NULL},
-
 
1515
    {"name",    3, RouteNameHandler,NULL,
-
 
1516
                     "Route by name only",
-
 
1517
                     "",NULL},
-
 
1518
    {"create",    3, RouteCreateHandler,NULL,
-
 
1519
                     "Route by creating nets only",
-
 
1520
                     "",NULL},
-
 
1521
        { NULL,0,NULL,NULL,NULL},
-
 
1522
 
-
 
1523
    };
1612
 
1524
 
1613
/*********************** Simple command calls ***************************/
1525
/*********************** Simple command calls ***************************/
1614
/*
1526
/*
1615
@title
1527
@title
1616
route
1528
route
1617
@application vertical_pin
1529
@application vertical_pin
1618
@application vertical_hdl
1530
@application vertical_hdl
1619
@application vertical_pcb
1531
@application vertical_pcb
Line 1657... Line 1569...
1657
To achieve the same effect as the older 'route' command, use
1569
To achieve the same effect as the older 'route' command, use
1658
'route' then 'preroute create'.
1570
'route' then 'preroute create'.
1659
@break
1571
@break
1660
Just prior to issuing any route commands, any new pins added
1572
Just prior to issuing any route commands, any new pins added
1661
to the design will be checked for pin renaming and the
1573
to the design will be checked for pin renaming and the
1662
unrouted netlist is updated.
1574
unrouted netlist is updated.
1663
@end
1575
@end
1664
*/
1576
*/
1665
int ROUTEHandler (ET_TCLARGS)
1577
int ROUTEHandler (ET_TCLARGS)
1666
{
1578
   {
1667
        Log (LOG_GENERAL, "#begin routing\n");
1579
   Log (LOG_GENERAL, "#begin routing\n");
1668
        perform_routing (Free);
1580
   perform_routing(Free);
1669
        Log (LOG_GENERAL, "#done routing\n");
1581
   Log (LOG_GENERAL, "#done routing\n");
1670
        return (TCL_OK);
1582
   return (TCL_OK);
1671
}
1583
   }
1672
 
1584
 
1673
/**************************************************************************/
1585
/**************************************************************************/
1674
/*
1586
/*
1675
@title
1587
@title
1676
reserve
1588
reserve
Line 1680... Line 1592...
1680
@break
1592
@break
1681
This function ensures net reservation is made for all internal
1593
This function ensures net reservation is made for all internal
1682
   nodes that are on internal sockets .
1594
   nodes that are on internal sockets .
1683
@break
1595
@break
1684
   If any external socket is on the net then all internal pins are reserved.
1596
   If any external socket is on the net then all internal pins are reserved.
1685
   Otherwise a single internal pin is left as a non-reserved driver
1597
   Otherwise a single internal pin is left as a non-reserved driver
1686
@end
1598
@end
1687
*/
1599
*/
1688
 
1600
 
1689
int ReservePinsHandler (ET_TCLARGS)
1601
int ReservePinsHandler (ET_TCLARGS)
1690
{
1602
   {
1691
        Log (LOG_GENERAL, "#begin pin reservation\n");
1603
   Log (LOG_GENERAL, "#begin pin reservation\n");
1692
        ensure_reservation ();
1604
   ensure_reservation();
1693
        Log (LOG_GENERAL, "#done pin reservation\n");
1605
   Log (LOG_GENERAL, "#done pin reservation\n");
1694
        return (TCL_OK);
1606
   return (TCL_OK);
-
 
1607
   }
-
 
1608
 
-
 
1609
 
-
 
1610
 
1695
}
1611
 
1696
 
1612
 
1697
/*********************** Simple command calls ***************************/
1613
/*********************** Simple command calls ***************************/
1698
/* partitioning */
1614
/* partitioning */
1699
/*
1615
/*
1700
@title
1616
@title
Line 1706... Line 1622...
1706
@break
1622
@break
1707
To do this the partitioner must be made aware of the entire set
1623
To do this the partitioner must be made aware of the entire set
1708
of top level entity port lists in the system.
1624
of top level entity port lists in the system.
1709
@break
1625
@break
1710
To do this an acfp, vhdl or verilog file must be read in
1626
To do this an acfp, vhdl or verilog file must be read in
1711
containing a description of the top level entity for each
1627
containing a description of the top level entity for each
1712
block used in the partition.
1628
block used in the partition.
1713
@break
1629
@break
1714
See the section on Vertical script files.
1630
See the section on Vertical script files.
1715
@end
1631
@end
1716
*/
1632
*/
1717
 
1633
 
1718
int PARTHandler (ET_TCLARGS)
1634
int PARTHandler( ET_TCLARGS)
1719
{
1635
   {
1720
        Log (LOG_GENERAL, "#begin partition\n");
1636
   Log (LOG_GENERAL, "#begin partition\n");
1721
        create_unrouted_list ();
1637
   create_unrouted_list();
1722
        clear_partition_generics (&partition_generics);
1638
   clear_partition_generics(&partition_generics);
1723
        perform_partition ();
1639
   perform_partition();
1724
        Log (LOG_GENERAL, "#done partition\n");
1640
   Log (LOG_GENERAL, "#done partition\n");
1725
        return (TCL_OK);
1641
   return (TCL_OK);
-
 
1642
   }
-
 
1643
 
-
 
1644
 
1726
}
1645
 
1727
 
1646
 
1728
/*********************** Simple command calls ***************************/
1647
/*********************** Simple command calls ***************************/
1729
/* trial */
1648
/* trial */
1730
/*
1649
/*
1731
@title
1650
@title
1732
fix_pins
1651
fix_pins
1733
@application vertical_pin
1652
@application vertical_pin
1734
@application vertical_pcb
1653
@application vertical_pcb
1735
@text
1654
@text
1736
This command is used in conjunction with set external on a socket. If a socket is set external
1655
This command is used in conjunction with set external on a socket. If a socket is set external and it has unrouted nets connected to it, the fix_pins command
1737
and it has unrouted nets connected to it, the fix_pins command will attempt to freeze the
-
 
1738
connections given in the unrouted netlist. This means that a socket with a defined pinout
1656
will attempt to freeze the connections given in the unrouted netlist. This means that a socket with a defined pinout should be routed with that pinout rather than
1739
should be routed with that pinout rather than having the pinout exchanged by VERTICAL.
1657
having the pinout exchanged by VERTICAL.
1740
@break
1658
@break
1741
NB If an attempt is made to connect a signal to a net which cannot reach its destination
1659
NB If an attempt is made to connect a signal to a net which cannot reach its destination because
1742
because there is no wire present, then the signal will be moved to another pin which reaches
1660
there is no wire present, then the signal will be moved to another pin which reaches the destination.
1743
the destination.
-
 
1744
 
1661
 
1745
@end
1662
@end
1746
*/
1663
*/
1747
 
1664
 
1748
int FIXHandler (ET_TCLARGS)
1665
int FIXHandler (ET_TCLARGS)
1749
{
1666
   {
1750
        Log (LOG_GENERAL, "#begin attempting to fix port pins\n");
1667
   Log (LOG_GENERAL, "#begin attempting to fix port pins\n");
1751
        perform_trial_naming ();
1668
   perform_trial_naming();
1752
        Log (LOG_GENERAL, "#done fixing pins\n");
1669
   Log (LOG_GENERAL, "#done fixing pins\n");
1753
        return (TCL_OK);
1670
   return (TCL_OK);
1754
}
1671
   }
1755
/*********************** Simple command calls ***************************/
1672
/*********************** Simple command calls ***************************/
1756
/* Auto-jumpering
1673
/* Auto-jumpering
1757
@title
1674
@title
1758
jumper <suffix>
1675
jumper <suffix>
1759
@application vertical_pin
1676
@application vertical_pin
1760
@application vertical_pcb
1677
@application vertical_pcb
1761
@text
1678
@text
1762
This is the original routing algorithm for VERTICAL.
1679
This is the original routing algorithm for VERTICAL.
1763
This can be used to create wirewrap jumper lists.
1680
This can be used to create wirewrap jumper lists.
1764
If there are unrouted connections made between sockets that are flagged as external, and which
1681
If there are unrouted connections made between sockets that are flagged as external, and which therefore
1765
therefore need wirewrapped connections.
1682
need wirewrapped connections.
1766
@break
1683
@break
1767
In use different pairs or groups of sockets would be set as external and then the jumper
1684
In use different pairs or groups of sockets would be set as external and then the jumper command is issued for that pair or group.
1768
command is issued for that pair or group. The suffix would be used to identify the jumpers
-
 
1769
created from each induvidual jumper command: These can then be extracted for wirewrap lists.
1685
The suffix would be used to identify the jumpers created from each induvidual jumper command: These can then be extracted for wirewrap lists.
1770
@end
1686
@end
1771
*/
1687
*/
1772
 
1688
 
1773
int JUMPERHandler (ET_TCLARGS)
1689
int JUMPERHandler (ET_TCLARGS)
1774
{
1690
  {
1775
        char *Suffix;
1691
  char * Suffix;
1776
        if (argc < 1)
1692
  if (argc<1 )
1777
                Suffix = NULL;
1693
     Suffix = NULL;
1778
        else
1694
   else
1779
                Suffix = argv[0];
1695
     Suffix = argv[0];
1780
        Log (LOG_GENERAL, "#begin jumpering\n");
1696
   Log (LOG_GENERAL, "#begin jumpering\n");
1781
        create_unrouted_list ();
1697
   create_unrouted_list();
1782
        perform_jumpering (Suffix);
1698
   perform_jumpering(Suffix);
1783
        Log (LOG_GENERAL, "#done jumpering\n");
1699
   Log (LOG_GENERAL, "#done jumpering\n");
1784
        return (TCL_OK);
1700
   return (TCL_OK);
-
 
1701
   }
1785
}
1702
 
1786
 
1703
 
1787
/******************** Parser for the 'DO' batch files ***********************/
1704
/******************** Parser for the 'DO' batch files ***********************/
1788
/*
1705
/*
1789
@title
1706
@title
1790
do <commandfile> [ <arg1> <arg2> ... ]
1707
do <commandfile> [ <arg1> <arg2> ... ]
1791
@application vertical_pin
1708
@application vertical_pin
1792
@application vertical_hdl
1709
@application vertical_hdl
1793
@application vertical_pcb
1710
@application vertical_pcb
1794
@text
1711
@text
1795
Interpret the command file as though typed in on the command line.
1712
Interpret the command file as though typed in on the command line.
1796
@break
1713
@break
1797
The argument list are accessible as $1, $2 etc while interpreting the command file, and can be
1714
The argument list are accessible as $1, $2 etc while interpreting the command file, and can be used to pass down
1798
used to pass down arguments to the file.
1715
arguments to the file.
1799
@break
1716
@break
1800
Up to 10 levels of nesting of command files is allowed. This limit is imposed to trap
1717
Up to 10 levels of nesting of command files is allowed. This limit is imposed to trap recursion.
1801
recursion.
-
 
1802
@end
1718
@end
1803
 
1719
 
1804
*/
1720
*/
1805
int DOHandler (ET_TCLARGS)
1721
int DOHandler (ET_TCLARGS)
1806
{
1722
   {
1807
        FILE *DoFile;
1723
   FILE *DoFile;
1808
        if (argc < 1)
1724
   if (argc<1)
1809
                return (TCL_ERROR);
1725
     return(TCL_ERROR);
-
 
1726
 
1810
 
1727
 
1811
        DoFile = trap_fopen (argv[0], "r"); /* open text file for reading */
1728
   DoFile = trap_fopen(argv[0], "r");             /* open text file for reading */
1812
        if (!DoFile)
1729
   if (!DoFile)  {
1813
        {
-
 
1814
                Log (LOG_ERROR, "# Error opening file: <%s>\n", argv[0]);
1730
      Log (LOG_ERROR, "# Error opening file: <%s>\n", argv[0]);
1815
                return (TCL_ERROR);
1731
      return(TCL_ERROR);
1816
        }
1732
      }
1817
        else
-
 
1818
        {
1733
   else  {
1819
                ParseFile (DoFile, argc - 1, argv + 1);
1734
      ParseFile (DoFile,argc-1,argv+1);
1820
                fclose (DoFile);
1735
      fclose (DoFile);
1821
                InitialiseData (); /* March 8 2000 :
1736
      InitialiseData(); /* March 8 2000 :
1822
                                    * added to make sure any environment
1737
                         * added to make sure any environment
1823
                                    *  variables which are directly used as
1738
                         *  variables which are directly used as
1824
                                    *  C structures are set. */
1739
                         *  C structures are set. */
1825
                return (TCL_OK);
1740
      return (TCL_OK);
1826
        }
1741
      }
1827
}
1742
   }
1828
/******************** Calling the count nets with few nodes ***********************/
1743
/******************** Calling the count nets with few nodes ***********************/
1829
/*
1744
/*
1830
@title
1745
@title
1831
count_nets [ <threshold> ]
1746
count_nets [ <threshold> ]
1832
@application vertical_pin
1747
@application vertical_pin
1833
@application vertical_hdl
1748
@application vertical_hdl
1834
@application vertical_pcb
1749
@application vertical_pcb
1835
@text
1750
@text
Line 1838... Line 1753...
1838
@break
1753
@break
1839
If no threshold is given , the threshold defaults to 1
1754
If no threshold is given , the threshold defaults to 1
1840
@end
1755
@end
1841
*/
1756
*/
1842
 
1757
 
1843
int COUNTNETSHandler (ET_TCLARGS)
-
 
1844
{
-
 
1845
        long limit;
-
 
1846
        if (argc < 1)
-
 
1847
                limit = 1;
-
 
1848
        else
-
 
1849
                limit = atoi (argv[0]);
-
 
1850
        count_nets_with_few_nodes ((int) limit);
-
 
1851
 
1758
 
-
 
1759
 
-
 
1760
 
-
 
1761
int COUNTNETSHandler (ET_TCLARGS) {
-
 
1762
 
-
 
1763
 
-
 
1764
   long limit;
-
 
1765
   if (argc<1)
-
 
1766
     limit = 1;
-
 
1767
   else
-
 
1768
     limit = atoi(argv[0]);
-
 
1769
   count_nets_with_few_nodes((int) limit);
-
 
1770
 
1852
        return (TCL_OK);
1771
   return (TCL_OK);
1853
}
1772
   }
1854
 
1773
 
1855
/*********************** Ensure Templates Command  ***************************/
1774
/*********************** Ensure Templates Command  ***************************/
1856
/* this ensures all templated sockets have all correct pin properties */
1775
/* this ensures all templated sockets have all correct pin properties */
1857
 
1776
 
1858
/*
1777
/*
1859
@title
1778
@title
1860
Socket Templating Background Information
1779
Socket Templating Background Information
1861
@application vertical_pin
1780
@application vertical_pin
1862
@application vertical_hdl
1781
@application vertical_hdl
1863
@application vertical_pcb
1782
@application vertical_pcb
1864
@text
1783
@text
Line 1870... Line 1789...
1870
ensure that every instance of that device in the design will
1789
ensure that every instance of that device in the design will
1871
have all of its pins available. An aliasing mechanism exists
1790
have all of its pins available. An aliasing mechanism exists
1872
for allowing a group of device types (e.g. speed variants) to
1791
for allowing a group of device types (e.g. speed variants) to
1873
all share the same template.
1792
all share the same template.
1874
@break
1793
@break
1875
In addition in Vertical-HDL, the socket templates are used as being logically equivalent to a
1794
In addition in Vertical-HDL, the socket templates are used as being logically equivalent to a VHDL component declaration.
1876
VHDL component declaration. The elaborate command ensures that the socket templates(
-
 
1877
declarations of ports and generics) are applied to the component instances.
1795
The elaborate command ensures that the socket templates( declarations of ports and generics) are applied to the component instances.
1878
@break
1796
@break
1879
 
1797
 
1880
There are two template commands. When these are issued, all
1798
There are two template commands. When these are issued, all
1881
sockets are checked to see if there is a template for them.
1799
sockets are checked to see if there is a template for them.
1882
For any socket with a template, if the socket lacks a pin
1800
For any socket with a template, if the socket lacks a pin
Line 1951... Line 1869...
1951
  equivalent (4;5);
1869
  equivalent (4;5);
1952
end;
1870
end;
1953
@text
1871
@text
1954
The information in this file consists firstly of a list of pin
1872
The information in this file consists firstly of a list of pin
1955
identifiers, followed by a list of which pins can be regarded
1873
identifiers, followed by a list of which pins can be regarded
1956
as equivalent.
1874
as equivalent.
1957
@break
1875
@break
1958
More than 2 pins may be included in the set of pins in an
1876
More than 2 pins may be included in the set of pins in an
1959
equivalent group.
1877
equivalent group.
1960
@break
1878
@break
1961
If this template file has been read in then for all devices of
1879
If this template file has been read in then for all devices of
Line 1964... Line 1882...
1964
across pins 1 and 8 , 2 and 7 , 3 and 6 , also 4 and 5. Then
1882
across pins 1 and 8 , 2 and 7 , 3 and 6 , also 4 and 5. Then
1965
when routing is performed, Vertical will be able to see wired
1883
when routing is performed, Vertical will be able to see wired
1966
connections across the resistor packs and complete the
1884
connections across the resistor packs and complete the
1967
routing.
1885
routing.
1968
@break
1886
@break
1969
Note that this mechanism can be applied to single resistors, or 8 pin devices with different
1887
Note that this mechanism can be applied to single resistors, or 8 pin devices with different
1970
resistor arrangements (e.g. SIL rather than DIL).
1888
resistor arrangements (e.g. SIL rather than DIL).
1971
@break
1889
@break
1972
For example a two pin resistor:
1890
For example a two pin resistor:
1973
@listing
1891
@listing
1974
template res0805
1892
template res0805
Line 1984... Line 1902...
1984
template <socket_id_template>
1902
template <socket_id_template>
1985
@application vertical_pin
1903
@application vertical_pin
1986
@application vertical_hdl
1904
@application vertical_hdl
1987
@application vertical_pcb
1905
@application vertical_pcb
1988
@text
1906
@text
1989
Apply the templating process to all sockets whose identifiers match the given template e.g.
1907
Apply the templating process to all sockets whose identifiers match the given template e.g. 'U1*' which have a valid template
1990
'U1*' which have a valid template defining pin directions and unrouable pins for example.
1908
defining pin directions and unrouable pins for example.
1991
@text
1909
@text
1992
DO NOT define any pins that the device ought to posess according to the template but which are
1910
DO NOT define any pins that the device ought to posess according to the template but which are not used in the
1993
not used in the netlist.
1911
netlist.
1994
@end
1912
@end
1995
*/
1913
*/
1996
int EnsureTemplateHandler (ET_TCLARGS)
1914
int EnsureTemplateHandler(ET_TCLARGS)
1997
{
1915
{
-
 
1916
 
1998
        char *Word = NULL;
1917
  char * Word = NULL;
1999
        if (argc > 0)
1918
  if(argc>0)
2000
                Word = argv[0];
1919
    Word = argv[0];
2001
        template_ensure (Word, TEMPLATE_NO_OP);
1920
  template_ensure(Word,TEMPLATE_NO_OP);
2002
        return (TCL_OK);
1921
  return(TCL_OK);
2003
}
1922
}
2004
/*********************** Create Template Command  ***************************/
1923
/*********************** Create Template Command  ***************************/
2005
/* this ensures all sockets have all pins available even if not connected to nets*/
1924
/* this ensures all sockets have all pins available even if not connected to nets*/
2006
/*
1925
/*
2007
@title
1926
@title
2008
create_template <socket_id_template>
1927
create_template <socket_id_template>
2009
@application vertical_pin
1928
@application vertical_pin
2010
@application vertical_hdl
1929
@application vertical_hdl
2011
@application vertical_pcb
1930
@application vertical_pcb
2012
@text
1931
@text
2013
Apply the templating process to all sockets whose identifiers match the given template e.g.
1932
Apply the templating process to all sockets whose identifiers match the given template e.g. 'U1*' which have a valid template
2014
'U1*' which have a valid template defining pin directions and unrouable pins for example.
1933
defining pin directions and unrouable pins for example.
2015
@text
1934
@text
2016
DEFINE any pins that the device ought to posess according to the template but which are not
1935
DEFINE any pins that the device ought to posess according to the template but which are not used in the
2017
used in the netlist.
1936
netlist.
2018
@end
1937
@end
2019
*/
1938
*/
2020
int EnsureCreateTemplateHandler (ET_TCLARGS)
1939
int EnsureCreateTemplateHandler(ET_TCLARGS)
2021
{
1940
{
2022
        char *Word = NULL;
1941
  char * Word = NULL;
2023
        if (argc > 0)
1942
   if (argc > 0 )
2024
                Word = argv[0];
1943
     Word = argv[0];
2025
        template_ensure (Word, TEMPLATE_CREATE_MISSING_PINS);
1944
  template_ensure(Word,TEMPLATE_CREATE_MISSING_PINS);
2026
        return (TCL_OK);
1945
  return(TCL_OK);
2027
}
1946
  }
2028
/*********************** Match Template Command  ***************************/
1947
/*********************** Match Template Command  ***************************/
2029
/* this ensures all sockets have all pins available even if not connected to nets*/
1948
/* this ensures all sockets have all pins available even if not connected to nets*/
2030
/*
1949
/*
2031
@title
1950
@title
2032
match_template <socket_id_template>
1951
match_template <socket_id_template>
2033
@application vertical_pin
1952
@application vertical_pin
2034
@application vertical_hdl
1953
@application vertical_hdl
2035
@application vertical_pcb
1954
@application vertical_pcb
2036
@text
1955
@text
2037
Apply the templating process to all sockets whose identifiers match the given template e.g.
1956
Apply the templating process to all sockets whose identifiers match the given template e.g. 'U1*' which have a valid template
2038
'U1*' which have a valid template defining pin directions and unrouable pins for example.
1957
defining pin directions and unrouable pins for example.
2039
@text
1958
@text
2040
DEFINE any pins that the device ought to posess according to the template but which are not
1959
DEFINE any pins that the device ought to posess according to the template but which are not used in the
2041
used in the netlist.
1960
netlist.
2042
@break
1961
@break
2043
DISCONNECT any pins that the device socket has , but which are not in the template. This is for
1962
DISCONNECT any pins that the device socket has , but which are not in the template. This is for use with FPGAs which
2044
use with FPGAs which have fewer pins connected than there are pins in the socket (eg APEX
1963
have fewer pins connected than there are pins in the socket (eg APEX 20k600 in a 20k1000 position)
2045
20k600 in a 20k1000 position)
-
 
2046
@break
1964
@break
2047
Any nets that are disconnected are also set as not routable so that they are not listed
1965
Any nets that are disconnected are also set as not routable so that they are not listed
2048
in Verilog output.
1966
in Verilog output.
2049
@end
1967
@end
2050
*/
1968
*/
2051
int EnsureMatchTemplateHandler (ET_TCLARGS)
1969
int EnsureMatchTemplateHandler(ET_TCLARGS)
2052
{
1970
{
2053
        char *Word = NULL;
1971
  char * Word = NULL;
2054
        if (argc > 0)
1972
   if (argc > 0 )
2055
                Word = argv[0];
1973
     Word = argv[0];
2056
        template_ensure (Word, TEMPLATE_CREATE_MISSING_PINS | TEMPLATE_DISCONNECT_PINS);
1974
  template_ensure(Word,TEMPLATE_CREATE_MISSING_PINS | TEMPLATE_DISCONNECT_PINS);
2057
        return (TCL_OK);
1975
  return(TCL_OK);
-
 
1976
  }
-
 
1977
 
2058
}
1978
 
2059
 
1979
 
2060
/* ********************* extract template command **********************************/
1980
/* ********************* extract template command **********************************/
2061
/*
1981
/*
2062
@title
1982
@title
2063
extract_template
1983
extract_template
Line 2068... Line 1988...
2068
This command scans the netlist for all chips or components of the same type and produces
1988
This command scans the netlist for all chips or components of the same type and produces
2069
a single description of the component in a template which is then used in write vhdl or
1989
a single description of the component in a template which is then used in write vhdl or
2070
write verilog commands. It is also usable in other cases where chip templates are needed,
1990
write verilog commands. It is also usable in other cases where chip templates are needed,
2071
they can be extracted from the PCB netlist instead of needing additional work to create them.
1991
they can be extracted from the PCB netlist instead of needing additional work to create them.
2072
@break
1992
@break
2073
Pins will only be created on the template if
1993
Pins will only be created on the template if
2074
They are connected to a net.
1994
They are connected to a net.
2075
@end
1995
@end
2076
*/
1996
*/
2077
 
1997
 
2078
int ExtractTemplateHandler (ET_TCLARGS)
1998
int ExtractTemplateHandler(ET_TCLARGS) {
2079
{
-
 
2080
        /* templates are used to make VHDL component instances
1999
/* templates are used to make VHDL component instances
2081
           match up to the declared components */
2000
   match up to the declared components */
2082
        extract_templates ();
2001
  extract_templates();
2083
        return (TCL_OK);
2002
  return(TCL_OK);
2084
}
2003
}
2085
/*********************** modify_names Command  ***************************/
2004
/*********************** modify_names Command  ***************************/
2086
/*
2005
/*
2087
@title
2006
@title
2088
modify_names <socket_id> [ <alternate_prefix> ]
2007
modify_names <socket_id> [ <alternate_prefix> ]
2089
@application vertical_pin
2008
@application vertical_pin
2090
@application vertical_hdl
2009
@application vertical_hdl
2091
@application vertical_pcb
2010
@application vertical_pcb
2092
@text
2011
@text
2093
This affects the name of nets, not the pins of the device to which they are connected.
2012
This affects the name of nets, not the pins of the device to which they are connected.
2094
@break
2013
@break
2095
Routable nets attached to pins on sockets are renamed to be by default socketID_pinID
2014
Routable nets attached to pins on sockets are renamed to be by default socketID_pinID
2096
in order to make them more traceable.
2015
in order to make them more traceable.
2097
If an alternate prefix is given then it is used instead (not advisable if the socket name
2016
If an alternate prefix is given then it is used instead (not advisable if the socket name
2098
regular expression will match more than one socket).
2017
regular expression will match more than one socket).
2099
@end
2018
@end
2100
*/
2019
*/
2101
int Modify_NamesHandler (ET_TCLARGS)
2020
int Modify_NamesHandler(ET_TCLARGS)
2102
{
2021
{
2103
        if (argc)
2022
  if (argc)
2104
        {
2023
    {
2105
                alter_net_to_socket_name (argv[0], argc > 1 ? argv[1] : NULL);
2024
    alter_net_to_socket_name(argv[0],argc>1?argv[1]:NULL);
2106
        }
2025
    }
2107
        else
2026
  else
2108
        {
2027
    {
2109
                Log (LOG_ERROR, "-- Need at least one socket identifier for this command\n");
2028
    Log(LOG_ERROR,"-- Need at least one socket identifier for this command\n");
2110
                return (TCL_ERROR);
2029
    return (TCL_ERROR);
2111
        }
2030
    }
2112
        return (TCL_OK);
2031
  return(TCL_OK);
2113
}
2032
}
2114
 
2033
 
2115
/*********************** edit_pins type Command  ***************************/
2034
/*********************** edit_pins type Command  ***************************/
2116
/*
2035
/*
2117
@title
2036
@title
2118
edit_pins type <socket_type> <pin_match_pattern> <replacement>
2037
edit_pins type <socket_type> <pin_match_pattern> <replacement>  
2119
@application vertical_pin
2038
@application vertical_pin
2120
@application vertical_hdl
2039
@application vertical_hdl
2121
@application vertical_pcb
2040
@application vertical_pcb
2122
@application regular_exp
2041
@application regular_exp
2123
@text
2042
@text
Line 2130... Line 2049...
2130
 
2049
 
2131
e.g.
2050
e.g.
2132
@listing
2051
@listing
2133
edit_pins type SK ([a-z]+)([0-9]+) &2&1
2052
edit_pins type SK ([a-z]+)([0-9]+) &2&1
2134
@text
2053
@text
2135
Will reverse  (on sockets of type 'SK) all pin identifiers identified by letters followed by
2054
Will reverse  (on sockets of type 'SK) all pin identifiers identified by letters followed by digits, swapping the
2136
digits, swapping the letter and digit parts of the string.
2055
letter and digit parts of the string.
2137
@break
2056
@break
2138
See edit_pins ident for more information on the regular expressions and pattern replacement of
2057
See edit_pins ident for more information on the regular expressions and pattern replacement of these commands.
2139
these commands.
-
 
2140
@break
2058
@break
2141
This supercedes the swap command which is kept for compatibility.
2059
This supercedes the swap command which is kept for compatibility.
2142
 
2060
 
2143
 
2061
 
2144
@end
2062
@end
2145
*/
2063
*/
2146
 
2064
 
2147
int Edit_PinNames_By_ChipType_Handler (ET_TCLARGS)
2065
int Edit_PinNames_By_ChipType_Handler(ET_TCLARGS)
2148
{
2066
{
2149
        if (argc >= 3)
2067
  if (argc>=3)
2150
        {
2068
    {
2151
                edit_socket_pin_name (argv[0], argv[1], argv[2], Type);
2069
    edit_socket_pin_name(argv[0],argv[1],argv[2],Type);
2152
        }
2070
    }
2153
        else
2071
  else
2154
        {
2072
    {
2155
                Log (
-
 
2156
                    LOG_ERROR,
-
 
2157
                    "-- Need socket type, a search and replace pattern for this command\n");
2073
    Log(LOG_ERROR,"-- Need socket type, a search and replace pattern for this command\n");
2158
                return (TCL_ERROR);
2074
    return (TCL_ERROR);
2159
        }
2075
    }
2160
        return (TCL_OK);
2076
  return(TCL_OK);
2161
}
2077
}
2162
 
2078
 
2163
/*********************** edit_pins ident  Command  ***************************/
2079
/*********************** edit_pins ident  Command  ***************************/
2164
/*
2080
/*
2165
@title
2081
@title
2166
edit_pins ident <socket_ident> <pin_match_pattern> <replacement>
2082
edit_pins ident <socket_ident> <pin_match_pattern> <replacement>  
2167
@application vertical_pin
2083
@application vertical_pin
2168
@application vertical_hdl
2084
@application vertical_hdl
2169
@application vertical_pcb
2085
@application vertical_pcb
2170
@application regular_exp
2086
@application regular_exp
2171
@text
2087
@text
2172
@text
2088
@text
2173
This command is a more sophisticated form of the swap command.
2089
This command is a more sophisticated form of the swap command.
2174
@break
2090
@break
2175
Searching finds all sockets with matching IDENTIFIERS.
2091
Searching finds all sockets with matching IDENTIFIERS.
2176
@break
2092
@break
2177
If a socket identifier is matched then the pin identifiers are edited using regular
2093
If a socket identifier is matched then the pin identifiers are edited using regular expressions.
2178
expressions.
-
 
2179
 
2094
 
2180
e.g.
2095
e.g.
2181
@listing
2096
@listing
2182
edit_pins ident U[0-9] ([a-z]+)([0-9]+) &2&1
2097
edit_pins ident U[0-9] ([a-z]+)([0-9]+) &2&1
2183
@text
2098
@text
2184
Will reverse all pins identifiers on chip U0 .. U9 where the pins are identified by letters
2099
Will reverse all pins identifiers on chip U0 .. U9 where the pins are identified by letters followed by digits,
-
 
2100
swapping the
2185
followed by digits, swapping the letter and digit parts of the string.
2101
letter and digit parts of the string.
2186
@break
2102
@break
2187
The pattern &0 is a special pattern which means the whole of the string.
2103
The pattern &0 is a special pattern which means the whole of the string.
2188
@listing
2104
@listing
2189
edit type ep20k1000efc672 .* pin_&0
2105
edit type ep20k1000efc672 .* pin_&0
2190
@text
2106
@text
2191
Will prefix all pin identifiers with "pin_" on all sockets of type ep20k1000efc672
2107
Will prefix all pin identifiers with "pin_" on all sockets of type ep20k1000efc672
2192
@break
2108
@break
2193
This command will also work with HDL port names...
2109
This command will also work with HDL port names...
Line 2197... Line 2113...
2197
&1..&9 : The n'th bracketed regular expression
2113
&1..&9 : The n'th bracketed regular expression
2198
&a     : The alphabetic = column identifier part of an alphanumeric pin ident
2114
&a     : The alphabetic = column identifier part of an alphanumeric pin ident
2199
&n     : The numeric = row identifier part of an alphanumeric pin ident
2115
&n     : The numeric = row identifier part of an alphanumeric pin ident
2200
&c     : The identifier of the connected net
2116
&c     : The identifier of the connected net
2201
&d     : The chip identifier
2117
&d     : The chip identifier
2202
&i     : The numerical pin index = row + column * total_rows
2118
&i     : The numerical pin index = row + column * total_rows
2203
@text
2119
@text
2204
The &a,&n and &i patterns are extracted from the _current_ pin identifiers of the chip.
2120
The &a,&n and &i patterns are extracted from the _current_ pin identifiers of the chip.
2205
If you have already edited the pin identifiers then the pin identification is extracted from
2121
If you have already edited the pin identifiers then the pin identification is extracted from the
2206
the new pin identifier pattern. There may be some problems created if the command is repeated
2122
new pin identifier pattern. There may be some problems created if the command is
2207
on the the same chip.
2123
repeated on the the same chip.
2208
@break
2124
@break
2209
All of the alphabetic part of the pin identifiers are converted to numbers representing device
2125
All of the alphabetic part of the pin identifiers are converted to numbers representing device
2210
pin columns. Dont use this command with pin identifiers with a lot of letters like BOOT12, as
2126
pin columns. Dont use this command with pin identifiers with a lot of letters like BOOT12, as the conversion of letters
2211
the conversion of letters to numbers can cause arithmetic overflows and strange results.
2127
to numbers can cause arithmetic overflows and strange results.
2212
@break
2128
@break
2213
 Currently the illegal characters in pin identifiers are PIN_MAP_ILLEGAL_CHARS. If these appear
2129
 Currently the illegal characters in pin identifiers are PIN_MAP_ILLEGAL_CHARS. If these appear they are mapped onto the
2214
they are mapped onto the next character in the alphabet.
2130
 next character in the alphabet.
2215
@break
2131
@break
2216
It is possible to define the rows and columns of a chip where the pin identifiers are numeric
2132
It is possible to define the rows and columns of a chip where the pin identifiers are numeric
2217
@listing
2133
@listing
2218
 
2134
 
2219
set generic attribute SK2 min_pin_row 1
2135
set generic attribute SK2 min_pin_row 1
2220
set generic attribute SK2 max_pin_row 50
2136
set generic attribute SK2 max_pin_row 50
2221
set generic attribute SK2 min_pin_col 0
2137
set generic attribute SK2 min_pin_col 0
2222
set generic attribute SK2 max_pin_col 3
2138
set generic attribute SK2 max_pin_col 3
2223
@text
2139
@text
2224
This is describing a 200 pin package with 4 columns of 50 rows. Rows number from 1 to N,
2140
This is describing a 200 pin package with 4 columns of 50 rows. Rows number from 1 to N, columns from 0 to M-1.
2225
columns from 0 to M-1.
-
 
2226
@end
2141
@end
2227
*/
2142
*/
2228
 
2143
 
2229
int Edit_PinNames_By_ChipIdent_Handler (ET_TCLARGS)
2144
int Edit_PinNames_By_ChipIdent_Handler(ET_TCLARGS)
2230
{
2145
{
2231
        if (argc >= 3)
2146
  if (argc>=3)
2232
        {
2147
    {
2233
                edit_socket_pin_name (argv[0], argv[1], argv[2], Ident);
2148
    edit_socket_pin_name(argv[0],argv[1],argv[2],Ident);
2234
        }
2149
    }
2235
        else
2150
  else
2236
        {
2151
    {
2237
                Log (
-
 
2238
                    LOG_ERROR,
-
 
2239
                    "-- Need socket ident, a search and replace pattern for this command\n");
2152
    Log(LOG_ERROR,"-- Need socket ident, a search and replace pattern for this command\n");
2240
                return (TCL_ERROR);
2153
    return (TCL_ERROR);
2241
        }
2154
    }
2242
        return (TCL_OK);
2155
  return(TCL_OK);
2243
}
2156
}
2244
 
2157
 
-
 
2158
 
2245
CommandMenu const EditPinNamesMenu = {
2159
    CommandMenu EditPinNamesMenu =
2246
    {"ident",
-
 
2247
     3,
2160
        {
2248
     Edit_PinNames_By_ChipIdent_Handler,
-
 
2249
     NULL,
-
 
2250
     "Edit pin names selecting chips by ID",
2161
        {"ident", 3, Edit_PinNames_By_ChipIdent_Handler,NULL, "Edit pin names selecting chips by ID","<chip_name_template> <search_expr> <replace_expr>",NULL},
2251
     "<chip_name_template> <search_expr> <replace_expr>",
2162
        {"type",  3, Edit_PinNames_By_ChipType_Handler,NULL, "Edit pin names selecting chips by Type","<chip_name_template> <search_expr> <replace_expr>",NULL},
2252
     NULL},
-
 
2253
    {"type",
-
 
2254
     3,
-
 
2255
     Edit_PinNames_By_ChipType_Handler,
-
 
2256
     NULL,
-
 
2257
     "Edit pin names selecting chips by Type",
2163
        {NULL,        0, NULL,NULL,NULL,NULL},
2258
     "<chip_name_template> <search_expr> <replace_expr>",
-
 
2259
     NULL},
2164
        };
2260
    {NULL, 0, NULL, NULL, NULL, NULL},
-
 
2261
};
2165
 
2262
 
2166
 
2263
/*********************** edit_nets ident Command  ***************************/
2167
/*********************** edit_nets ident Command  ***************************/
2264
/*
2168
/*
2265
@title
2169
@title
2266
edit_nets name <net_match_pattern> <replacement>
2170
edit_nets name <net_match_pattern> <replacement>  
2267
@application vertical_pin
2171
@application vertical_pin
2268
@application vertical_hdl
2172
@application vertical_hdl
2269
@application vertical_pcb
2173
@application vertical_pcb
2270
@application regular_exp
2174
@application regular_exp
2271
@text
2175
@text
2272
This commmand matches all nets by name and then renames them according to the replacement
2176
This commmand matches all nets by name and then renames them according to the replacement pattern.
2273
pattern.
-
 
2274
@listing
2177
@listing
2275
The special patterns that can be used in the replace string are:
2178
The special patterns that can be used in the replace string are:
2276
&0     : the whole of the matched pattern
2179
&0     : the whole of the matched pattern
2277
&1..&9 : The n'th bracketed regular expression
2180
&1..&9 : The n'th bracketed regular expression
2278
&n     : The net name in its entirety
2181
&n     : The net name in its entirety
Line 2280... Line 2183...
2280
@break
2183
@break
2281
I am sure that this command is extremely dangerous but anyway it is provided.
2184
I am sure that this command is extremely dangerous but anyway it is provided.
2282
@end
2185
@end
2283
*/
2186
*/
2284
 
2187
 
2285
int Edit_NetNames_Handler (ET_TCLARGS)
2188
int Edit_NetNames_Handler(ET_TCLARGS)
2286
{
2189
{
2287
        if (argc >= 2)
2190
  if (argc>=2)
2288
        {
2191
    {
2289
                edit_net_names (argv[0], argv[1], Name);
2192
    edit_net_names(argv[0],argv[1],Name);
2290
        }
2193
    }
2291
        else
2194
  else
2292
        {
2195
    {
2293
                Log (LOG_ERROR, "-- Need  a search and replace pattern for this command\n");
2196
    Log(LOG_ERROR,"-- Need  a search and replace pattern for this command\n");
2294
                return (TCL_ERROR);
2197
    return (TCL_ERROR);
2295
        }
2198
    }
2296
        return (TCL_OK);
2199
  return(TCL_OK);
2297
}
2200
}
2298
 
2201
 
2299
/*********************** edit_nets ident Command  ***************************/
2202
/*********************** edit_nets ident Command  ***************************/
2300
/*
2203
/*
2301
@title
2204
@title
2302
edit_nets ident <net_match_pattern> <replacement>
2205
edit_nets ident <net_match_pattern> <replacement>  
2303
@application vertical_pin
2206
@application vertical_pin
2304
@application vertical_hdl
2207
@application vertical_hdl
2305
@application vertical_pcb
2208
@application vertical_pcb
2306
@application regular_exp
2209
@application regular_exp
2307
@text
2210
@text
2308
This commmand matches all nets by identifier and then replaces identifier according to the
2211
This commmand matches all nets by identifier and then replaces identifier according to the replacement pattern.
2309
replacement pattern.
-
 
2310
@listing
2212
@listing
2311
The special patterns that can be used in the replace string are:
2213
The special patterns that can be used in the replace string are:
2312
&0     : the whole of the matched pattern
2214
&0     : the whole of the matched pattern
2313
&1..&9 : The n'th bracketed regular expression
2215
&1..&9 : The n'th bracketed regular expression
2314
&n     : The net name in its entirety
2216
&n     : The net name in its entirety
Line 2317... Line 2219...
2317
I am sure that this command is extremely dangerous but anyway it is provided.
2219
I am sure that this command is extremely dangerous but anyway it is provided.
2318
 
2220
 
2319
@end
2221
@end
2320
*/
2222
*/
2321
 
2223
 
2322
int Edit_NetIdents_Handler (ET_TCLARGS)
2224
int Edit_NetIdents_Handler(ET_TCLARGS)
2323
{
2225
{
2324
        if (argc >= 2)
2226
  if (argc>=2)
2325
        {
2227
    {
2326
                edit_net_names (argv[0], argv[1], Ident);
2228
    edit_net_names(argv[0],argv[1],Ident);
2327
        }
2229
    }
2328
        else
2230
  else
2329
        {
2231
    {
2330
                Log (LOG_ERROR, "-- Need  a search and replace pattern for this command\n");
2232
    Log(LOG_ERROR,"-- Need  a search and replace pattern for this command\n");
2331
                return (TCL_ERROR);
2233
    return (TCL_ERROR);
2332
        }
2234
    }
2333
        return (TCL_OK);
2235
  return(TCL_OK);
2334
}
2236
}
2335
 
2237
 
-
 
2238
 
-
 
2239
 
-
 
2240
 
2336
/*********************** Top level menu driver ******************************/
2241
/*********************** Top level menu driver ******************************/
2337
 
2242
 
2338
CommandMenu const EditNetNamesMenu = {
2243
    CommandMenu EditNetNamesMenu =
2339
    {"name",
-
 
2340
     3,
2244
        {
2341
     Edit_NetNames_Handler,
-
 
2342
     NULL,
-
 
2343
     "Edit net names ",
-
 
2344
     "<search_expr> <replace_expr>",
2245
        {"name", 3, Edit_NetNames_Handler,NULL, "Edit net names ","<search_expr> <replace_expr>",NULL},
2345
     NULL},
-
 
2346
    {"ident",
-
 
2347
     3,
-
 
2348
     Edit_NetIdents_Handler,
2246
        {"ident",  3, Edit_NetIdents_Handler,NULL, "Edit net idents ","<search_expr> <replace_expr>",NULL},
2349
     NULL,
-
 
2350
     "Edit net idents ",
-
 
2351
     "<search_expr> <replace_expr>",
2247
        {NULL,        0, NULL,NULL,NULL,NULL},
2352
     NULL},
2248
        };
2353
    {NULL, 0, NULL, NULL, NULL, NULL},
-
 
2354
};
2249
 
2355
 
2250
 
2356
/*********************** Bundle Command  ***************************/
2251
/*********************** Bundle Command  ***************************/
2357
/*
2252
/*
2358
@title
2253
@title
2359
bundle <socket_id> [ <socket_id> * ]
2254
bundle <socket_id> [ <socket_id> * ]
2360
@application vertical_hdl
2255
@application vertical_hdl
2361
@text
2256
@text
2362
The bundle command is used with Certify in order to reduce the port count of a
2257
The bundle command is used with Certify in order to reduce the port count of a
2363
PCB. It converts all of the signals connected to a single multipin socket into
2258
PCB. It converts all of the signals connected to a single multipin socket into
2364
a single bus where each pin of the bus is defined according to the connector pin identifier.
2259
a single bus where each pin of the bus is defined according to the connector pin identifier.
2365
@break
2260
@break
2366
The initial assumption is that each socket will have pins labelled either 'a1' or '1a' or
2261
The initial assumption is that each socket will have pins labelled either 'a1' or '1a' or simply numbers or letters.
2367
simply numbers or letters.
-
 
2368
@break
2262
@break
2369
In each case the letter codes are regarded as the columns of the connector and
2263
In each case the letter codes are regarded as the columns of the connector and
2370
the numbers as the rows of the connector.
2264
the numbers as the rows of the connector.
2371
@break
2265
@break
2372
The highest and lowest numbered rows are identified and once the number of rows is
2266
The highest and lowest numbered rows are identified and once the number of rows is
2373
known the array index of the bundle is defined by :
2267
known the array index of the bundle is defined by :
2374
@listing
2268
@listing
2375
BundleIndex = RowNum-LowestRow + (ColNum-LowestCol)*TotalRows;
2269
BundleIndex = RowNum-LowestRow + (ColNum-LowestCol)*TotalRows;
2376
@text
2270
@text
2377
This should always be consistent for any multipole connector.
2271
This should always be consistent for any multipole connector.
2378
@break
2272
@break
2379
A port on the top level of the design will appear, the net identifier is the same as the
2273
A port on the top level of the design will appear, the net identifier is the same as the
2380
connector identifier. If Verilog printout is used then the ports will be assigned automatically
2274
connector identifier. If Verilog printout is used then the ports will be assigned automatically to the correct signals.
2381
to the correct signals.
-
 
2382
@break
2275
@break
2383
This command is fully implemented for working with
2276
This command is fully implemented for working with
2384
"write vlog", Verilog output. It is not
2277
"write vlog", Verilog output. It is not
2385
yet implemented for "write VHDL", VHDL output.
2278
yet implemented for "write VHDL", VHDL output.
2386
 
2279
 
2387
@end
2280
@end
2388
*/
2281
*/
2389
int BundleHandler (ET_TCLARGS)
2282
int BundleHandler(ET_TCLARGS)
2390
{
2283
{
-
 
2284
 
2391
        int i = 0;
2285
  int i = 0;
2392
        char *Word = NULL;
2286
  char * Word = NULL;
2393
        while (i < argc)
2287
  while(i<argc)
2394
        {
2288
    {
2395
                Word = argv[i++];
2289
    Word = argv[i++];
2396
                wildcard_bundle (Word, 1);
2290
    wildcard_bundle(Word,1);
2397
        }
2291
    }
2398
        return (TCL_OK);
2292
  return(TCL_OK);
2399
}
2293
}
2400
 
2294
 
-
 
2295
 
2401
/*********************** UnBundle Command  ***************************/
2296
/*********************** UnBundle Command  ***************************/
2402
/*
2297
/*
2403
@title
2298
@title
2404
unbundle <socket_id> [ <socket_id> * ]
2299
unbundle <socket_id> [ <socket_id> * ]
2405
@application vertical_hdl
2300
@application vertical_hdl
2406
@text
2301
@text
2407
The unbundle command is used to undo the effect of the bundle command.
2302
The unbundle command is used to undo the effect of the bundle command.
2408
@end
2303
@end
2409
*/
2304
*/
2410
int UnBundleHandler (ET_TCLARGS)
2305
int UnBundleHandler(ET_TCLARGS)
2411
{
2306
{
-
 
2307
 
2412
        int i = 0;
2308
  int i = 0;
2413
        char *Word = NULL;
2309
  char * Word = NULL;
2414
        while (i < argc)
2310
  while(i<argc)
2415
        {
2311
    {
2416
                Word = argv[i++];
2312
    Word = argv[i++];
2417
                wildcard_bundle (Word, 0);
2313
    wildcard_bundle(Word,0);
2418
        }
2314
    }
2419
        return (TCL_OK);
2315
  return(TCL_OK);
2420
}
2316
}
2421
 
2317
 
-
 
2318
 
-
 
2319
 
-
 
2320
 
-
 
2321
 
2422
/*********************** Jumper Equivalent Pins Command  ***************************/
2322
/*********************** Jumper Equivalent Pins Command  ***************************/
2423
/* Connect together pin groups that are equivalent */
2323
/* Connect together pin groups that are equivalent */
2424
/*
2324
/*
2425
@title
2325
@title
2426
equivalent
2326
equivalent
2427
@application vertical_pin
2327
@application vertical_pin
2428
@application vertical_hdl
2328
@application vertical_hdl
2429
@application vertical_pcb
2329
@application vertical_pcb
2430
@text
2330
@text
2431
@text
2331
@text
2432
The netlist is searched for all sockets which have had a template applied to them, which
2332
The netlist is searched for all sockets which have had a template applied to them, which includes defined
2433
includes defined equivalent pins, or the socket has an equivalent pins section defined in the
2333
equivalent pins, or the socket has an equivalent pins section defined in the ACF source file.
2434
ACF source file.
-
 
2435
@break
2334
@break
2436
For these sockets,
2335
For these sockets,
2437
 a netlist jumper is created to create a logical short circuit between the sets of defined
2336
 a netlist jumper is created to create a logical short circuit between the sets of defined equivalent pins
2438
equivalent pins
-
 
2439
@break
2337
@break
2440
This is used in order to create logical shorts across series termination resistors. For example
2338
This is used in order to create logical shorts across series termination resistors. For example from a well known FPGA672 card:
2441
from a well known FPGA672 card:
-
 
2442
@listing
2339
@listing
2443
-- an ACFP template file
2340
-- an ACFP template file
2444
template resistor
2341
template resistor
2445
begin
2342
begin
2446
 "" : bidir_pin = 1;
2343
 "" : bidir_pin = 1;
Line 2454... Line 2351...
2454
  alias resistor;
2351
  alias resistor;
2455
end;
2352
end;
2456
 
2353
 
2457
template "RES INNER 51R"
2354
template "RES INNER 51R"
2458
begin
2355
begin
2459
  alias resistor;
2356
  alias resistor;
2460
end;
2357
end;
2461
@text
2358
@text
2462
Which is read in and then the template command is applied for all resistors in the design.
2359
Which is read in and then the template command is applied for all resistors in the design.
2463
Only those of type 'resistor', "RES INNER 16R" and "RES INNER 51R" would have their pins
2360
Only those of type 'resistor', "RES INNER 16R" and "RES INNER 51R" would have their pins
2464
connected together in this case.
2361
connected together in this case.
2465
@break
2362
@break
2466
 It can also be used to make e.g. bus buffers invisible for the purpose of routing signals from
2363
 It can also be used to make e.g. bus buffers invisible for the purpose of routing signals from interface pins via a bus buffer:
2467
interface pins via a bus buffer: something like
2364
something like
2468
@listing
2365
@listing
2469
template bus245buf
2366
template bus245buf
2470
begin
2367
begin
2471
  "" : bidir pin = 2;
2368
  "" : bidir pin = 2;
2472
  "" : bidir pin = 3;
2369
  "" : bidir pin = 3;
2473
....
2370
....
Line 2476... Line 2373...
2476
  "" : bidir_pin = 18;
2373
  "" : bidir_pin = 18;
2477
  "" : bidir_pin = 17;
2374
  "" : bidir_pin = 17;
2478
  equivalent (2;18);
2375
  equivalent (2;18);
2479
  equivalent (3;17);
2376
  equivalent (3;17);
2480
...
2377
...
2481
end;
2378
end;
2482
 
2379
 
2483
template "74HCT245"
2380
template "74HCT245"
2484
begin
2381
begin
2485
  alias bus245buf;
2382
  alias bus245buf;
2486
end;
2383
end;
2487
 
2384
 
2488
 
2385
 
2489
-- Schematic netlist component library naming error
2386
-- Schematic netlist component library naming error
2490
-- mapped by alias template
2387
-- mapped by alias template
2491
template "bizarre245"
2388
template "bizarre245"
2492
begin
2389
begin
2493
  alias bus245buf;
2390
  alias bus245buf;
2494
end;
2391
end;
2495
 
2392
 
2496
@text
2393
@text
2497
Which will short out any type of 245 buffer for the purpose of signal routing. It is expected
2394
Which will short out any type of 245 buffer for the purpose of signal routing. It is expected to introduce the concept
2498
to introduce the concept of directional jumpers to more correctly map the behaviour of a bus
2395
of directional jumpers to more correctly map the behaviour of a bus buffer. At the moment Vertical will not take any notice of
2499
buffer. At the moment Vertical will not take any notice of unidirectional buffers !
2396
unidirectional buffers !
2500
@end
2397
@end
2501
*/
2398
*/
2502
 
2399
 
2503
int JumperEquivPairsHandler (ET_TCLARGS)
2400
int JumperEquivPairsHandler(ET_TCLARGS) {
2504
{
-
 
2505
        jumper_equivalent_pins ();
2401
  jumper_equivalent_pins();
2506
        return (TCL_OK);
2402
  return(TCL_OK);
2507
}
2403
}
2508
 
2404
 
2509
/*********************** Elaborate Command  ***************************/
2405
/*********************** Elaborate Command  ***************************/
2510
/* Connect together pin groups that are equivalent */
2406
/* Connect together pin groups that are equivalent */
2511
/*
2407
/*
2512
@title
2408
@title
2513
elaborate
2409
elaborate
2514
@application vertical_pin
2410
@application vertical_pin
2515
@application vertical_hdl
2411
@application vertical_hdl
2516
@application vertical_pcb
2412
@application vertical_pcb
2517
@break
2413
@break
2518
This performs exactly the same task as for VHDL. All component instances which use a declared
2414
This performs exactly the same task as for VHDL. All component instances which use a declared
2519
component are elaborated into unique instances of that component.
2415
component are elaborated into unique instances of that component.
2520
@break
2416
@break
2521
Generic values are then evaluated for such things as bus widths on ports which have
2417
Generic values are then evaluated for such things as bus widths on ports which have
2522
variable widths defined by constants and expressions of those constants.
2418
variable widths defined by constants and expressions of those constants.
2523
@break
2419
@break
2524
Finally, all of the unrouted nets created by the implied connections of VHDL component
2420
Finally, all of the unrouted nets created by the implied connections of VHDL component
2525
instances (port name matching and renaming via port=>fred types of mapping)
2421
instances (port name matching and renaming via port=>fred types of mapping)
2526
are converted into wires by creating wiring automatically.
2422
are converted into wires by creating wiring automatically.
2527
@end
2423
@end
2528
*/
2424
*/
2529
 
2425
 
2530
int ElaborateHandler (ET_TCLARGS)
-
 
2531
{
-
 
2532
        /* templates are used to make VHDL component instances
-
 
2533
           match up to the declared components */
-
 
2534
        template_ensure (NULL, Search);
-
 
2535
        elaborate_all ();
-
 
2536
        create_vhdl_connections ();
-
 
2537
        perform_routing (By_Creating);
-
 
2538
 
2426
 
-
 
2427
 
-
 
2428
int ElaborateHandler(ET_TCLARGS) {
-
 
2429
/* templates are used to make VHDL component instances
-
 
2430
   match up to the declared components */
-
 
2431
  template_ensure(NULL,Search);
-
 
2432
  elaborate_all();
-
 
2433
  create_vhdl_connections();
-
 
2434
  perform_routing(By_Creating);
-
 
2435
 
2539
        return (TCL_OK);
2436
  return(TCL_OK);
2540
}
2437
}
2541
 
2438
 
2542
/******************** Swapping pin ids on sockets.  ***************************/
2439
/******************** Swapping pin ids on sockets.  ***************************/
2543
/* first arg. chip ID template, second is max number of chars before letter  ***********/
2440
/* first arg. chip ID template, second is max number of chars before letter  ***********/
2544
/*
2441
/*
2545
@title
2442
@title
2546
swap <identifier> [ <style> ]
2443
swap <identifier> [ <style> ]
2547
@application vertical_pin
2444
@application vertical_pin
2548
@application vertical_pcb
2445
@application vertical_pcb
2549
@text
2446
@text
2550
This is replaced by the edit_pin commands, which can do much more than this.
2447
This is replaced by the edit_pin commands, which can do much more than this.
2551
@break
2448
@break
2552
All pin identifiers on the device identified (or identified by the "name*") type of syntax will
2449
All pin identifiers on the device identified (or identified by the "name*") type of syntax will be
2553
be converted to the defined style.
2450
converted to the defined style.
2554
@break
2451
@break
2555
Valid styles are "1a" or "a1" indicating either leading or trailing numeric parts to the
2452
Valid styles are "1a" or "a1" indicating either leading or trailing numeric parts to the
2556
pin identifier.
2453
pin identifier.
2557
@break
2454
@break
2558
SO the following would happen:
2455
SO the following would happen:
Line 2563... Line 2460...
2563
Swapped ident   | X32 | b4 | 32X | 4B
2460
Swapped ident   | X32 | b4 | 32X | 4B
2564
@text
2461
@text
2565
The default style is "A1".
2462
The default style is "A1".
2566
 
2463
 
2567
@end
2464
@end
2568
*/
2465
*/
2569
 
2466
 
2570
int SwapIdHandler (ET_TCLARGS)
2467
int SwapIdHandler (ET_TCLARGS) {
2571
{
-
 
2572
        char *Template = NULL;
2468
   char *Template=NULL;
2573
        int limit;
2469
   int limit;
2574
        AlphaSwap_t swapping;
2470
   AlphaSwap_t swapping;
2575
        Log (LOG_GENERAL, "# Freezing pin renames\n");
2471
   Log(LOG_GENERAL,"# Freezing pin renames\n");
2576
        create_unrouted_list ();
2472
   create_unrouted_list();
2577
        limit = 2;
2473
   limit = 2;
2578
        swapping = Want_A1;
2474
   swapping = Want_A1;
2579
        if (argc > 0)
2475
   if (argc > 0)
2580
                Template = argv[0];
2476
     Template = argv[0];
2581
 
2477
 
2582
        if (argc > 1)
2478
   if (argc > 1)
-
 
2479
     {
-
 
2480
     if (isalpha(argv[1][0]))
2583
        {
2481
        {
2584
                if (isalpha (argv[1][0]))
-
 
2585
                {
-
 
2586
                        swapping = Want_A1;
2482
        swapping = Want_A1;
2587
                }
-
 
2588
                else
-
 
2589
                {
-
 
2590
                        swapping = Want_1A;
-
 
2591
                }
-
 
2592
        }
2483
        }
2593
 
-
 
2594
        if (argc > 2)
-
 
2595
        {
2484
     else {
2596
                limit = atoi (argv[2]);
2485
        swapping = Want_1A;
2597
        }
2486
        }
-
 
2487
     }
2598
 
2488
 
-
 
2489
   if (argc > 2)
-
 
2490
     {
-
 
2491
     limit = atoi(argv[2]);  
-
 
2492
     }
-
 
2493
 
2599
        pin_id_swap (Template, limit, swapping);
2494
   pin_id_swap(Template,limit,swapping);
2600
        return (TCL_OK);
2495
   return (TCL_OK);
2601
}
2496
   }
2602
/*********************** SetEnv ***************************/
2497
/*********************** SetEnv ***************************/
2603
/* Set acfread environment */
2498
/* Set acfread environment */
2604
/*
2499
/*
2605
@title
2500
@title
2606
setenv <name> <string>
2501
setenv <name> <string>
Line 2609... Line 2504...
2609
@application vertical_pcb
2504
@application vertical_pcb
2610
@text
2505
@text
2611
The environment variable is a special class of generic which
2506
The environment variable is a special class of generic which
2612
is not used in e.g. VHDL listings.
2507
is not used in e.g. VHDL listings.
2613
@break
2508
@break
2614
It is rougly equivalent to the shell environment variables
2509
It is rougly equivalent to the shell environment variables
2615
which may also be looked up by Vertical if no variable/generic
2510
which may also be looked up by Vertical if no variable/generic
2616
of the wanted name exists inside Vertical.
2511
of the wanted name exists inside Vertical.
2617
@break
2512
@break
2618
Set the environment variable (looked up by $(name) within netlists)
2513
Set the environment variable (looked up by $(name) within netlists)
2619
named to be the string given. e.g.
2514
named to be the string given. e.g.
2620
@listing
2515
@listing
2621
setenv fred "A string"
2516
setenv fred "A string"
2622
echo $(fred)
2517
echo $(fred)
2623
@text
2518
@text
2624
Will result in the string
2519
Will result in the string
2625
@listing
2520
@listing
2626
A string
2521
A string
2627
@text
2522
@text
2628
appearing on standard output and in the log file.
2523
appearing on standard output and in the log file.
2629
@end
2524
@end
2630
*/
2525
*/
2631
 
2526
 
2632
int SetEnvHandler (ET_TCLARGS)
2527
int SetEnvHandler(ET_TCLARGS) {
2633
{
-
 
2634
        generic_info_t info;
2528
  generic_info_t info;
2635
        if (argc < 2)
2529
  if (argc < 2)
2636
                return TCL_ERROR;
2530
    return TCL_ERROR;
2637
        info.name = argv[0];
2531
  info.name = argv[0];
2638
        info.typename = "env_string";
2532
  info.typename = "env_string";
2639
        info.g_type = IS_STRING;
2533
  info.g_type   = IS_STRING;
2640
        info.expr = compile_string (argv[1]);
2534
  info.expr     = compile_string(argv[1]);
2641
        set_generic_value (&global_generics, &info);
2535
  set_generic_value(&global_generics,&info);
2642
        return (TCL_OK);
2536
  return(TCL_OK);
2643
}
2537
  }
2644
 
2538
 
-
 
2539
 
2645
/*********************** ECHO ***************************/
2540
/*********************** ECHO ***************************/
2646
/*
2541
/*
2647
@title
2542
@title
2648
echo [ <string>* ]
2543
echo [ <string>* ]
2649
@application vertical_pin
2544
@application vertical_pin
2650
@application vertical_hdl
2545
@application vertical_hdl
2651
@application vertical_pcb
2546
@application vertical_pcb
2652
@text
2547
@text
2653
Prints out the strings given to standard output and to the
2548
Prints out the strings given to standard output and to the
2654
Vertical log file.
2549
Vertical log file.
2655
@end
2550
@end
2656
*/
2551
*/
2657
int ECHOHandler (ET_TCLARGS)
2552
int ECHOHandler(ET_TCLARGS) {
2658
{
-
 
2659
        int i;
2553
  int i;
2660
        for (i = 0; i < argc; i++)
2554
  for(i=0;i<argc;i++) {
2661
        {
-
 
2662
                Log (LOG_GENERAL, "%s ", argv[i]);
2555
    Log(LOG_GENERAL,"%s ",argv[i]);
2663
        };
2556
    };
2664
        Log (LOG_GENERAL, "\n");
2557
  Log(LOG_GENERAL,"\n");
2665
        return (TCL_OK);
2558
  return(TCL_OK);
2666
}
2559
  }
2667
/*********************** ECHO quoted ***************************/
2560
/*********************** ECHO quoted ***************************/
2668
/*
2561
/*
2669
@title
2562
@title
2670
echoq [ <string>* ]
2563
echoq [ <string>* ]
2671
@application vertical_pin
2564
@application vertical_pin
2672
@application vertical_hdl
2565
@application vertical_hdl
2673
@application vertical_pcb
2566
@application vertical_pcb
2674
@text
2567
@text
2675
Prints out the strings given , with "" quotes around them to standard output and to the
2568
Prints out the strings given , with "" quotes around them to standard output and to the Vertical log file. used to check
2676
Vertical log file. used to check command parser behaviour. It also can show up any variable
-
 
2677
with space characters in its value (which may be a problem)
2569
command parser behaviour. It also can show up any variable with space characters in its value (which may be a problem)
2678
@listing
2570
@listing
2679
Vertical : setenv earwig "one two "
2571
Vertical : setenv earwig "one two "
2680
Vertical : echoe  $(earwig)
2572
Vertical : echoe  $(earwig)
2681
"one two "
2573
"one two "
2682
Vertical : echo   $(earwig)
2574
Vertical : echo   $(earwig)
2683
one two
2575
one two
2684
@text
2576
@text
2685
In the second echo example it is not clear there is a space inside
2577
In the second echo example it is not clear there is a space inside
2686
the variable.
2578
the variable.
2687
 
2579
 
2688
@end
2580
@end
2689
*/
2581
*/
2690
int ECHOQHandler (ET_TCLARGS)
2582
int ECHOQHandler(ET_TCLARGS) {
2691
{
-
 
2692
        int i;
2583
  int i;
2693
        for (i = 0; i < argc; i++)
2584
  for(i=0;i<argc;i++) {
2694
        {
-
 
2695
                Log (LOG_GENERAL, "\"%s\" ", argv[i]);
2585
    Log(LOG_GENERAL,"\"%s\" ",argv[i]);
2696
        };
2586
    };
2697
        Log (LOG_GENERAL, "\n");
2587
  Log(LOG_GENERAL,"\n");
2698
        return (TCL_OK);
2588
  return(TCL_OK);
2699
}
2589
  }
2700
/*********************** ECHO to error log ***************************/
2590
/*********************** ECHO to error log ***************************/
2701
/*
2591
/*
2702
@title
2592
@title
2703
echoe [ <string>* ]
2593
echoe [ <string>* ]
2704
@application vertical_pin
2594
@application vertical_pin
2705
@application vertical_hdl
2595
@application vertical_hdl
2706
@application vertical_pcb
2596
@application vertical_pcb
2707
@text
2597
@text
2708
This is echoe where the e stands for ERROR. Allows tagging of the error report file
2598
This is echoe where the e stands for ERROR. Allows tagging of the error report file
2709
with the progress of scripts. It also prints to the standard Vertical log file.
2599
with the progress of scripts. It also prints to the standard Vertical log file.
2710
@break
2600
@break
2711
Prints out the strings given to standard output and to the Vertical ERROR log file
2601
Prints out the strings given to standard output and to the Vertical ERROR log file
2712
@end
2602
@end
2713
*/
2603
*/
2714
 
2604
 
2715
int ECHOEHandler (ET_TCLARGS)
2605
int ECHOEHandler(ET_TCLARGS) {
2716
{
-
 
2717
        int i;
2606
  int i;
2718
        for (i = 0; i < argc; i++)
2607
  for(i=0;i<argc;i++) {
2719
        {
-
 
2720
                Log (LOG_ERROR, "%s ", argv[i]);
2608
    Log(LOG_ERROR,"%s ",argv[i]);
2721
        };
2609
    };
2722
        Log (LOG_ERROR, "\n");
2610
  Log(LOG_ERROR,"\n");
2723
        for (i = 0; i < argc; i++)
2611
  for(i=0;i<argc;i++) {
2724
        {
-
 
2725
                Log (LOG_GENERAL, "%s ", argv[i]);
2612
    Log(LOG_GENERAL,"%s ",argv[i]);
2726
        };
2613
    };
2727
        Log (LOG_GENERAL, "\n");
2614
  Log(LOG_GENERAL,"\n");
-
 
2615
 
-
 
2616
  return(TCL_OK);
-
 
2617
  }
2728
 
2618
 
2729
        return (TCL_OK);
-
 
2730
}
-
 
2731
 
2619
 
2732
/**************************************************/
2620
/**************************************************/
2733
/* Disconnect node handler
2621
/* Disconnect node handler
2734
@title
2622
@title
2735
disconnect <chip>'('<pin_ident>')'  ( <chip>'('<pin_ident>')' ) *
2623
disconnect <chip>'('<pin_ident>')'  ( <chip>'('<pin_ident>')' ) *
2736
@application vertical_pin
2624
@application vertical_pin
2737
@application vertical_hdl
2625
@application vertical_hdl
2738
@application vertical_pcb
2626
@application vertical_pcb
2739
@text
2627
@text
2740
The pin will be disconnected from the routed net list. This is is used to delete pins
2628
The pin will be disconnected from the routed net list. This is is used to delete pins
2741
on chips which are broken. For more than a few pins on the chip it is better to use
2629
on chips which are broken. For more than a few pins on the chip it is better to use
2742
the template command to disconnect unused pins en masse.
2630
the template command to disconnect unused pins en masse.
2743
@break
2631
@break
2744
This command has been promised for about 5 years but was implemented only in 2001.
2632
This command has been promised for about 5 years but was implemented only in 2001.
2745
@end
2633
@end
2746
*/
2634
*/
2747
 
2635
 
2748
int DisconnectNodeHandler (ET_TCLARGS)
2636
int DisconnectNodeHandler(ET_TCLARGS)
2749
{
2637
  {
2750
        int i;
2638
  int i;
2751
        char *s, *t, *u;
2639
  char * s, * t , * u;
2752
        socket_t *socket;
2640
  socket_t * socket;
2753
        node_t *node;
2641
  node_t   * node;
2754
        if (argc < 2)
2642
  if (argc < 2)
2755
                return (TCL_ERROR);
2643
     return(TCL_ERROR);
2756
        for (i = 0; i < argc; i++)
2644
  for (i=0;i<argc;i++)
2757
        {
2645
    {
-
 
2646
 
2758
                s = strdup (argv[i]);
2647
    s=strdup(argv[i]);
2759
                /* look for (x) and point at it and the closing bracket */
2648
/* look for (x) and point at it and the closing bracket */
2760
                t = strchr (s, '(');
2649
    t=strchr(s,'(');
2761
                if (t)
2650
    if(t)
2762
                {
2651
      {
2763
                        u = strchr (t, ')');
2652
      u=strchr(t,')');
2764
                        if (u)
2653
      if(u)
2765
                        {
2654
        {
2766
                                *t++ = 0; /* terminate first half of string, point at second
2655
        *t++ = 0; /* terminate first half of string, point at second string */
2767
                                             string */
-
 
2768
                                *u = 0;   /* terminate second  string */
2656
        *u   = 0; /* terminate second  string */
2769
                                socket = find_socket (Ident, s, Search, &socket_head);
2657
        socket = find_socket(Ident,s,Search,&socket_head);
2770
                                if (socket)
2658
        if(socket)
2771
                                {
2659
          {
2772
                                        node = find_node (socket, Ident, t, Search);
2660
          node =  find_node(socket,Ident,t,Search);
2773
                                        if (node)
2661
          if(node)
2774
                                        {
2662
            {
2775
                                                disconnect_node (socket, node);
2663
            disconnect_node(socket,node);
2776
                                        }
2664
            }
2777
                                        else
2665
          else
2778
                                        {
2666
            {
2779
                                                Log (
-
 
2780
                                                    LOG_GENERAL,
-
 
2781
                                                    "-- No pin '%s' on socket '%s'\n",
2667
            Log(LOG_GENERAL,"-- No pin '%s' on socket '%s'\n",t,s);
2782
                                                    t,
2668
            }
2783
                                                    s);
-
 
2784
                                        }
2669
     
2785
                                }
2670
          }
2786
                                else
2671
        else
2787
                                {
2672
          {
2788
                                        Log (LOG_GENERAL, "-- No socket '%s'\n", s);
2673
          Log(LOG_GENERAL,"-- No socket '%s'\n",s);
2789
                                }
2674
          }
2790
                        }
2675
        }
2791
                }
2676
      }
2792
                if (!t || !u)
2677
    if(!t || !u)
2793
                {
2678
      {
2794
                        Log (LOG_GENERAL, "-- Use chip(pin) instead of '%s'\n", argv[i]);
2679
      Log(LOG_GENERAL,"-- Use chip(pin) instead of '%s'\n",argv[i]);
2795
                }
2680
      }
2796
                free (s); /* free up allocated string */
2681
    free(s); /* free up allocated string */
2797
        }
2682
    }
2798
        return (TCL_OK);
2683
  return(TCL_OK);
-
 
2684
  }
-
 
2685
 
2799
}
2686
 
2800
 
2687
 
2801
/**********************************************************/
2688
/**********************************************************/
2802
/*
2689
/*
2803
@title
2690
@title
2804
version
2691
version
Line 2806... Line 2693...
2806
@application vertical_hdl
2693
@application vertical_hdl
2807
@application vertical_pcb
2694
@application vertical_pcb
2808
@text
2695
@text
2809
List out all of the RCS/CVS $header$ tagged modules present
2696
List out all of the RCS/CVS $header$ tagged modules present
2810
in Vertical and the netlist readers. This allows for identification
2697
in Vertical and the netlist readers. This allows for identification
2811
of the exact versions of code used within a particular build of
2698
of the exact versions of code used within a particular build of
2812
Vertical.
2699
Vertical.
2813
@end
2700
@end
2814
*/
2701
*/  
2815
int VersionHandler (ET_TCLARGS)
2702
int VersionHandler(ET_TCLARGS) {
2816
{
-
 
2817
        list_versions (stdout);
2703
  list_versions(stdout);
2818
        return TCL_OK;
2704
  return TCL_OK;
-
 
2705
  }
2819
}
2706
 
2820
 
2707
 
2821
/**********************************************************/
2708
/**********************************************************/
2822
/*
2709
/*
2823
@title
2710
@title
2824
require <minimum_version>
2711
require <minimum_version>
Line 2826... Line 2713...
2826
@application vertical_hdl
2713
@application vertical_hdl
2827
@application vertical_pcb
2714
@application vertical_pcb
2828
@text
2715
@text
2829
The lowest release version of Vertical required to run this script is the command argument.
2716
The lowest release version of Vertical required to run this script is the command argument.
2830
@break
2717
@break
2831
If the Vertical version is older than that required, then an error will appear. Before
2718
If the Vertical version is older than that required, then an error will appear. Before Version 16.0 the error is because the
2832
Version 16.0 the error is because the require command does not exist. Above this version, the
2719
require command does not exist. Above this version, the number given is checked
-
 
2720
 
-
 
2721
 
-
 
2722
@end
-
 
2723
*/  
-
 
2724
int RequireHandler(ET_TCLARGS) {
-
 
2725
   
-
 
2726
 
-
 
2727
  if (argc < 1)
-
 
2728
    {
-
 
2729
    return(TCL_ERROR);
-
 
2730
    }
-
 
2731
   
-
 
2732
  if(strcmp(Vertical_Version,argv[0]) >= 0)
-
 
2733
    {
-
 
2734
    Log(LOG_GENERAL,"# Vertical version %s is OK, version %s required for this script\n",
-
 
2735
        Vertical_Version,argv[0]);
-
 
2736
    return(TCL_OK);
-
 
2737
    }
-
 
2738
  else
-
 
2739
    {
-
 
2740
    Log(LOG_ERROR,"# ERROR : Vertical version %s is too old , version %s required for this script\n",
-
 
2741
        Vertical_Version,argv[0]);
-
 
2742
       
2833
number given is checked
2743
    return(TCL_ERROR);
-
 
2744
    }
-
 
2745
 
-
 
2746
 
-
 
2747
  return TCL_OK;
-
 
2748
  }
-
 
2749
 
-
 
2750
 
2834
 
2751
 
2835
 
2752
 
2836
@end
-
 
2837
*/
-
 
2838
int RequireHandler (ET_TCLARGS)
-
 
2839
{
-
 
2840
        if (argc < 1)
-
 
2841
        {
-
 
2842
                return (TCL_ERROR);
-
 
2843
        }
-
 
2844
 
2753
 
2845
        if (strcmp (Vertical_Version, argv[0]) >= 0)
-
 
2846
        {
-
 
2847
                Log (
-
 
2848
                    LOG_GENERAL,
-
 
2849
                    "# Vertical version %s is OK, version %s required for this script\n",
-
 
2850
                    Vertical_Version,
-
 
2851
                    argv[0]);
-
 
2852
                return (TCL_OK);
-
 
2853
        }
-
 
2854
        else
-
 
2855
        {
-
 
2856
                Log (
-
 
2857
                    LOG_ERROR,
-
 
2858
                    "# ERROR : Vertical version %s is too old , version %s required for this "
-
 
2859
                    "script\n",
-
 
2860
                    Vertical_Version,
-
 
2861
                    argv[0]);
-
 
2862
 
2754
 
2863
                return (TCL_ERROR);
-
 
2864
        }
-
 
2865
 
2755
 
2866
        return TCL_OK;
-
 
2867
}
-
 
2868
 
2756
 
2869
/*********************** Top level menu driver ******************************/
2757
/*********************** Top level menu driver ******************************/
2870
 
2758
 
2871
CommandMenu const TopMenu = {
2759
    CommandMenu TopMenu =
-
 
2760
        {
2872
    {"bye", 3, BYEHandler, NULL, "Leave program", NULL},
2761
        {"bye",       3, BYEHandler,NULL, "Leave program",NULL},
2873
    {"quit", 1, BYEHandler, NULL, "Leave program", NULL},
2762
        {"quit",      1, BYEHandler,NULL, "Leave program",NULL},
2874
    {"bundle",
-
 
2875
     3,
-
 
2876
     BundleHandler,
-
 
2877
     NULL,
-
 
2878
     "Bundle together nets leaving connector",
2763
        {"bundle",    3, BundleHandler,NULL, "Bundle together nets leaving connector","[<chip_name_template>*]",NULL},
2879
     "[<chip_name_template>*]",
-
 
2880
     NULL},
-
 
2881
    {"modify_names",
-
 
2882
     3,
-
 
2883
     Modify_NamesHandler,
-
 
2884
     NULL,
-
 
2885
     "Rename nets to match chip pin identifiers",
2764
        {"modify_names",3, Modify_NamesHandler,NULL, "Rename nets to match chip pin identifiers"," <chip_name_template> <optional_prefix>",NULL},
2886
     " <chip_name_template> <optional_prefix>",
-
 
2887
     NULL},
-
 
2888
    {"equivalent",
-
 
2889
     3,
-
 
2890
     JumperEquivPairsHandler,
-
 
2891
     NULL,
-
 
2892
     "Connect together equivalent pins on devices by jumpers",
2765
        {"equivalent",3, JumperEquivPairsHandler,NULL,"Connect together equivalent pins on devices by jumpers","",NULL},
2893
     "",
-
 
2894
     NULL},
-
 
2895
    {"elaborate",
-
 
2896
     3,
-
 
2897
     ElaborateHandler,
-
 
2898
     NULL,
-
 
2899
     "VHDL style variable elaboration handler",
2766
        {"elaborate", 3, ElaborateHandler,NULL,"VHDL style variable elaboration handler","",NULL},
2900
     "",
-
 
2901
     NULL},
-
 
2902
    {"exit", 3, BYEHandler, NULL, "Leave program", NULL},
2767
        {"exit",      3, BYEHandler,NULL, "Leave program",NULL},
2903
    {"extract_template",
-
 
2904
     3,
-
 
2905
     ExtractTemplateHandler,
-
 
2906
     NULL,
-
 
2907
     "Extract component declarations from netlist",
2768
        {"extract_template",  3, ExtractTemplateHandler,NULL,"Extract component declarations from netlist","",NULL},
2908
     "",
-
 
2909
     NULL},
-
 
2910
    {"echoe",
-
 
2911
     5,
-
 
2912
     ECHOEHandler,
-
 
2913
     NULL,
-
 
2914
     "Expand remainder of line and print it as an error",
2769
        {"echoe",     5, ECHOEHandler,NULL, "Expand remainder of line and print it as an error",NULL},
2915
     NULL},
-
 
2916
    {"echoq",
-
 
2917
     5,
-
 
2918
     ECHOQHandler,
-
 
2919
     NULL,
-
 
2920
     "Expand remainder of line and print strings as quoted",
2770
        {"echoq",     5, ECHOQHandler,NULL, "Expand remainder of line and print strings as quoted",NULL},
2921
     NULL},
-
 
2922
    {"echo", 4, ECHOHandler, NULL, "Expand remainder of line and print it out", NULL},
2771
        {"echo",      4, ECHOHandler,NULL, "Expand remainder of line and print it out",NULL},
2923
    {"edit_pins",
-
 
2924
     6,
-
 
2925
     NULL,
-
 
2926
     EditPinNamesMenu,
-
 
2927
     "Rename pin identifiers on chips ",
2772
        {"edit_pins", 6, NULL,EditPinNamesMenu, "Rename pin identifiers on chips ","(more)",NULL},
2928
     "(more)",
-
 
2929
     NULL},
-
 
2930
    {"edit_nets", 6, NULL, EditNetNamesMenu, "Rename net identifiers ", "(more)", NULL},
2773
        {"edit_nets", 6, NULL,EditNetNamesMenu, "Rename net identifiers ","(more)",NULL},
2931
    {"do", 2, DOHandler, NULL, "Run a batch file", "<do_file>", NULL},
2774
        {"do",        2, DOHandler,NULL,  "Run a batch file","<do_file>",NULL},
2932
    {"read",
-
 
2933
     4,
-
 
2934
     READHandler,
-
 
2935
     NULL,
-
 
2936
     "Read a data file in with <suffix> on net and socket IDs",
2775
        {"read",      4, READHandler,NULL,"Read a data file in with <suffix> on net and socket IDs","<acf_file> [<suffix>] [ <args> ]",NULL},
2937
     "<acf_file> [<suffix>] [ <args> ]",
-
 
2938
     NULL},
-
 
2939
    {"list", 4, NULL, ListMenu, "Print information", "(more)", NULL},
2776
        {"list",      4, NULL,ListMenu,   "Print information","(more)",NULL},
2940
    {"setenv", 4, SetEnvHandler, NULL, "set environment variable", "<name> <value>", NULL},
2777
        {"setenv",    4, SetEnvHandler,NULL,"set environment variable","<name> <value>",NULL},
2941
    {"set", 3, NULL, SetMenu, "Alter part of the database", "(more)", NULL},
2778
        {"set",       3, NULL,SetMenu,    "Alter part of the database","(more)",NULL},
2942
    {"delete", 3, NULL, DeleteMenu, "Remove part of the database", "(more)", NULL},
2779
        {"delete",    3, NULL,DeleteMenu, "Remove part of the database","(more)",NULL},
2943
    {"disconnect",
-
 
2944
     3,
-
 
2945
     DisconnectNodeHandler,
-
 
2946
     NULL,
-
 
2947
     "Remove a pin from a chip",
2780
        {"disconnect",3, DisconnectNodeHandler,NULL, "Remove a pin from a chip","chip(pin)",NULL},
2948
     "chip(pin)",
-
 
2949
     NULL},
-
 
2950
    {"write", 4, NULL, WriteMenu, "Write out a data file", "(more)", NULL},
2781
        {"write",     4, NULL,WriteMenu,  "Write out a data file","(more)",NULL},
2951
    {"route", 4, ROUTEHandler, NULL, "Route the wiring", NULL},
2782
        {"route",     4, ROUTEHandler,NULL,"Route the wiring",NULL},
2952
    {"preroute", 4, NULL, PrerouteMenu, "Partially route the wiring", "(more)", NULL},
2783
        {"preroute",  4, NULL,PrerouteMenu,"Partially route the wiring","(more)",NULL},
2953
    {"fix_nets", 3, FIXHandler, NULL, "Fix unrouted connections to External ports", NULL},
2784
        {"fix_nets",  3, FIXHandler,NULL,  "Fix unrouted connections to External ports",NULL},
2954
    {"count_nets",
-
 
2955
     3,
-
 
2956
     COUNTNETSHandler,
-
 
2957
     NULL,
-
 
2958
     "Count nets with less than <limit> nodes",
2785
        {"count_nets",3, COUNTNETSHandler,NULL,  "Count nets with less than <limit> nodes","[<limit>]",NULL},
2959
     "[<limit>]",
-
 
2960
     NULL},
-
 
2961
    {"jumper",
-
 
2962
     4,
-
 
2963
     JUMPERHandler,
-
 
2964
     NULL,
-
 
2965
     "Create new paths with unique jumpers",
2786
        {"jumper",    4, JUMPERHandler,NULL,"Create new paths with unique jumpers","[<suffix>]",NULL},
2966
     "[<suffix>]",
-
 
2967
     NULL},
-
 
2968
    {"partition", 3, PARTHandler, NULL, "Do the partition calculation", "", NULL},
2787
        {"partition", 3, PARTHandler,NULL,"Do the partition calculation","",NULL},
2969
    {"logging", 3, NULL, LoggingMenu, "Setup transcript logging file", "(more)", NULL},
2788
        {"logging",   3, NULL,LoggingMenu,"Setup transcript logging file","(more)",NULL},
2970
    {"debug", 3, DEBUGHandler, NULL, "Internal debugging", "<debug_flags>", NULL},
2789
        {"debug",     3, DEBUGHandler,NULL,"Internal debugging","<debug_flags>",NULL},
2971
    {"template",
-
 
2972
     3,
-
 
2973
     EnsureTemplateHandler,
-
 
2974
     NULL,
-
 
2975
     "Ensure chips have correct pin directions only",
2790
        {"template",  3, EnsureTemplateHandler,NULL,"Ensure chips have correct pin directions only","[<chip_name_template>*]",NULL},
2976
     "[<chip_name_template>*]",
-
 
2977
     NULL},
-
 
2978
    {"create_template",
-
 
2979
     3,
-
 
2980
     EnsureCreateTemplateHandler,
-
 
2981
     NULL,
-
 
2982
     "Ensure chips have all possible pins",
2791
        {"create_template",  3, EnsureCreateTemplateHandler,NULL,"Ensure chips have all possible pins","[<chip_name_template>*]",NULL},
2983
     "[<chip_name_template>*]",
-
 
2984
     NULL},
-
 
2985
    {"match_template",
-
 
2986
     3,
-
 
2987
     EnsureMatchTemplateHandler,
-
 
2988
     NULL,
-
 
2989
     "Ensure chips have all possible valid pins: disconnect extra pins ",
2792
        {"match_template",  3, EnsureMatchTemplateHandler,NULL,"Ensure chips have all possible valid pins: disconnect extra pins ","[<chip_name_template>*]",NULL},
2990
     "[<chip_name_template>*]",
-
 
2991
     NULL},
-
 
2992
    {"connection",
-
 
2993
     3,
-
 
2994
     ConnectionHandler,
-
 
2995
     NULL,
-
 
2996
     "Connect two connectors pin for pin",
2793
        {"connection",3, ConnectionHandler,NULL,"Connect two connectors pin for pin","<socket1> <socket2>",NULL},
2997
     "<socket1> <socket2>",
-
 
2998
     NULL},
-
 
2999
    {"swap",
-
 
3000
     3,
-
 
3001
     SwapIdHandler,
-
 
3002
     NULL,
-
 
3003
     "reverse chip pin id A23=>23A",
-
 
3004
     "<chip_template> <max_letters>",
2794
        {"swap",      3, SwapIdHandler,NULL,"reverse chip pin id A23=>23A","<chip_template> <max_letters>",NULL},
3005
     NULL},
-
 
3006
    {"reserve",
-
 
3007
     3,
-
 
3008
     ReservePinsHandler,
-
 
3009
     NULL,
-
 
3010
     "reserve pins for Altera FPGA use after routing",
2795
        {"reserve",   3, ReservePinsHandler,NULL,"reserve pins for Altera FPGA use after routing","",NULL},
3011
     "",
-
 
3012
     NULL},
-
 
3013
    {"require",
-
 
3014
     3,
-
 
3015
     RequireHandler,
-
 
3016
     NULL,
-
 
3017
     "Require a given version (or later) of VERTICAL",
2796
        {"require",   3, RequireHandler,NULL,"Require a given version (or later) of VERTICAL","<version>",NULL},
3018
     "<version>",
-
 
3019
     NULL},
-
 
3020
    {"unbundle",
-
 
3021
     3,
-
 
3022
     UnBundleHandler,
-
 
3023
     NULL,
-
 
3024
     "Unbundle nets leaving connector",
2797
        {"unbundle",  3, UnBundleHandler,NULL, "Unbundle nets leaving connector","[<chip_name_template>*]",NULL},
3025
     "[<chip_name_template>*]",
-
 
3026
     NULL},
-
 
3027
    {"version", 3, VersionHandler, NULL, "list module versions to standard output", "", NULL},
2798
        {"version",   3, VersionHandler,NULL,"list module versions to standard output","",NULL},
3028
    {NULL, 0, NULL, NULL, NULL, NULL},
2799
        {NULL,        0, NULL,NULL,NULL,NULL},
3029
};
2800
        };
3030
 
2801
 
3031
/****************************************************************************/
2802
/****************************************************************************/
-
 
2803