/* ** sbnr.c -- area/speed estimation, extrapolates data from actual layouts ** - performs initializtation and overall control of estimation ** - area estimation generation for entire layout, SBNR algorithm ** Joseph B. Evans, 1/29/89 */ #include #include #include "estimate.h" #define CONV 1000000. /* convert from sq microns to sq mm */ main(argc,argv) char **argv; int argc; { double area,time; double line = DEF_PR; int minbits = MINBITS; int maxbits = MAXBITS; FILE *fp_a,*fp_t; char **targv; int targc; if (argc == 3) { taps = atoi(argv[1]); q.data = atoi(argv[2]); } else if (argc == 4) { taps = atoi(argv[1]); q.data = atoi(argv[2]); line = atof(argv[3]); } else { printf("usage: %s taps data_bits [line_width]\n",argv[0]); exit(1); } initialize(line); estimate(&area,&time); /* printf("\nArea/Speed Estimates\n"); printf("process: single level metal, poly, %g microns\n",line); printf("%d taps, %d data bits\n",taps,q.data); printf("area = %g sq mm\tcycle time = %g ns\n\n",area/CONV,time); */ printf("%g\t%g\n",area/CONV,time); } estimate(area,time) double *area,*time; { struct pe systolic; struct pe glue; /* systolic cells */ systolic.area = 25.*X_GATE*Y_GATE + 3.*X_DFF*Y_DFF; systolic.time = 7.*T_GATE + T_DFF; glue.area = 30.*X_GATE*Y_GATE + X_FA*Y_FA; glue.time = 5.*T_GATE; *area = (double)((2*taps+1)*q.data)*systolic.area + glue.area; *time = (double)(3*q.data+1)*systolic.time + glue.time; }