head 1.40; access; symbols; locks; strict; comment @# @; 1.40 date 99.06.10.07.38.06; author ryu; state Exp; branches; next 1.39; 1.39 date 99.02.07.03.11.17; author ryu; state Exp; branches; next 1.38; 1.38 date 99.01.30.19.50.42; author ryu; state Exp; branches; next 1.37; 1.37 date 99.01.30.19.25.47; author ryu; state Exp; branches; next 1.36; 1.36 date 99.01.30.19.23.47; author ryu; state Exp; branches; next 1.35; 1.35 date 99.01.30.19.22.40; author ryu; state Exp; branches; next 1.34; 1.34 date 99.01.20.07.44.59; author ryu; state Exp; branches; next 1.33; 1.33 date 99.01.14.10.19.02; author ryu; state Exp; branches; next 1.32; 1.32 date 99.01.13.07.23.35; author ryu; state Exp; branches; next 1.31; 1.31 date 99.01.13.07.18.42; author ryu; state Exp; branches; next 1.30; 1.30 date 98.09.13.03.48.42; author ryu; state Exp; branches; next 1.29; 1.29 date 98.09.11.06.19.45; author ryu; state Exp; branches; next 1.28; 1.28 date 98.09.08.13.16.49; author ryu; state Exp; branches; next 1.27; 1.27 date 98.09.06.20.43.23; author ryu; state Exp; branches; next 1.26; 1.26 date 98.09.06.04.20.55; author ryu; state Exp; branches; next 1.25; 1.25 date 98.09.05.22.17.50; author ryu; state Exp; branches; next 1.24; 1.24 date 98.09.05.22.10.32; author ryu; state Exp; branches; next 1.23; 1.23 date 98.09.03.09.08.26; author ryu; state Exp; branches; next 1.22; 1.22 date 98.09.03.07.46.24; author ryu; state Exp; branches; next 1.21; 1.21 date 98.09.03.06.09.52; author ryu; state Exp; branches; next 1.20; 1.20 date 98.09.01.08.44.21; author ryu; state Exp; branches; next 1.19; 1.19 date 98.08.29.17.23.56; author ryu; state Exp; branches; next 1.18; 1.18 date 98.08.24.06.16.21; author ryu; state Exp; branches; next 1.17; 1.17 date 98.08.24.00.48.34; author ryu; state Exp; branches; next 1.16; 1.16 date 98.08.23.22.11.24; author ryu; state Exp; branches; next 1.15; 1.15 date 98.08.23.12.22.09; author ryu; state Exp; branches; next 1.14; 1.14 date 98.08.23.12.03.44; author ryu; state Exp; branches; next 1.13; 1.13 date 98.08.23.10.13.32; author ryu; state Exp; branches; next 1.12; 1.12 date 98.08.23.07.13.46; author ryu; state Exp; branches; next 1.11; 1.11 date 98.08.23.06.56.57; author ryu; state Exp; branches; next 1.10; 1.10 date 98.08.18.09.33.00; author ryu; state Exp; branches; next 1.9; 1.9 date 98.08.17.16.58.24; author ryu; state Exp; branches; next 1.8; 1.8 date 98.08.16.13.40.08; author ryu; state Exp; branches; next 1.7; 1.7 date 98.08.15.11.38.26; author ryu; state Exp; branches; next 1.6; 1.6 date 98.08.15.11.09.38; author ryu; state Exp; branches; next 1.5; 1.5 date 98.08.15.10.11.18; author ryu; state Exp; branches; next 1.4; 1.4 date 98.08.15.09.06.14; author ryu; state Exp; branches; next 1.3; 1.3 date 98.08.13.09.08.03; author ryu; state Exp; branches; next 1.2; 1.2 date 98.08.13.07.23.50; author ryu; state Exp; branches; next 1.1; 1.1 date 98.08.13.07.16.55; author ryu; state Exp; branches; next ; desc @#! /usr/local/bin/perl @ 1.40 log @init_autochar after reading in spec. @ text @#! PERL # $Id: autochar.pl,v 1.39 1999/02/07 03:11:17 ryu Exp ryu $ # Copyright (C) 1999 Robert K. Yu # email: robert@@yu.org # This file is part of Autochar. # Autochar is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # Autochar is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with Autochar; see the file COPYING. If not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ($Program) = $0 =~ /([^\/]*)$/; #------------------------------------------------------------------------------- # Setup #------------------------------------------------------------------------------- $autochar = $ENV{'AUTOCHAR'}; use Getopt::Std; use File::Basename; # load program defaults require $autochar . '/lib/defaults.spec'; # load program components require $autochar . '/src/utils.pl'; require $autochar . '/src/common.pl'; require $autochar . '/src/math.pl'; require $autochar . '/src/globals.pl'; require $autochar . '/src/model.pl'; require $autochar . '/src/data.pl'; # load characterization modules require $autochar . '/src/load_delay.pl'; require $autochar . '/src/input_cap.pl'; require $autochar . '/src/setup_hold.pl'; require $autochar . '/src/clock_q.pl'; require $autochar . '/src/clock_enable.pl'; #------------------------------------------------------------------------------- # Parse Command #------------------------------------------------------------------------------- ©right(); getopts('Dhso:c:'); $input_spec = $ARGV[0]; ($base,$dir,$type) = fileparse($input_spec, '\..*'); $rptout = $base . '.rpt'; if ($opt_h || !$input_spec) { print "Usage: $Program [-hs] [-c cellname] [-o report] input+\n"; print " -h: help usage\n"; print " -s: skip running spice if output found\n"; print " (default: run hspice)\n"; print " -c: cellname\n"; print " (default: none)\n"; print " -o: output report\n"; print " (default: input.rpt)\n"; print "input: input control file(s)\n"; exit 0; } $rptout = ($opt_o) ? $opt_o : $rptout; $skip = $opt_s; $cellname = $opt_c; $debug = $opt_D; open(OUT, "> $rptout") || die "ERROR: Cannot create file '$rptout'.\n"; &print_header(OUT, "#"); #------------------------------------------------------------------------------- # Main #------------------------------------------------------------------------------- # run each spec file foreach $input_spec (@@ARGV) { (-e $input_spec) || die "ERROR: Cannot open '$input_spec'.\n"; printf STDERR "Evaluating '$input_spec' ...\n"; # run spec require $input_spec; } close(OUT); printf STDERR "Created '$rptout'.\n"; exit 0; #------------------------------------------------------------------------------- # Subroutines #------------------------------------------------------------------------------- # autochar -- # Called directly from spec file. # sub autochar { my(@@arguments) = @@_; # reset counter with each call to 'autochar'. $spice_run = 0; &init_autochar(); if ($sim_type eq 'load_delay') { &ld_run(@@arguments); } elsif ($sim_type eq 'input_cap') { &ic_run(@@arguments); } elsif ($sim_type eq 'setup_hold') { &sh_run(@@arguments); } elsif ($sim_type eq 'clock_q') { &cq_run(@@arguments); } elsif ($sim_type eq 'clock_enable') { &ce_run(@@arguments); } else { die "ERROR: unknown simulation type '$sim_type'.\n"; } } # copychar -- # Called directly from spec file. # sub copychar { my(@@arguments) = @@_; if ($sim_type eq 'load_delay') { &ld_copy_data($cellname, @@arguments); } elsif ($sim_type eq 'input_cap') { &ic_copy_data($cellname, @@arguments); } elsif ($sim_type eq 'setup_hold') { &sh_copy_data($cellname, @@arguments); } elsif ($sim_type eq 'clock_q') { &cq_copy_data($cellname, @@arguments); } elsif ($sim_type eq 'clock_enable') { &ce_copy_data($cellname, @@arguments); } else { die "ERROR: unknown simulation type '$sim_type'.\n"; } } sub copyright { print " AutoChar Version $version Copyright (C) 1999 Robert K. Yu email: robert\@@yu.org Autochar is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. Autochar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Autochar; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\n"; } sub init_autochar { &set_measure_values ( \$input_prop_r, \$input_prop_f, \$output_prop_r, \$output_prop_f, \$trans_r1, \$trans_r2, \$trans_f1, \$trans_f2, \$slew_r1, \$slew_r2, \$slew_f1, \$slew_f2); } @ 1.39 log @usag @ text @d3 1 a3 1 # $Id: autochar.pl,v 1.38 1999/01/30 19:50:42 ryu Exp ryu $ a101 1 &init_autochar(); d122 2 @ 1.38 log @format @ text @d3 1 a3 1 # $Id: autochar.pl,v 1.37 1999/01/30 19:25:47 ryu Exp ryu $ d162 1 a162 1 printf STDERR " @ 1.37 log @header @ text @d3 1 a3 1 # $Id: autochar.pl,v 1.36 1999/01/30 19:23:47 ryu Exp ryu $ d167 1 a167 1 email:robert\@@yu.org @ 1.36 log @escaped @@ @ text @d3 1 a3 1 # $Id: autochar.pl,v 1.35 1999/01/30 19:22:40 ryu Exp ryu $ d167 1 a167 1 mailto:robert\@@yu.org @ 1.35 log @email @ text @d3 1 a3 1 # $Id: autochar.pl,v 1.34 1999/01/20 07:44:59 ryu Exp ryu $ d167 1 a167 1 mailto:robert@@yu.org @ 1.34 log @No perl header @ text @d3 1 a3 1 # $Id: autochar.pl,v 1.33 1999/01/14 10:19:02 ryu Exp ryu $ d167 1 @ 1.33 log @Using /usr/bin/perl @ text @d1 1 a1 1 #! /usr/bin/perl d3 1 a3 1 # $Id: autochar.pl,v 1.32 1999/01/13 07:23:35 ryu Exp ryu $ @ 1.32 log @Changed usage comment. @ text @d1 1 a1 1 #! /usr/local/bin/perl d3 1 a3 1 # $Id: autochar.pl,v 1.31 1999/01/13 07:18:42 ryu Exp ryu $ @ 1.31 log @GPL @ text @d3 1 a3 1 # $Id$ d165 17 a181 7 Version $version Copyright (c) 1998 by Robert K. Yu ALL RIGHTS RESERVED This program is proprietary and confidential information of Robert K. Yu, and may be used and disclosed only as authorized in a written license agreement controlling such use and disclosure.\n\n"; @ 1.30 log @wip @ text @d3 1 a3 5 # Copyright (c) 1998-2001, Robert K. Yu. All Rights Reserved. # # No part of this program may be used, reproduced, stored in a # retrieval system, or transmitted in any form or by any # means without the prior permission of the author. d5 19 a23 3 # $Id: autochar.pl,v 1.29 1998/09/11 06:19:45 ryu Exp ryu $ # Auto-characterization # Author: Robert K. Yu @ 1.29 log @Added slew rate to setup/hold @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.28 1998/09/08 13:16:49 ryu Exp $ d30 1 @ 1.28 log @slew rate at the clock input of setup_hold (wip) @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.27 1998/09/06 20:43:23 ryu Exp ryu $ d84 1 d87 3 a89 1 # run time d161 12 @ 1.27 log @clock enable @ text @d3 1 a3 1 # Copyright (c) 1998, Robert K. Yu. All Rights Reserved. d9 1 a9 1 # $Id: autochar.pl,v 1.26 1998/09/06 04:20:55 ryu Exp ryu $ @ 1.26 log @1.3 version; support for clock_enalbe @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.25 1998/09/05 22:17:50 ryu Exp ryu $ d40 1 a40 1 #require $autochar . '/src/clock_enable.pl'; @ 1.25 log @recognize clock_enable @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.24 1998/09/05 22:10:32 ryu Exp ryu $ d138 2 @ 1.24 log @Consolidate lookup_input functions into one, using list of names and refnames. @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.23 1998/09/03 09:08:26 ryu Exp ryu $ d105 1 a105 1 # reset counter d116 2 @ 1.23 log @added clock_enalbe @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.22 1998/09/03 07:46:24 ryu Exp ryu $ d40 1 a40 1 require $autochar . '/src/clock_enable.pl'; @ 1.22 log @reset counter during each autochar call @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.21 1998/09/03 06:09:52 ryu Exp ryu $ d40 1 @ 1.21 log @Using exponential ideal source for input slew rate. @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.20 1998/09/01 08:44:21 ryu Exp ryu $ a84 2 # reset counter $spice_run = 0; d103 3 @ 1.20 log @Added cellname command line argument @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.19 1998/08/29 17:23:56 ryu Exp ryu $ d26 3 a28 1 require $autochar . '/lib/defaults.pl'; d35 1 a35 1 # load modules @ 1.19 log @add more control of prop delay measurement @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.18 1998/08/24 06:16:21 ryu Exp ryu $ d46 1 a46 1 getopts('Dhso:'); d54 1 a54 1 print "Usage: $Program [-hs] [-o report] input+\n"; d58 2 d68 1 d146 2 a147 2 and may be used and disclosed only as authorized in a written license agreement controlling such use and disclosure.\n\n"; @ 1.18 log @Added multivariable linear regression @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.17 1998/08/24 00:48:34 ryu Exp ryu $ d31 1 d46 1 a46 1 getopts('Dhsf:m:o:'); d50 2 a51 3 $output = $base . '.rpt'; $format = 'synopsys'; $modelout = $base . '.lib'; d54 1 a54 1 print "Usage: $Program [-hs] [-f format] [-m model] [-o report] input+\n"; a57 4 print " -f: model format {synopsys, pearl, none}\n"; print " (default: $format)\n"; print " -m: output model\n"; print " (default: input.lib)\n"; d64 1 a64 3 $output = ($opt_o) ? $opt_o : $output; $format = ($opt_f) ? $opt_f : $format; $modelout = ($opt_d) ? $opt_d : $modelout; d68 1 a68 1 open(OUT, "> $output") || die "ERROR: Cannot create file '$output'.\n"; a70 4 if ($format ne 'none') { open(MODEL, "> $modelout") || die "ERROR: Cannot create file '$modelout'.\n"; } a85 2 &print_model($format); d87 1 a87 2 printf STDERR "Created '$output'.\n"; @ 1.17 log @Added copy_data functions to copy characterization data from one arc to another to save time. @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.16 1998/08/23 22:11:24 ryu Exp ryu $ d28 1 @ 1.16 log @Robert K. Yu @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.15 1998/08/23 12:22:09 ryu Exp ryu $ a92 1 d107 3 a109 1 # This function called directly by the spec file. d121 20 @ 1.15 log @print out synopsys model for combinatorial gates. @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.14 1998/08/23 12:03:44 ryu Exp ryu $ d11 1 a11 1 # Author: Robert Yu @ 1.14 log @celldata @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.13 1998/08/23 10:13:32 ryu Exp ryu $ d96 1 a96 1 &create_model($format); @ 1.13 log @Added writing of DATA @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.12 1998/08/23 07:13:46 ryu Exp ryu $ d29 1 d44 1 a44 1 getopts('Dshao:d:'); d49 2 a50 1 $dataout = $base . '.data'; d53 1 a53 1 print "Usage: $Program [-hsa] [-d data] [-o report] input+\n"; d57 4 a60 4 print " -a: append outputs\n"; print " (default: overwrittern)\n"; print " -d: output database\n"; print " (default: input.data)\n"; d68 2 a69 1 $dataout = ($opt_d) ? $opt_d : $dataout; a71 1 $write_mode = ($opt_a) ? '>>' : '>'; d73 1 a73 1 open(OUT, "$write_mode $output") || die "ERROR: Cannot create file '$output'.\n"; d76 3 a78 2 open(DATA, "$write_mode $dataout") || die "ERROR: Cannot create file '$dataout'.\n"; &print_header(DATA, "#"); d88 1 a88 1 printf STDERR "Executing '$input_spec' ...\n"; d96 2 a98 1 close(DATA); d100 1 a100 1 printf STDERR "Created '$output' and '$dataout'.\n"; @ 1.12 log @added copyright @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.11 1998/08/23 06:56:57 ryu Exp ryu $ d43 1 a43 1 getopts('Dshao:'); d48 1 d51 1 a51 1 print "Usage: $Program [-hsa] [-o output] input+\n"; d55 1 a55 1 print " -a: append output\n"; d57 3 a59 1 print " -o: output file\n"; d66 1 d74 3 d93 4 a96 1 printf STDERR "Created '$output'.\n"; @ 1.11 log @Using my and use instead of local and require. @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.10 1998/08/18 09:33:00 ryu Exp ryu $ d26 3 a28 3 use $autochar . '/lib/defaults.pl'; use $autochar . '/src/utils.pl'; use $autochar . '/src/globals.pl'; d31 4 a34 4 use $autochar . '/src/load_delay.pl'; use $autochar . '/src/input_cap.pl'; use $autochar . '/src/setup_hold.pl'; use $autochar . '/src/clock_q.pl'; d41 2 d109 14 @ 1.10 log @Debugged clock to q module; changed generated file convention @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.9 1998/08/17 16:58:24 ryu Exp ryu $ d26 3 a28 3 require $autochar . '/lib/defaults.pl'; require $autochar . '/src/utils.pl'; require $autochar . '/src/globals.pl'; d31 4 a34 4 require $autochar . '/src/load_delay.pl'; require $autochar . '/src/input_cap.pl'; require $autochar . '/src/setup_hold.pl'; require $autochar . '/src/clock_q.pl'; d79 1 d94 1 a94 1 local(@@arguments) = @@_; @ 1.9 log @Clean up clock_q module @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.8 1998/08/16 13:40:08 ryu Exp ryu $ d41 1 a41 1 getopts('Dsho:'); d48 1 a48 1 print "Usage: $Program [-hs] [-o output] input+\n"; d52 2 d63 1 d65 1 a65 1 open(OUT, "> $output") || die "ERROR: Cannot create file '$output'.\n"; d77 2 d80 1 @ 1.8 log @using sh_char @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.7 1998/08/15 11:38:26 ryu Exp ryu $ d34 1 d95 2 @ 1.7 log @Added setup_hold loading and function call @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.6 1998/08/15 11:09:38 ryu Exp ryu $ d93 1 a93 1 &ic_run(@@arguments); @ 1.6 log @saving work in progress @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.5 1998/08/15 10:11:18 ryu Exp ryu $ d33 1 d91 2 @ 1.5 log @added input_cap sub @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.4 1998/08/15 09:06:14 ryu Exp ryu $ d32 1 d89 1 a89 1 if ($sim_type eq 'input_cap') { @ 1.4 log @read in multiple input files @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.3 1998/08/13 09:08:03 ryu Exp ryu $ d88 2 @ 1.3 log @Added scaling of cload, delay. @ text @d9 1 a9 1 # $Id: autochar.pl,v 1.2 1998/08/13 07:23:50 ryu Exp ryu $ d45 1 a45 1 print "Usage: $Program [-hs] [-o output] input\n"; d51 1 a51 1 print "input: input control file\n"; d59 1 a59 1 open(OUT, "> $output") || die "ERROR: Cannot create file \"$output\".\n"; d67 6 a72 2 (-e $input_spec) || die "ERROR: Cannot open \"$input_spec\".\n"; require $input_spec; d74 1 a74 1 printf STDERR "Created \"$output\".\n"; d87 1 a87 1 &load_delay(@@arguments); d89 1 a89 1 die "ERROR: unknown simulation type \"$sim_type\".\n"; @ 1.2 log @Moved defaults.pl to lib area. @ text @d5 1 a5 1 # No part of this program may be reproduced, stored in a d9 1 a9 1 # $Id: autochar.pl,v 1.1 1998/08/13 07:16:55 ryu Exp ryu $ @ 1.1 log @entered into RCS @ text @d9 1 a9 1 # $Id$ d26 1 a26 1 require $autochar . '/src/defaults.pl'; @