Subversion Repositories Vertical

Rev

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

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