FreeCalypso > hg > ueda-linux
view ueda/sverp-bind/main.c @ 20:dda8e455c863
unet-bind works to the point of reporting unbound instances
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Sun, 02 Aug 2015 03:23:44 +0000 |
parents | 1d4c693b8f35 |
children | f7b09a54c2ce |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <unistd.h> extern char *MCLfile; char *input_filename, *output_filename; char *starpoints_file; int check_completeness, unbound_instances; static void usage() { fprintf(stderr, "usage: unet-bind [options] input.unet [output.unet]\n"); exit(1); } static void process_options(argc, argv) char **argv; { extern char *optarg; register int c; while ((c = getopt(argc, argv, "cI:M:s:")) != EOF) { switch (c) { case 'c': check_completeness++; continue; case 'I': add_symfile_dir(optarg); continue; case 'M': MCLfile = optarg; continue; case 's': starpoints_file = optarg; continue; default: usage(); } } } main(argc, argv) char **argv; { extern int optind; process_options(argc, argv); if (argc < optind + 1 || argc > optind + 2) usage(); input_filename = argv[optind]; output_filename = argv[optind+1]; /* process all inputs from the MCL */ read_MCL(); set_default_sympath(); read_pinouts(); init_outcomp_from_MCL(); /* do we have any star points? */ if (starpoints_file) process_starpoints_file(); /* read the netlist from sverp */ process_input_unet(); if (unbound_instances) { fprintf(stderr, "error: %s input contains unbound instances, aborting\n", input_filename); exit(1); } /* remaining functionality remains to be implemented */ exit(0); }