Product Documentation
Dracula Reference
Product Version IC23.1, September 2023

C


Running Dracula

Appendix C focuses on Running Dracula.

Running a Dracula DRC/ERC Job

To run a DRC or an ERC job, complete the following steps.

  1. Change to the directory where the job is to run.
  2. Run the preprocessor to generate the jxrun.com file.
    PDRACULA or PDRACULA2
  3. Type
    : /get filename.com
    : /fin

    The jxrun.com file is the UNIX version submitted to run the Dracula job. PDRACULA is the preprocessor for DRACULA III, and PDRACULA2 is for DRACULA II.

Submitting the jxrun.com File

Running Other Dracula Programs

You can execute the other interactive Dracula programs by entering the following commands:

LOGLVS (LVS Network Compiler)

LPEPRO (LPE Postprocessor)

These names are aliases of their all-cap equivalents.

UNIX Commands

The following UNIX commands might help you use Dracula.

ps

Gives process status

kill <number>

Kills a background job

df

Checks disk space

Control-c

Stops a foreground job

tail <filename>

Lists last 10 lines of file name

tail -f <filename>

Lets you output the file as it is written. Lets you monitor a big job while still storing a log file.

cat <filename>

Displays a file

ls

Lists a directory

ls -l

Lists a directory in long format

cp

Copies a file

ftp

Transfers files to and from a remote network site

mkdir

Creates a directory

rm

Deletes a file

cd

Changes directory

lpr

Prints a file

Sun:

pstat -s

Checks swap space

Sun or HP:

swapon -a <filename>

Adds swap space. filename is a file created with the UNIX mkfile command.

swapon {special}

Adds swap space. special is the block device made available to the system for allocation.

reboot

Reboots the system

You must have root privileges to execute the above three commands.

System Requirements

To run Dracula, the recommended system has 32 Mbytes of physical memory and a disk drive with a minimum of 300 Mbytes.

These estimates of needed memory are conservative. Because Release 4.4 uses dynamic memory allocation, it only takes 5 to 10 Mbytes to verify small designs (for example, 2000 transistors).

The recommended “swap space” is 20X memory size for a single Dracula job. If the system is used by more than one user or used to run more than one Dracula job, a larger swap space is recommended.

If you are running large Dracula jobs and encounter the system error message “NOT ENOUGH MEMORY,” increase the swap space.

Because of dynamic memory allocation, Dracula allocates memory as needed. If there is no more memory left in the system to allocate, Dracula aborts with following message:

 * /F*   ERROR:  function flloc can’t allocate memory
** ABORT AT ROUTINE : falloc   STATEMENT # = 1

Increase the swap space to make up for the lack of memory.

After you change the system’s swap space, back up and reformat the disks, then reload them with the backed-up data or use swap. The disk swap space must be contiguous. Refer to your system’s installation guide for further information.

HP: The system’s default swap space for each process is 25 Mbytes. You might need to increase this space for large jobs. Check with your system administrator before making a change because this change involves rebuilding the kernel.

UNIX Case-Sensitivity Enhancements

All commands and responses to questions are case insensitive. File names, however, are case sensitive. Some commands, as described below, also search for different file name extensions.

The first file found that fits the file name is used. If no file fits any of the possible file names searched for, an error message occurs.

PDRACULA

All command keywords (such as /GET and /FIN) are case insensitive.

/g filename searches for

filename (where filename is taken literally, case sensitive) filename.rul filename.RUL filename.com filename.COM

in that order.

/g /dir-path/filename searches for

/dir-path/filename (where filename and 
dir-path are taken literally)

and again for .rul, .RUL, .com, and .COM in that order.

The file name can contain periods (for example, drc.1a) and can be any combination of upper and lower case. The dir-path is also taken literally with any legal UNIX character accepted. Total /dir-path/filename length cannot exceed 128 characters, including any extension.

/g  ../filename searches as above one level up the directory.

/ed /(optional)dir-path/filename edits exactly

/dir-path/filename 

/f creates lowercase jx files

jxrun.com 
jxsub.com

and so forth. Non-jx files remain uppercase.

/f filename creates

filename.com (where filename is taken literally) 
jxsub.com

and so forth.

In the input rules file (commonly referred to as the RULE, or .rul or .com or rules file), command keywords are case insensitive (for example, INDISK=indisk, AND=and, SELECT=select).

Where inputs to commands include the dollar sign ($), the following rule applies: input that is a UNIX path assumes that “$” refers to a variable set externally by a set command; input that is not a UNIX path accepts “$” as a valid character, not as an externally set variable.

