C
Running Dracula
Appendix C focuses on Running Dracula.
- “Running a Dracula DRC/ERC Job”
- “System Requirements”
- “UNIX Case-Sensitivity Enhancements”
- “Batch Job Queuing Utility”
Running a Dracula DRC/ERC Job
To run a DRC or an ERC job, complete the following steps.
- Change to the directory where the job is to run.
-
Run the preprocessor to generate the jxrun.com file.
PDRACULA or PDRACULA2
-
Type
: /get filename.com : /fin
Submitting the jxrun.com File
-
To run a job in the foreground, enter the following command:
jxrun.com >& drc2.log
The log file is drc2.log. -
To run a job in the background, enter one of the following commands:
jxrun.com >& drc2.log & [.] 8432 (Job number)
The log file name is drc2.log.
orjxsub.com [.] 8433 (Job number)
The log file name is printfile.log. -
To run a job in the background from a break point, enter the following command:
jxrun.com BEGIN EXPAND >& drc2.log & [.] 8433
This entry runs the job in the background from the BEGIN to EXPAND break point names. The log file name is drc2.log.
Running Other Dracula Programs
You can execute the other interactive Dracula programs by entering the following commands:
These names are aliases of their all-cap equivalents.
UNIX Commands
The following UNIX commands might help you use Dracula.
|
Lets you output the file as it is written. Lets you monitor a big job while still storing a log file. |
|
Sun:
Sun or HP:
|
Adds swap space. filename is a file created with the UNIX mkfile command. |
|
|
Adds swap space. special is the block device made available to the system for allocation. |
|
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.
filename (where filename is taken literally, case sensitive) filename.rul filename.RUL filename.com filename.COM
/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
jxrun.com
jxsub.com
and so forth. Non-jx files remain uppercase.
filename.com (wherefilenameis taken literally)
jxsub.com
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.
- PROGRAM-DIR=$abc/ where abc = /usr/drac, is the same as PROGRAM-DIR=/usr/drac/
- SUB-PROG=SIZE $abc/ is similar to the previous example.
-
PRIMARY=Name$Xyz is interpreted as NAME$XYZ where $XYZ is not an external variable.
Note the uppercase. -
If CNAMES-CSEN=YES, the above example is instead Name$Xyz where $Xyz is not an external variable.
Note the mixed case.
All files affected by the command have lowercase extensions.
filename.log (wherefilenameis taken literally, case sensitive)
filename.sum
filename.lvs
filename.mlg
filename.psm
filename.msm
filename.err
filename (where filename is taken literally)
filename.db
filename.DB
filename.DAT
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
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.
filename (literal)
filename.cir
filename.CIR
filename.DAT
filename (literal)
filename.teg
filename.TEG
filename.DAT
filename (literal)
filename.sil
filename.SIL
filename.ilo
filename.ILO
filename.DAT
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)
.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
Commands
dracq
dracbatch
Syntax
dracq [-s] job [job ...] dracq -l dracq (-l|-r) job# [job# ...] dracq (-l|-r) <login> dracbatch [maxJobNumber] &
Options
Sets up job requests into the FIFO job queue
Lists job requests in the FIFO job queue
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:
- Puts job requests into the queue
- Lists job requests currently in the queue
- Deletes job requests from the queue
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.
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
% dracq -1
Rank Owner Job Files
active mchang 13 jxsub.com,ercjxsub.com,
lvljxsub.com
% 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
#!/bin/csh
foreach i ( $* )
dracq -s $i
end
% dracq -1
Rank Owner Job Files
active mchang 13 jxsub.com
1 mchang 14 ercjxsub.com
2 mchang 15 lvljxsub.com
% dracq -r 13
Dracq removes only the 13th batch job (that is, the Dracula job, jxsub.com.).
Return to top