home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lsi / cad / 1241 < prev    next >
Encoding:
Text File  |  1992-12-22  |  6.8 KB  |  227 lines

  1. Newsgroups: comp.lsi.cad
  2. Path: sparky!uunet!gatech!rpi!batcomputer!cornell!cchase
  3. From: cchase@cs.cornell.edu (Craig Chase)
  4. Subject: Re: Parallel transistors in irsim
  5. Message-ID: <1992Dec22.023221.1664@cs.cornell.edu>
  6. Organization: Electrical Engineering, Cornell University, Ithaca NY
  7. References: <9212211416.PN26316@LL.MIT.EDU>
  8. Date: Tue, 22 Dec 1992 02:32:21 GMT
  9. Lines: 216
  10.  
  11. killoran@ll.mit.edu (Mike Killoran) writes:
  12. >We are trying to simulate a large chip (~700,000 transistors) with
  13. >irsim.  There are many (almost 7,000) parallel transistors making 
  14. >up the clock distribution cell.  When simulating this chip, irsim
  15. >gives the following complaint about all of the parallel transistors:
  16.  
  17. >No problem, just edit conn_list.c, increase MAX_PARALLEL to 7000.
  18. >Do the same in globals.h and then recompile.  No problem.  Right?
  19.  
  20. We had the problem with parallel transistors as well and fixed it by 
  21. dynamically allocating the array and increasing its size as needed.  What 
  22. follows is a context diff.  The first diff (to cad_dir.c) Is not really 
  23. to your problem, but I include it anyway.  (BTW, these fixes were done 
  24. by Christos Zoulas a couple years ago).
  25.  
  26. Good luck,
  27. mark linderman (linder@ee.cornell.edu)
  28.  
  29.  
  30. *** cad_dir.c   Tue Apr 24 20:21:29 1990
  31. --- cad_dir.c.orig      Fri Jan 26 08:14:17 1990
  32. ***************
  33. *** 18,24 ****
  34.   
  35.   public void InitCAD()
  36.     {
  37. !     char           *s, *h;
  38.       struct passwd  *pwd;
  39.       int            len;
  40.   
  41. --- 18,24 ----
  42.   
  43.   public void InitCAD()
  44.     {
  45. !     char           *s;
  46.       struct passwd  *pwd;
  47.       int            len;
  48.   
  49. ***************
  50. *** 48,57 ****
  51.     go_it :
  52.   
  53.       len = strlen( s );
  54. !     if ((h = getenv("HOSTTYPE")) == (char *) 0) 
  55. !       h = "";
  56. !     cad_lib = Valloc( len + 12 );
  57. !     cad_bin = Valloc( len + 5 + strlen(h) );
  58. !     sprintf( cad_lib, "%s/lib/irsim", s );
  59. !     sprintf( cad_bin, "%s/bin/%s", s, h);
  60.     }
  61. --- 48,55 ----
  62.     go_it :
  63.   
  64.       len = strlen( s );
  65. !     cad_lib = Valloc( len + 5 );
  66. !     cad_bin = Valloc( len + 5 );
  67. !     sprintf( cad_lib, "%s/lib", s );
  68. !     sprintf( cad_bin, "%s/bin", s );
  69.     }
  70. Exit 1
  71. *** conn_list.c Wed Apr 25 08:51:34 1990
  72. --- conn_list.c.orig    Tue Aug 29 04:29:56 1989
  73. ***************
  74. *** 9,19 ****
  75.   
  76.   
  77.   public
  78. ! #define       INC_PARALLEL    32      /* this is probably sufficient per stage */
  79. !                               /* and we increment by that...           */
  80.   
  81. ! public        tptr  *parallel_xtors = (tptr *) 0;
  82. ! private int cur_par = 0;
  83.   
  84.   public
  85.   #define       par_list( T )           ( parallel_xtors[ (T)->n_par ] )
  86. --- 9,17 ----
  87.   
  88.   
  89.   public
  90. ! #define       MAX_PARALLEL    30      /* this is probably sufficient per stage */
  91.   
  92. ! public        tptr  parallel_xtors[ MAX_PARALLEL ];
  93.   
  94.   public
  95.   #define       par_list( T )           ( parallel_xtors[ (T)->n_par ] )
  96. ***************
  97. *** 20,25 ****
  98. --- 18,24 ----
  99.   
  100.   #define       hash_terms( T )         ( (Ulong)((T)->source) ^ (Ulong)((T)->drain) )
  101.   
  102.   /*
  103.    * Build a linked-list of nodes (using nlink entry in Node structure)
  104.    * which are electrically connected to node 'n'.  No special order
  105. ***************
  106. *** 74,91 ****
  107.               }
  108.             else if( model != LIN_MODEL )
  109.                 continue;
  110. !           else 
  111. ! #ifdef notdef
  112. !           /* 
  113. !            * Does this work all the time?
  114. !            */
  115. !           if( hash_terms( other->n.tran ) == hash_terms( t ) )
  116. ! #else
  117. !           if (((other->n.tran->source == t->source) &&
  118. !                (other->n.tran->drain  == t->drain ))    ||
  119. !               ((other->n.tran->drain  == t->source) &&
  120. !                (other->n.tran->source == t->drain ))) 
  121. ! #endif
  122.               {                                     /* parallel transistors */
  123.                 register tptr  tran = other->n.tran;
  124.   
  125. --- 73,79 ----
  126.               }
  127.             else if( model != LIN_MODEL )
  128.                 continue;
  129. !           else if( hash_terms( other->n.tran ) == hash_terms( t ) )
  130.               {                                     /* parallel transistors */
  131.                 register tptr  tran = other->n.tran;
  132.   
  133. ***************
  134. *** 93,116 ****
  135.                     t->dcache = (int *) par_list( tran );
  136.                 else
  137.                   {
  138. !                   if( n_par == cur_par )
  139.                       {
  140. -                       tptr *tempp;
  141. -                       int o_par;
  142. -                       o_par = cur_par;
  143. -                       cur_par += INC_PARALLEL;
  144. -                       tempp = (tptr *) Valloc(sizeof(tptr) * cur_par);
  145. -                       if (parallel_xtors != (tptr *) 0) {
  146. -                           bcopy(parallel_xtors, tempp, o_par * sizeof(tptr));
  147. -                           Vfree(parallel_xtors);
  148. -                       }
  149. -                       parallel_xtors = tempp;
  150.                         WarnTooManyParallel();
  151. ! #ifdef notdef
  152. !                       t->tflags |= PBROKEN;    simply ignore it */
  153.                         continue;
  154. - #endif
  155.                       }
  156.                     tran->n_par = n_par++;
  157.                     tran->tflags |= PARALLEL;
  158. --- 81,91 ----
  159.                     t->dcache = (int *) par_list( tran );
  160.                 else
  161.                   {
  162. !                   if( n_par >= MAX_PARALLEL )
  163.                       {
  164.                         WarnTooManyParallel();
  165. !                       t->tflags |= PBROKEN;           /* simply ignore it */
  166.                         continue;
  167.                       }
  168.                     tran->n_par = n_par++;
  169.                     tran->tflags |= PARALLEL;
  170. ***************
  171. *** 132,138 ****
  172.   
  173.   public void WarnTooManyParallel()
  174.     {
  175. - #ifdef notdef
  176.       static  int  did_it = FALSE;
  177.   
  178.       if( did_it )
  179. --- 107,112 ----
  180. ***************
  181. *** 143,149 ****
  182.       lprintf( stderr, "you will need to increase this limit in '%s'\n",
  183.         __FILE__ );
  184.       did_it = TRUE;
  185. - #else
  186. -     lprintf( stderr, "Increasing parallel transistor list to %d.\n", cur_par);
  187. - #endif
  188.     }
  189. --- 117,120 ----
  190. Exit 1
  191. *** gentbl.c    Tue May 15 04:19:09 1990
  192. --- gentbl.c.orig       Fri Jan 26 09:43:06 1990
  193. ***************
  194. *** 174,178 ****
  195.                   }
  196.           }
  197.       fprintf( out, "\n};\n" );
  198. -     exit(0);
  199.     }
  200. --- 174,177 ----
  201. Exit 1
  202. *** rsim.c      Tue Apr 24 19:45:52 1990
  203. --- rsim.c.orig Mon Jan 29 19:46:20 1990
  204. ***************
  205. *** 1580,1590 ****
  206.       if( targc == 2 and (logfile = fopen( targv[1], "w" )) == NULL )
  207.         error( filename, lineno, "cannot open log file %s for output\n",
  208.           targv[1] );
  209. - #ifdef SYS_V
  210. -     setvbuf(logfile, (char *) 0, _IOLBF, BUFSIZ);
  211. - #else
  212. -     setlinebuf(logfile);
  213. - #endif
  214.       return( 0 );
  215.     }
  216.   
  217. --- 1580,1585 ----
  218.  
  219.  
  220. -- 
  221. ----------------------------------------------------------------------
  222. Mark Linderman            |         Cornell University
  223. linder@ee.cornell.edu     | Department of Electrical Engineering
  224. ----------------------------------------------------------------------
  225.