next up previous contents index
Next: .include or .inc Line Up: Title, Comments, Job Separation, Previous: .end Line   Contents   Index


.newjob Line

General Form:
.newjob

The .newjob line is recognized in files directly read by WRspice, and not in files read through .include/.lib directives (see below). When encountered during a source command, file parsing for the present circuit terminates, and lines that follow are taken as belonging to a new circuit deck. The script execution and other operations that usually occur at the end of a source operation are done before parsing (for a new circuit) resumes.

Thus, one can place multiple circuit descriptions in a single file, separated by .newjob lines. Sourcing the file is equivalent to sourcing each circuit independently and sequentially.

With no .newjob lines, when multiple files are listed on the command line in batch mode, or given to the source command, they are simply concatenated. With .newjob lines, it is possible to give multiple circuits within a single or several files. WRspice will source the circuits as if they were given individually, in sequence. The circuits may or may not coincide with the physical files - lines in the files between .newjob lines are concatenated. After a source of multiple circuits, the current circuit will be the last circuit read.

Batch mode is similar. A single batch job can run multiple circuits. Logical circuts are read, run, and output generated, in sequence. The individual circuits can be concatenetated into a single file, separated with .newjob lines, or a .newjob line can be added to the top of the individual circuit files. In the later case, ``wrspice -b file1 file2 ...'' would run each circuit in sequence. If the .newjob lines weren't present, WRspice would attempt to run a concatenation of the files. In batch mode, since it is possible to run multiple circuits, the .cache/.endcache feature can be used to advantage, without using a command script.

The line that follows a .newjob line is interpreted in exactly the same way as the first line of an input file, i.e., it is interpreted as a circuit title line except in a few cases. If the first line of an input file is a .newjob line, it will be ignored, except that when reading multiple files, it indicates that a new circuit should start, rather than concatenation of the file to previous input.

Although circuits run in this manner are independent, note that variables set by scripts associated with a circuit, for example, would remain set for the later circuits. Thus, there are potential side effects which must be considered.

The .cache/.endcache blocks work as they would in separate files. Only one cache block can appear in a circuit, but of course a file containing multiple circuits can contain multiple cache blocks.

The .newjob lines separate the input into separate groups of lines, so one must take care to ensure that all related .control, .verilog, etc., blocks and lines will appear in the correct group. There are no ``common'' lines.


next up previous contents index
Next: .include or .inc Line Up: Title, Comments, Job Separation, Previous: .end Line   Contents   Index
Stephen R. Whiteley 2022-09-18