c
c     Copyright (c) 1999,2000, Compaq Computer Corporation
c
c     See the file "license.terms" for information on usage and redistribution
c     of this file, and for a DISCLAIMER OF ALL WARRANTIES.
c
c     Print run information
c
      subroutine runinfo
      implicit none
c
c     Programmer: John Faricelli
c     Date: 22-Aug-85
c
      include 'const.h'
      include 'sysdep.cmn'
      include 'mesh.cmn'
      include 'data.cmn'
      include 'io.cmn'
      include 'bincodes.cmn'
c
c     locals
c
      integer ilen1, ilen2, string_len
      real CM2ANG
      parameter ( CM2ANG = 1.0E8 )
      character*1 response
      character*25 model_name
c
      if( .NOT. datafile_loaded ) then
         write(luttyo,10)
10       format(' ','No data file has been loaded')
      else if( binfiletype .eq. DT_MINIMOS ) then
c        Decode model name
         if( model .eq. 1 ) then
            model_name = '1-D'
         else if( model .eq. 2 ) then
            model_name = 'THRESH'
        else if( model .eq. 3 ) then
            model_name = '2-D'
         else if( model .eq. 4 ) then
            model_name = 'AVAL'
         else if( model .eq. 5 ) then
            model_name = 'HOT'
         else
            model_name = 'UNKNOWN'
         endif
c
c        Only in aval, hot models is id .ne. is
         if( model .lt. 4 ) is = id
c
         call clear_screen
         write(luttyo,100) model_name, chtyp, temperature,
     1                     vs, vg, vd, vb, id, is, ib, tox*CM2ANG,
     1                     xl*CM2MU, xw*CM2MU
100      format(' ','Information about MINIMOS run'//
     1          ' ','Model          = ',a10/
     1          ' ','Channel type   = ',a1/
     1          ' ','Temperature    = ',f8.1,' K'//
     1          ' ','Source voltage = ',f8.3,' V'/
     1          ' ','Gate   voltage = ',f8.3,' V'/
     1          ' ','Drain  voltage = ',f8.3,' V'/
     1          ' ','Bulk   voltage = ',f8.3,' V'//
     1          ' ','Drain  current  = ',1pe12.3,' A'/
     1          ' ','Source current  = ',1pe12.3,' A'/
     1          ' ','Bulk   current  = ',1pe12.3,' A'//
     1          ' ','Oxide thickness = ',0pf12.2,' Angstrom'/
     1          ' ','Gate length     = ',0pf12.2,' microns'/
     1          ' ','Gate width      = ',0pf12.2,' microns'/)
c
         if( in_binary_file(INTERFACE_CHARGE_CODE) ) then
            write(luttyo,151)
151         format(' ','Interface charge data found in the binary ',
     1                 'file.')
         endif
      else
         call clear_screen
         if( binfiletype .eq. DT_PROMIS ) then
            model_name = 'PROMIS'
         else if( binfiletype .eq. DT_SUPREM3S ) then
            model_name = 'SUPREM3 STRUCTURE'
         else if( binfiletype .eq. DT_SUPREM3P ) then
            model_name = 'SUPREM3 PRINT MINIMOS'
         else if( binfiletype .eq. DT_BAMBI ) then
            model_name = 'BAMBI'
         else if( binfiletype .eq. DT_USEOUT ) then
            model_name = 'USEOUT'
         else if( binfiletype .eq. DT_2DOP ) then
            model_name = 'MINIMOS DOPING'
         else if( binfiletype .eq. DT_SUPREM4 ) then
            model_name = 'SUPREM4'
         else if( binfiletype .eq. DT_TIF ) then
            model_name = 'TIF'
         else if( binfiletype .eq. DT_PISCES ) then
            model_name = 'PISCES'
         else if( binfiletype .eq. DT_VLSICAP ) then
            model_name = 'VLSICAP'
         else if( binfiletype .eq. DT_FAIM ) then
            model_name = 'FAIM'
         else if( binfiletype .eq. DT_MCP2D ) then
            model_name = 'MCP2D'
         else if( binfiletype .eq. DT_MEDICI ) then
            model_name = 'MEDICI'
         else if( binfiletype .eq. DT_ASCII ) then
            model_name = 'ASCII'
         else if( binfiletype .eq. DT_CALLABLE ) then
            model_name = 'CALLABLE'
         else
            model_name = 'Unknown'
         endif
         ilen1 = string_len(model_name)
         ilen2 = string_len(binfilename)
         write(luttyo,200) model_name(1:ilen1), binfilename(1:ilen2)
200      format(' ','Information about ',a,' datafile'/
     1          ' ','Datafile name: ',a)
      endif
c
      write(luttyo,300)
300   format(/' ','Hit return to continue ',$)
      read(luttyi,301) response
301   format(a1)
      return
      end
