This file is indexed.

/usr/bin/sea is in alliance 5.1.1-1.1build1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
#!/bin/bash
#
# $Id: sea.sh,v 1.6 2005/03/18 12:18:09 jpc Exp $
#
# /------------------------------------------------------------------\
# |                                                                  |
# |        A l l i a n c e   C A D   S y s t e m                     |
# |  S i l i c o n   E n s e m b l e / A l l i a n c e               |
# |                                                                  |
# |  Author    :                      Jean-Paul CHAPUT               |
# |  E-mail    :           alliance-users@asim.lip6.fr               |
# | ================================================================ |
# |  Script    :         "./sea.sh"                                  |
# | **************************************************************** |
# |  U p d a t e s                                                   |
# |                                                                  |
# \------------------------------------------------------------------/
#


# --------------------------------------------------------------------
# Constants definitions.

                VL=0
    script_SE_init="./se_script_init.mac"
    script_SE_load="./se_script_load.mac"


# /------------------------------------------------------------------\
# |                                                                  |
# |                      Functions Definitions                       |
# |                                                                  |
# \------------------------------------------------------------------/
#
# --------------------------------------------------------------------
#  Function : "vecho()".

 vecho()
 {
   if [ $1 -le $VL ]; then
     if [ "$2" = "-n" ]; then
       printf "$3"
     else
       echo   "$2"
     fi
   fi
 }


# --------------------------------------------------------------------
# Function : "title()".

 title()
 {
   if [ $VL -ge 1 ]; then
     echo ""
     alcbanner "Sissi" "1.00" "Alliance Silicon Ensemble Front End" "2000"
     echo ""
   fi
 }


# --------------------------------------------------------------------
# Function : `print_usage()'.

 print_usage()
 {
   echo ""
   echo ""
   echo "Usage: sea.sh [--verbose] [--very-verbose] [--help]             \\"
   echo "              [--keep-se] [--keep-tmp] [--no-deflib]            \\"
   echo "              [--memory <SIZE>] [--ansi] [--batch]              \\"
   echo "              [lef_def_file [lef_def_file]]                     \\"
   echo "       sea.sh [-vVhkKNb] [-m <SIZE>]                            \\"
   echo ""
   echo "Options:"
   echo "    o [--help|-h]                : print this help."
   echo "    o [--verbose|-v]             : be verbose."
   echo "    o [--very-verbose|-V]        : be very verbose :-)."
   echo "    o [--batch|-b]               : batch mode."
   echo "    o [--memory|-m <SIZE>]       : uses <SIZE> Mo for memory. Legal"
   echo "        memory sizes are 12, 24, 36, 48, 60, 72, 84, 96, 108, 120,"
   echo "        150, 200, 250, 300, 400, 500, 800, 1200, 1600, 1900."
   echo "    o [--ansi]                   :"
   echo "        run in text mode only (do not start the graphic interface)."
   echo "    o [--keep-se|-K]             : keep SE temporary files."
   echo "    o [--keep-tmp|-k]            : keep SEA temporary files."
   echo "    o [--no-deflib|-N]           :"
   echo "        Do not load defaults technology, libraries and settings"
   echo "        (i.e. sxlib & cmos)."
   echo "    o [lef_def_file]             :"
   echo "        LEF or DEF file to load.  The files should be given with"
   echo "        their extention (.lef or .def)."
   echo ""
   echo ""
 }


# --------------------------------------------------------------------
# Function : `set_SE_env()'.

 set_SE_env()
 {
   OPUS_DIR=/users/soft/opus/5/Solaris/DSMSE-5.4; export  OPUS_DIR

   PATH=${PATH}:${OPUS_DIR}/tools/bin
   PATH=${PATH}:${OPUS_DIR}/tools.sun4v/bin
   PATH=${PATH}:${OPUS_DIR}/tools.sun4v/dfII/bin
   PATH=${PATH}:${OPUS_DIR}/tools.sun4v/dsm/bin
   PATH=${PATH}:${OPUS_DIR}/frame/bin
   PATH=${PATH}:${OPUS_DIR}/bin
   export PATH; hash -r
 }


# --------------------------------------------------------------------
# Function : `load_LEF_TECHNO_NAME()'.

 load_LEF_TECHNO_NAME()
 {
   if [ "$LEF_TECHNO_NAME" != "" ]; then
     vecho 2 "  o  Loading LEF_TECHNO_NAME."
   else
     vecho 2 "  o  Loading default LEF_TECHNO_NAME."
     LEF_TECHNO_NAME=$ALLIANCE_TOP/etc/cmos.lef
   fi

   vecho 2 "     - $LEF_TECHNO_NAME"
   vecho 2 ""
   add_script_SE_load lef $LEF_TECHNO_NAME \
     $script_SE_init > /dev/null 2>&1
 }


