🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lsi.cad
Article #635

Re: Parallel transistors in irsim

#635
From: Craig Chase
Date: Tue, 22 Dec 1992 02:32
216 lines
7154 bytes
killoran@ll.mit.edu (Mike Killoran) writes:
>We are trying to simulate a large chip (~700,000 transistors) with
>irsim.  There are many (almost 7,000) parallel transistors making 
>up the clock distribution cell.  When simulating this chip, irsim
>gives the following complaint about all of the parallel transistors:

>No problem, just edit conn_list.c, increase MAX_PARALLEL to 7000.
>Do the same in globals.h and then recompile.  No problem.  Right?

We had the problem with parallel transistors as well and fixed it by 
dynamically allocating the array and increasing its size as needed.  What 
follows is a context diff.  The first diff (to cad_dir.c) Is not really 
to your problem, but I include it anyway.  (BTW, these fixes were done 
by Christos Zoulas a couple years ago).

Good luck,
mark linderman (linder@ee.cornell.edu)


*** cad_dir.c   Tue Apr 24 20:21:29 1990
--- cad_dir.c.orig      Fri Jan 26 08:14:17 1990
***************
*** 18,24 ****
  
  public void InitCAD()
    {
!     char           *s, *h;
      struct passwd  *pwd;
      int            len;
  
--- 18,24 ----
  
  public void InitCAD()
    {
!     char           *s;
      struct passwd  *pwd;
      int            len;
  
***************
*** 48,57 ****
    go_it :
  
      len = strlen( s );
!     if ((h = getenv("HOSTTYPE")) == (char *) 0) 
!       h = "";
!     cad_lib = Valloc( len + 12 );
!     cad_bin = Valloc( len + 5 + strlen(h) );
!     sprintf( cad_lib, "%s/lib/irsim", s );
!     sprintf( cad_bin, "%s/bin/%s", s, h);
    }
--- 48,55 ----
    go_it :
  
      len = strlen( s );
!     cad_lib = Valloc( len + 5 );
!     cad_bin = Valloc( len + 5 );
!     sprintf( cad_lib, "%s/lib", s );
!     sprintf( cad_bin, "%s/bin", s );
    }
Exit 1
*** conn_list.c Wed Apr 25 08:51:34 1990
--- conn_list.c.orig    Tue Aug 29 04:29:56 1989
***************
*** 9,19 ****
  
  
  public
! #define       INC_PARALLEL    32      /* this is probably sufficient per stage */
!                               /* and we increment by that...           */
  
! public        tptr  *parallel_xtors = (tptr *) 0;
! private int cur_par = 0;
  
  public
  #define       par_list( T )           ( parallel_xtors[ (T)->n_par ] )
--- 9,17 ----
  
  
  public
! #define       MAX_PARALLEL    30      /* this is probably sufficient per stage */
  
! public        tptr  parallel_xtors[ MAX_PARALLEL ];
  
  public
  #define       par_list( T )           ( parallel_xtors[ (T)->n_par ] )
***************
*** 20,25 ****
--- 18,24 ----
  
  #define       hash_terms( T )         ( (Ulong)((T)->source) ^ (Ulong)((T)->drain) )
  
+ 
  /*
   * Build a linked-list of nodes (using nlink entry in Node structure)
   * which are electrically connected to node 'n'.  No special order
***************
*** 74,91 ****
              }
            else if( model != LIN_MODEL )
                continue;
!           else 
! #ifdef notdef
!           /* 
!            * Does this work all the time?
!            */
!           if( hash_terms( other->n.tran ) == hash_terms( t ) )
! #else
!           if (((other->n.tran->source == t->source) &&
!                (other->n.tran->drain  == t->drain ))    ||
!               ((other->n.tran->drain  == t->source) &&
!                (other->n.tran->source == t->drain ))) 
! #endif
              {                                     /* parallel transistors */
                register tptr  tran = other->n.tran;
  
--- 73,79 ----
              }
            else if( model != LIN_MODEL )
                continue;
!           else if( hash_terms( other->n.tran ) == hash_terms( t ) )
              {                                     /* parallel transistors */
                register tptr  tran = other->n.tran;
  
***************
*** 93,116 ****
                    t->dcache = (int *) par_list( tran );
                else
                  {
!                   if( n_par == cur_par )
                      {
-                       tptr *tempp;
-                       int o_par;
- 
-                       o_par = cur_par;
-                       cur_par += INC_PARALLEL;
-                       tempp = (tptr *) Valloc(sizeof(tptr) * cur_par);
-                       if (parallel_xtors != (tptr *) 0) {
-                           bcopy(parallel_xtors, tempp, o_par * sizeof(tptr));
-                           Vfree(parallel_xtors);
-                       }
-                       parallel_xtors = tempp;
                        WarnTooManyParallel();
! #ifdef notdef
!                       t->tflags |= PBROKEN;    simply ignore it */
                        continue;
- #endif
                      }
                    tran->n_par = n_par++;
                    tran->tflags |= PARALLEL;
--- 81,91 ----
                    t->dcache = (int *) par_list( tran );
                else
                  {
!                   if( n_par >= MAX_PARALLEL )
                      {
                        WarnTooManyParallel();
!                       t->tflags |= PBROKEN;           /* simply ignore it */
                        continue;
                      }
                    tran->n_par = n_par++;
                    tran->tflags |= PARALLEL;
***************
*** 132,138 ****
  
  public void WarnTooManyParallel()
    {
- #ifdef notdef
      static  int  did_it = FALSE;
  
      if( did_it )
--- 107,112 ----
***************
*** 143,149 ****
      lprintf( stderr, "you will need to increase this limit in '%s'\n",
        __FILE__ );
      did_it = TRUE;
- #else
-     lprintf( stderr, "Increasing parallel transistor list to %d.\n", cur_par);
- #endif
    }
--- 117,120 ----
Exit 1
*** gentbl.c    Tue May 15 04:19:09 1990
--- gentbl.c.orig       Fri Jan 26 09:43:06 1990
***************
*** 174,178 ****
                  }
          }
      fprintf( out, "\n};\n" );
-     exit(0);
    }
--- 174,177 ----
Exit 1
*** rsim.c      Tue Apr 24 19:45:52 1990
--- rsim.c.orig Mon Jan 29 19:46:20 1990
***************
*** 1580,1590 ****
      if( targc == 2 and (logfile = fopen( targv[1], "w" )) == NULL )
        error( filename, lineno, "cannot open log file %s for output\n",
          targv[1] );
- #ifdef SYS_V
-     setvbuf(logfile, (char *) 0, _IOLBF, BUFSIZ);
- #else
-     setlinebuf(logfile);
- #endif
      return( 0 );
    }
  
--- 1580,1585 ----


-- 
----------------------------------------------------------------------
Mark Linderman            |         Cornell University
linder@ee.cornell.edu     | Department of Electrical Engineering
----------------------------------------------------------------------
Technical Details
Message-ID: <1992Dec22.023221.1664@cs.cornell.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!rpi!batcomputer!cornell!cchase
References: <9212211416.PN26316@LL.MIT.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lsi.cad
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!rpi!batcomputer!cornell!cchase
From: cchase@cs.cornell.edu (Craig Chase)
Subject: Re: Parallel transistors in irsim
Message-ID: <1992Dec22.023221.1664@cs.cornell.edu>
Organization: Electrical Engineering, Cornell University, Ithaca NY
References: <9212211416.PN26316@LL.MIT.EDU>
Date: Tue, 22 Dec 1992 02:32:21 GMT
Lines: 216