File Naming Conventions
Understanding Simic's project structure and file extensions.
Overview
SIMIC reads and creates a variety of textual and binary files. This section describes SIMIC file naming conventions, and illustrates how to specify operating system dependent file names to SIMIC.
File Name Format
File Names and Extensions
SIMIC maintains a file naming convention that is oriented toward classifying files by project and function. Every file's name has two components; a name and an extension.
SIMIC supports an implicit (default) convention that associates the file's name with the project (typically, the name of the circuit being simulated) and its extension with file's contents.
Alternatively, the user can specify file names explicitly in each SIMIC run command that reads or writes a file, to assign file names in another manner. In this case, the format for completely specifying a file's name to SIMIC is:
<name>.<extension>
where <name> and <extension> follow the rules for valid file names in the current operating environment.
Most operating systems support the use of dot (.) in file names. For these systems, SIMIC reads and writes files whose names have the above format, whether file names are implicitly or explicitly specified. For those environments that use another format (such as IBM/CMS, which uses a space to delimit <name> and <extension>), SIMIC still expects the above format to maintain consistency. Internally, SIMIC automatically converts file names to the proper system representation.
File Names and System Compatibility
SIMIC file name and extension specifications may be constructed from:
- any sequence of characters beginning with an underscore (_), question mark (?) or an alphanumeric character (0-9, a-z, A-Z) and optionally containing more characters that are alphanumeric characters, underscores, question marks, hyphens, percent signs, exclamation marks, and periods, or
- any sequence of characters enclosed in single or double quotes.
However, the main consideration in selecting file names is compatibility with the operating system's file naming conventions; in general, there should be considerable overlap of valid system file names and valid SIMIC file names. Some valid system file names, though, may not be compatible with SIMIC; in order to specify a name that does not conform to the above rules, the name should be enclosed in either single or double quotes.
When SIMIC is operating in case-insensitive mode, choice of which quotes to use, or even whether to enclose valid SIMIC names in double quotes, depends on the operating system. Since some operating systems are case sensitive, SIMIC uses the following convention when operating in this mode:
- The case of all text enclosed in double quotes (") is preserved.
- If a name contains no double quotes, it is converted to lowercase.
- If substrings of a name are enclosed in double quotes, and others aren't, the substrings outside the quotes are converted to uppercase.
Of course, when SIMIC is operating in case-sensitive mode, (-s command line option) no case conversion occurs, so user-defined names must be directly system compatible.
Implicit File Names
If SIMIC needs to open a file whose name is not explicitly specified, it creates the name from a common user-supplied name and an extension that is dedicated to the run command being executed. This common name, called the default file name, is specified with the FILE (FI) keyword option of the DEFINE (DE) run command:
DEFINE FILE=<name>
Note that no extension is specified here, since this will depend on the run command.
Every SIMIC run command that reads or writes a file has an associated keyword for specifying the file's name (e.g., FILE, LFILE, SFILE). If this keyword is suffixed with a colon (:), then SIMIC will utilize the file's implicit name.
For example, as a result of the following run commands:
DEFINE FILE=proj1
GET LFILE:
WRITE FILE:
the listing file, proj1.lst, will be created by the GET command, and the simulation output file, proj1.wrt, will be created by the WRITE command.
The default file name can be changed at any time by entering a new DEFINE FILE command. For example, if the following run commands are issued after those shown above:
DEFINE FILE=proj2
WRITE FILE:
WARN FILE:
then subsequent simulation output will go to proj2.wrt, instead of proj1.wrt, and simulation warning messages will be written to proj2.wrn.
Note: The default file name itself has a default; if no
DEFINE FILEcommand has been issued, the default file name isnoname.
Explicit File Names
File names are explicitly specified by using the equals (=) form of run command keyword-fields instead of the colon (:) form. For example,
DEFINE FILE=proj1
WRITE FILE=proj2
WARN FILE:
explicitly specifies the simulation output file to be proj2.wrt, and implicitly specifies the warning message file to be proj1.wrn.
Note that, in this example, the simulation output file's default extension, wrt, was implicitly used even though the file's name was explicitly specified. If desired, the file extension can also be specified explicitly. For example,
WRITE FILE=proj2.writefile
specifies that the simulation output file is proj2.writefile. Here, the full file name, <name>.<extension>, has been specified.
Spanning Directories
If it is necessary to read or write files in a different directory, their names should be enclosed in either single or double quotes (depending on the operating system—see File Names and System Compatibility above), since the characters necessary to construct path or directory names are generally not valid characters for constructing SIMIC file names. File names containing directory names are system dependent. Examples:
WARN FILE="/home/projects/proj1.wrn"
WARN FILE='USER1:[MITCH.PROJECTS]PROJ1.WRN'
Both examples specify a file named proj1.wrn in a subdirectory name projects; the first example would be entered under the UNIX environment, the second under VMS. Note that the file extension must be specified in this format.
Standard Extensions Reference
| Extension | Description | Associated Command |
|---|---|---|
.net |
Network Description (SNL Source) | GET |
.run |
Run Command File | EXECUTE |
.lst |
Compilation/Listing File | GET LFILE: |
.wrt |
Simulation Output File | WRITE |
.brk |
Breakpoint History Log | BREAK FILE: |
.wrn |
Warning Message Log | WARN FILE: |
.tgn |
Tester Interface File | TGEN |
.hig/his |
Binary History Data | HISTORY |
.sav |
Simulation Checkpoint/State | SAVE/RESTORE |
.rnt |
Compiled Network Binary | GET SFILE: |
.qry |
Query Command Output | ? FILE: |
.ann |
Backannotation File | GET AFILE: |
.uns |
Unsensitized Faults File | SENSITIZE UFILE: |
.sel |
Selected Faults File (Incremental Test Generation) | FAULT LFILE: / SFILE: |
.rpf |
Fault Simulation Reports | FAULT RFILE: |