# --------------------------------------------------------------------
# Function : `norm_CATA_DIR()'.

 norm_CATA_DIR()
 {
   aDir="$1"

   echo `echo $aDir | sed 's,//,/,g
                           s,/$,,'`
 }


# --------------------------------------------------------------------
# Function : `load_MBK_CATA_LIB()'.

 load_MBK_CATA_LIB()
 {
   vecho 1 "  o  Loading MBK_CATA_LIB."
   NDIR=1
   CATA_dir=`echo ${MBK_CATA_LIB}:END | cut -d ':' -f $NDIR`

   while [ "$CATA_dir" != "END" ]; do
     CATA_dir=`norm_CATA_DIR $CATA_dir`

     if [ "$CATA_dir" != "." ]; then
       CATA_name=`echo $CATA_dir | sed 's,.*/,,'`.lef

       vecho 2 "     - $CATA_dir/${CATA_name}"
       if [ ! -f "$CATA_dir/${CATA_name}" ]; then
         echo "sea:warning: LEF file not found \"$CATA_dir/${CATA_name}\"."
       else
         add_script_SE_load lef "$CATA_dir/${CATA_name}" \
           $script_SE_init > /dev/null 2>&1
       fi
     fi

     NDIR=`expr $NDIR + 1`
     CATA_dir=`echo ${MBK_CATA_LIB}:END | cut -d ':' -f $NDIR`
   done
   vecho 2 ""
 }


# --------------------------------------------------------------------
# Function : `rm_SE_db()'.

 rm_SE_db()
 {
   rm -f LBRARY.* *.dtp *.rpt *.opt.def *.opt.lef '&1'
 }


# --------------------------------------------------------------------
# Function : `rm_SEA_tmp()'.

 rm_SEA_tmp()
 {
   rm -f $script_SE_init $script_SE_load
 }


# --------------------------------------------------------------------
# Function : `clean_sea()'.

 clean_sea()
 {
   if [ "$TAIL_pid" != "" ]; then kill -KILL $TAIL_pid; fi

   if [ "$keepSE"  = "n" ]; then rm_SE_db; fi
   if [ "$keepTmp" = "n" ]; then rm_SEA_tmp; fi
 }


# --------------------------------------------------------------------
# Function : `abort_sea()'.

 abort_sea()
 {
   clean_sea

   exit 1
 }


# --------------------------------------------------------------------
# Function : `add_script_SE_init()'.

 add_script_SE_init()
 {
   aScript="$1"
      aMAC="$2"

   if [ ! -f "$aScript" ]; then
     echo "sea.sh:error: Script not found: \"$aScript\"."
     exit  1
   fi

   echo " EXEC $aScript ;" >> $aMAC
 }


# --------------------------------------------------------------------
# Function : `add_script_SE_load()'.

 add_script_SE_load()
 {
   aType="$1"
   aFile="$2"
    aMAC="$3"

   vecho 2 "     - LEF/DEF/mac to load : \"$aFile\"."

   if [ ! -f "$aFile" ]; then
     echo "sea.sh:error: LEF/DEF/mac not found: \"$aFile\"."
     exit  1
   fi

   case $aType in
     "lef") echo " INPUT LEF FILENAME \"$aFile\" ;" >> $aMAC;;
     "def") echo " INPUT DEF FILENAME \"$aFile\" ;" >> $aMAC;;
     "mac") echo " EXEC \"$aFile\" ;"               >> $aMAC;;
     *) echo "sea.sh(add_script_SE_load):error:"
        echo "  Invalid type \"$aType\"."
        exit 1;;
   esac
 }


# /------------------------------------------------------------------\
# |                                                                  |
# |                  Main Part of the Shell Script                   |
# |                                                                  |
# \------------------------------------------------------------------/
#


# SIGINT  :  2 (^C).
# SIGQUIT :  3
# SIGTERM : 15 (sent from a kill).
 trap abort_sea 2 3 15