Examples:

PRINTFILE=filename

All files affected by the command have lowercase extensions.

filename.log     (where filename is taken literally, case sensitive) 
filename.sum
filename.lvs
filename.mlg
filename.psm
filename.msm
filename.err

INDISK=filename searches for

filename          (where filename is taken literally) 
filename.db
filename.DB
filename.DAT

in that order.

OUTDISK=filename creates the literal file name without extension.

PROGRAM-DIR=/dir-path/ is interpreted literally. Maximum of 128 characters. The trailing / is required.

SCHEMATIC=filename searches for

filename           (where filename is taken literally) 
filename.DAT

in that order.

You can specify an optional /dir-path/ (for example, SCHEMATIC=/dir-path/filename).

WORK-DIR=/dir-path/ is interpreted literally. Maximum of 128 characters.

LOGLVS

LOGLVS uses case-sensitive input file names and accepts full directory paths. All command keywords are case insensitive.

cir filename searches for

filename         (literal) 
filename.cir
filename.CIR
filename.DAT

lib filename searches for

filename         (literal) 
filename.teg
filename.TEG
filename.DAT

inp filename searches for

filename         (literal) 
filename.sil
filename.SIL
filename.ilo
filename.ILO
filename.DAT

cel filename searches for

filename      (literal) 
filename.tab
filename.TAB

cir $abc/filename searches for filename with dir-path defined by $abc

cir $file searches for filename defined by variable $file

cir /dir-path/filename (dir-path and filename are taken literally)

con SUBCKT-name searches for

.SUBCKT SUBCKT-name (literal) 
.SUBCKT SUBCKT-NAME (all uppercase)
.SUBCKT subckt-name (all lowercase)

The LVSLOGIC.DAT file name is created as the default.

Batch Job Queuing Utility

Effective from June 2009, the dracq/dracbatch utilities are no longer supported. Although, these utilities will continue to be shipped in future Dracula releases. You use them at your own risk. Dracula has been using the FlexLM licencing scheme for quite some time, which already has built-in, automatic queuing capabilities.

Commands

dracq 
dracbatch

Syntax

dracq [-s] job [job ...] 
dracq -l 
dracq (-l|-r) job# [job# ...]
dracq (-l|-r) <login> 
dracbatch [maxJobNumber] & 

Options

s

Sets up job requests into the FIFO job queue

l

Lists job requests in the FIFO job queue

r

Removes job requests from the FIFO job queue

Description

The UNIX batch queuing system consists of two programs, dracq and dracbatch, which access the same job queue. The dracq program (like sender) places job requests containing command lines onto the FIFO queue. The dracbatch program (like server) removes a job request from the FIFO queue and executes the commands specified in it.

Once this job request is done, dracbatch removes the next job request in the queue and executes it until there are no more job requests waiting in the queue. Jobs are stored in first-in, first-out (FIFO) order, so jobs are executed in the order they are queued.

To specify a maximum number of jobs in the, specify a maximum job number for the dracbatch command. For example

$ dracbatch [maxJobNumber] &

If you specify a maximum job number of five, and there are three jobs in the queue, the fourth and fifth jobs join the queue. If there is a sixth job, it cannot join the queue and you must resubmit the job later when the active job finishes or a job is dequeued.

The dracq program has three functions:

Usage

dracq [-slr] [job ...]

Examples

dracq [-s] [path1/]job1 [[path2/]job2 ...]

Sets up job1, job2, and so on, into the FIFO job queue. When it is time to execute the jobs, the dracbatch daemon removes job1 from the queue, changes to the path1 directory, executes job1, removes job2 from the queue, changes to the path2 directory, executes job2, and so on.

The queuing system only takes a job request in the script format of jxsub.com, either in its name jxsub.com or any other user-defined name.

Following is an example of a job request, jxjob1. You can generate the job request file, jxjob1, by running PDRACULA to create jxsub.com, then renaming it to jxjob1. Submit the jxjob1 to the batch queue by issuing the command dracq -s jxjob1. The format of jxjob1 is shown below:

#!/bin/csh
setenv jclf "jxrun.com"
setenv logf "/usr/Dracula/bsdqa/drc/drc4/DRC4.log"
setenv msmf "/usr/Dracula/bsdqa/drc/drc4/DRC4.msm"
csh jxrun.int $jclf $logf $msmf $1 $2 >& \
/usr/Dracula/bsdqa/drc/drc4/DRC4.mlg&

The following example lists all jobs in the job queue. When there is no entry, a message “Currently no job in the queue” is displayed.