# --------------------------------------------------------------------
# Process the command line.


     devel="n"
    keepSE="n"
   keepTmp="n"
    defLib="y"
 argMemory=""
    argJNL="-j=sea.jnl"
     argGD=""
  argBatch=""


 rm -f $script_SE_init
 rm -f $script_SE_load


 while [ $# -gt 0 ]; do

   case $1 in
     --devel)        devel="y";;
     --help)         print_usage; exit 0;;
     --verbose)      VL=1;;
     --very-verbose) VL=2;;
     --keep-se)      keepSE="y";;
     --keep-tmp)     keepTmp="y";;
     --no-deflib)    defLib="n";;
     --ansi)         argGD="-gd=ansi";;
     --batch)        argBatch="-b";;
     --memory)
          if [ $# -ge 2 ]; then
            argMemory="-m=$2"
            shift
          else
            echo "sea.sh:error: Missing <SIZE> argument."
            print_usage; exit 1
          fi;;

     --*) echo "sea.sh:error: Invalid option \`$1'."
          print_usage; exit 1;;

     -*) lSwitch="$1"; NB=2; CH=`echo $lSwitch | cut -c$NB`

         while [ "$CH" != "" ]; do
           case $CH in
             D) devel="y";;
             h) print_usage; exit 0;;
             v) VL=1;;
             V) VL=2;;
             K) keepSE="y";;
             k) keepTmp="y";;
             N) defLib="n";;
             a) argGD="-gd=ansi";;
             b) argBatch="-b";;
             m) if [ $# -ge 2 ]; then
                  argMemory="-m=$2"
                  shift
                else
                  echo "sea.sh:error: Missing <SIZE> argument."
                  print_usage; exit 1
                fi;;

             *) echo "sea.sh:error: Invalid option \`$CH'."
                print_usage; exit 1;;
           esac

           NB=`expr $NB + 1`
           CH=`echo $lSwitch | cut -c$NB`
         done;;

     *) # Unmatched argument, find if this is a LEF, DEF or mac file.
        if echo "$1" | grep '\.lef$' > /dev/null 2>&1; then
          add_script_SE_load lef "$1" $script_SE_load
        else if echo "$1" | grep '\.def$' > /dev/null 2>&1; then
          add_script_SE_load def "$1" $script_SE_load
        else if echo "$1" | grep '\.mac$' > /dev/null 2>&1; then
          add_script_SE_load mac "$1" $script_SE_load
        else
          echo "sea.sh:error: Invalid argument: \"$1\"."
          print_usage; exit 1
        fi; fi; fi
        ;;
   esac

   shift
 done


 title


# --------------------------------------------------------------------
# Consistency checks.


 if [ -z "$ALLIANCE_TOP" ]; then
   echo "sea.sh:error: \$ALLIANCE_TOP is not set, please set your Alliance"
   echo "              environment."
   exit 1
 fi

 if [ "`uname`" != "SunOS" ]; then
   echo "sea.sh:error: Must be run only under Solaris OS."
   echo "              (current OS : \"$ALLIANCE_OS\")"
   exit 1
 fi


 if [ "$devel" = "y" ]; then
   ALLIANCE_TOP="/users/cao/jpc/alliance/Solaris"

   echo "WARNING:"
   echo "WARNING: You are using the developement version."
   echo "WARNING: Resetting \$ALLIANCE_TOP to \"$ALLIANCE_TOP\"."
   echo "WARNING:"
   echo ""
   echo ""
 fi


# --------------------------------------------------------------------
# Script at work.


 rm_SE_db
 set_SE_env

 if [ "$defLib" = "y" ]; then
   vecho 2 "  o  Loading defaults settings."
   vecho 2 ""
   add_script_SE_init $ALLIANCE_TOP/etc/se_defaults.mac $script_SE_init

   load_LEF_TECHNO_NAME
   load_MBK_CATA_LIB
 fi
 if [ -f "$script_SE_load" ]; then
   cat "$script_SE_load" >> "$script_SE_init"
 fi

 vecho 1 "  o  Running Silicon Ensemble."
 if [ ! -f "$script_SE_init" ]; then
   sedsm $argMemory $argJNL $argGD $argBatch &
   SE_pid="$!"

   if [ $VL -ge 2 ]; then
     sleep 2; tail -f sea.jnl &
     TAIL_pid="$!"
   fi
   wait $SE_pid
 else
   if [ "$argBatch" != "" ]; then
     if [ $VL -ge 2 ]; then
       echo  "  o  Silicon Ensemble output follow (in 2s)."

       (sleep 5; exec tail -f sea.jnl) &
       TAIL_pid="$!"
     fi

     SE_pid=`sedsm $argMemory \
                   $argJNL    \
                   $argGD     \
                   $argBatch  \
                   "EXEC $script_SE_init ;" 2>&1 > /dev/null |\
                   sed '1d
                        s,.*\[\([0-9]*\)\] Forking.*,\1,'`
   else
     sedsm $argMemory $argJNL $argGD "EXEC $script_SE_init ;"
   fi

  #echo "$SE_pid" > SE_pid
  #echo "  o  SE has forked."

 fi


 clean_sea


# --------------------------------------------------------------------
# That's all Folks.

 vecho 2 ""
 vecho 2 ""
 exit 0