dracq -l

The following example lists all jobs queued by the user login. When there are no such jobs, a message “No job matching request” is displayed.

dracq -l <login>

The following example lists the requested numbered jobs only.

dracq -l <job#> [job# ...]

The following example removes all jobs queued by the user login. When there are no such jobs, a message “No job matching request” is displayed

dracq -r <login>

The following example removes the requested numbered jobs only

dracq -r <job#> [job# ...]

The following example specifies a maximum of three jobs are allowed in the queue. If you submit a forth job, you receive an error message telling you to resubmit the job later.

$ dracbatch 3 &

Installation

Before running these programs, verify that dracq and dracbatch are owned by root and have the proper protections:

cd /(path...)     #where dracq, dracbatch is accessed by all
chown root dracq dracbatch
chmod 6111 dracq
chmod 100 dracbatch

The location of these programs can be in the Dracula hierarchy if that hierarchy is on the same machine, or if it is copied elsewhere, for example, /usr/local.

Output files generated by dracq -s are stored in the /usr/spool/batch spooling directory.

To create this spooling directory, enter the following commands:

su root
cd /usr/spool
mkdir batch
chown root batch
chmod 777 batch
chmod g+s batch
vi /etc/rc.local

Add a conditional entry to execute dracbatch upon reboot to make sure the queue is always running.

The dracbatch program runs when the system is brought to multi-user operation (generally run level 2 for UNIX System V™). This can be done automatically by invoking dracbatch in one of the script files under
/etc/rc2.d (UNIX System V.3 and later) or by an entry in the /etc/rc file (System V.2 or BSD).

The following is a sample shell script for invoking dracbatch.

#
# Invoke the job queue execution daemon 
# 
# Only run this script if the previous run level was single-user mode(to avoid multiple invocations):
# 
if [ -x /usr/local/bin/dracbatch ] 
then
    /usr/local/bin/dracbatch & (echo -n ’ dracbatch ’) >
    /dev/console 
fi

Because dracq is for anyone who needs to queue a job, it must be executable by every user. It must be owned by root and stored in a local bin directory that all users have in their path (such as /usr/lbin or /usr/local/bin). It must also have 6111 permission (--s--s--x). Make sure that everyone can only access the resident dracq command on the machine running the batch queue. Because ownership and permissions are critical, do not put draq in a directory that might accidentally be accessed by others.

The dracbatch daemon is run by init at startup and must be owned by root with 100 permission mode (--x------).

The dracbatch daemon spawns a child shell to process the jobs in the batch queue. If there is no batch job in the queue, the dracbatch daemon spawns a child process and checks the batch queue every 30 seconds.

Scenario 1

Suppose there are three users (A, B, and C) logged in to the same machine (M). At one time, user A issues the dracq -s jxsubA command before user B issues the dracq -s jxsubB command; user C does not use the batch utility, but instead issues the jxsub.com command.

Therefore, on machine M, there are two Dracula jobs running (jxsubA of user A and jxsub.com of user C), and there is one Dracula job waiting in the queue for execution (jxsubB of user B). Job jxsubB executes when jxsubA is finished.

The batch queue utilities do not support break points, so you can only run the job request from stage 1 to the last stage.

When submitting multiple Dracula jobs at one time, dracq treats all the jobs as one batch job. For example, to submit multiple Dracula jobs:

% dracq -s drc/jxsub.com erc/ercjxsub.com lvs/lvljxsub.com

To list batch jobs:

% dracq -1
Rank       Owner       Job   Files
active mchang 13 jxsub.com,ercjxsub.com,
lvljxsub.com

To remove batch jobs:

% dracq -r 13

Dracq removes the 13th batch job; that is, the three Dracula jobs jxsub.com, ercjxsub.com, and lvljxsub.com.

Scenario 2

If you want to submit multiple Dracula jobs with multiple batch job listings, you can create a UNIX shell script file. Define a name for the file (for example, dracqmulti) and put the file in your local search $PATH. For example:

% dracqmulti drc/jxsub.com erc/ercjxsub.com lvs/lvljxsub.com

where dracqmulti is

   #!/bin/csh
foreach i ( $* )
dracq -s $i
end

To list batch jobs:

% dracq -1
Rank Owner Job Files
active mchang 13 jxsub.com
1 mchang 14 ercjxsub.com
2   mchang 15 lvljxsub.com

To remove batch jobs:

% dracq -r 13

Dracq removes only the 13th batch job (that is, the Dracula job, jxsub.com.).


Return to top
 ⠀
X