GenerateInitFile

The GenerateInitFile column in a testplan allows you to assign a new name to the .init file generated by SIMPLIS after each simulation. The .init file records the state of the circuit at the last time point of the simulation. For general information on initial conditions files, see the 2.1 Initial Conditions and Back Annotation topic in the Advanced SIMPLIS Training course.

In this topic:

The new filename is based on text provided in the field for the generateinitfile column and is combined with the schematic name to create a unique filename. The newly named .init file is saved in the DVM_SUPPORT subdirectory of the folder containing the schematic, making it unnecessary for you to specify a directory or path. The DVM_SUPPORT directory is automatically created if it does not exist.

To ensure that the resulting filename is a legal , the following changes are made automatically:

  • The identifier is transformed to all lowercase.
  • Spaces are replaced with underscores.
  • All non-alphanumeric characters are removed.

The resulting filename will contain only lower case letters, the numerals 0-9, and the underscore character. Additionally, the program uses a period to join different parts of the filename, for example, a period is used between the schematic name and the text provided in the testplan entry field.

After generating the .init file, you can include it in a simulation deck by placing the same identifier in an IncludeInitFile column of the testplan. The text provided in the IncludeInitFile entry must exactly match the text in the GenerateInitFile entry.

The generateinitifile column can be blank.

Example

You can download the initial conditions example here: init_files.zip

Schematic Configuration

This example schematic uses a simple L/C oscillator to demonstrate the generation and inclusion of initial conditions files. The capacitor has a schematic initial condition of 1.0V, this initial condition is used when no initial conditions file is included. For tests where an initial conditions file is included in the simulation, the included initial conditions override the schematic initial conditions.

The Multi-Step analysis parameter name and the values are set on the schematic's DVM Control Symbol, in this example, the FBASE parameter is stepped over three values. The "Save state" checkbox is checked, which tells SIMPLIS to generate an array of initial conditions files, one for each stepped parameter value:

  • FBASE=900k
  • FBASE=1Meg
  • FBASE=1.25Meg

The inductor value L is calculated from FBASE in the schematic's F11 window.

The Monte Carlo simulation is setup on the DVM Control Symbol to run 8 steps with a starting seed value of 123. The "Save state" checkbox is checked, which tells SIMPLIS to generate an array of initial conditions files, one for each Monte Carlo seed value.

Testplan

The testplan for this example is included in the zip archive: init_files.zip, and is shown below is a table.

1   ***        
2   *** init_files_example.testplan        
3   ***       these entries put the graphs on the overview report
4   *?@ analysis includeinitfile label generateinitfile promote
5   ***        
6       INIT Files|Single Step|Generate single PromoteGraph(Oscillator, 100, 1, Generate-Single )
7     single INIT Files|Single Step|Include   PromoteGraph(Oscillator, 90, 1, Include-Single )
8   ***        
9   Multi-Step   INIT Files|Multi-Step|Generate three_frequencies,multi-step PromoteGraph(Oscillator, 80, 1, Generate-Multi-Step )
10   Multi-Step three_frequencies,multi-step INIT Files|Multi-Step|Include   PromoteGraph(Oscillator, 70, 1, Include-Multi-Step )
11   Multi-Step single INIT Files|Multi-Step|Include Single File - Generate Templated Files from_single,multi-step PromoteGraph(Oscillator, 60, 1, Include-Single )
12   ***        
13   MonteCarlo   INIT Files|Monte Carlo|Seed=123|Generate eight_steps_seed_123,montecarlo PromoteGraph(Oscillator, 50, 1, Generate-Monte Carlo )
14   MonteCarlo eight_steps_seed_123,montecarlo INIT Files|Monte Carlo|Seed=123|Include   PromoteGraph(Oscillator, 40, 1, Include-Monte Carlo )
15   ***        
16   MonteCarlo( 4 , SEED=3000 )   INIT Files|Monte Carlo|Seed=3000|Generate four_steps_seed_3000,montecarlo PromoteGraph(Oscillator, 30, 1, Generate-Monte Carlo 3000 )
17   MonteCarlo( 4 , SEED=3000 ) four_steps_seed_3000,montecarlo INIT Files|Monte Carlo|Seed=3000|Include   PromoteGraph(Oscillator, 20, 1, Include-Monte Carlo 3000 )

A test-by-test explanation is as follows:

Single Step

The first test is located on line 6. This test runs a single simulation, just as if you pressed F9. The includeinitfile column is empty and the generateinitfile column has the entry single. This test generates an initial conditions file with the following name:

init_files.single.init

The second test, located on line 7 includes this initial conditions file in the simulation.

Multi-Step

The first multi-step test is located on line 9, and it generates an array of initial conditions files with this generateinitfile entry:

three_frequencies,multi-step

The generated initial conditions files will have these names:

three_frequencies.init_files_FBASE=900k.init
three_frequencies.init_files_FBASE=1Meg.init
three_frequencies.init_files_FBASE=1.25Meg.init

The second multi-step test on line 10 includes these initial conditions files.

The third multi-step test demonstrates the inclusion of a single initial conditions file and the generation of an array of initial conditions files. The included initial conditions file was created in the first test.

Monte Carlo

Two examples of generating and including initial conditions files are demonstrated in this testplan. The first example uses the DVM Control Symbol values for the Monte Carlo, namely, eight steps and a starting seed of 123. The generateinitfile entry of:

eight_steps_seed_123,montecarlo

generates these eight initial conditions files:

eight_steps_seed_123.init_files_123.init
eight_steps_seed_123.init_files_2067261.init
eight_steps_seed_123.init_files_337175501.init
eight_steps_seed_123.init_files_384717259.init
eight_steps_seed_123.init_files_613744155.init
eight_steps_seed_123.init_files_834051741.init
eight_steps_seed_123.init_files_1281840491.init
eight_steps_seed_123.init_files_2017191533.init

The next test includes these files in the simulation. The second example is similar, except it uses four steps and a starting seed of 3000. The initial conditions files generated are unique and will not conflict with the earlier Monte Carlo example in which eight steps were run from a starting seed of 123.

Running the Testplan

You can run this testplan with the DVM Menus:

  • DVM > Run > Choose Testplan...
  • DVM > Run > Run Schematic's Default Testplan

Testplan Syntax

The entries in the GenerateInitFile and IncludeInitFile columns can be one of these four forms:

  • textstring
  • textstring,multi-step
  • textstring,montecarlo
  • textstring,multitoneac

The text textstring is any text used to identify the initial conditions for this test.

Single Simulations

The first form is used for a single step simulation. When textstring is placed in a GenerateInitFile column, the program will make a copy of the .init file generated by SIMPLIS, and save that file to the DVM_SUPPORT directory. The file will have the following naming convention, where <schematic_name> is the name of the schematic, and textstring is the entry in the DVM testplan:

<schematic_name>.textstring.init

Tests which have a IncludeInitFile entry with textstring as it's entry will include this initial conditions file.

Important: Each IncludeInitFile entry must have a matching test with a GenerateInitFile entry which generates the initial conditions file. Additionally, the matching test must be located earlier in the testplan than the test which includes the initial conditions file.
Note: Once the initial conditions file has been generated and exists on disk in the DVM_SUPPORT directory, you don't need to run the test which generates the initial conditions file.

Multi-Step and Monte Carlo Simulations

Starting with version 8.10e, DVM supports generation and inclusion of an array of initial condition files for Multi-Step and Monte Carlo simulations. In order to use this feature, you must check the "Save state" checkbox on the DVM Control Panel for either Multi-Step or Monte Carlo simulations. This directs the program to name the initial conditions files with the stepped parameter values for a multi-step analysis or the seed value for a Monte Carlo analysis. Additionally, for a Monte Carlo analysis, you must provide a seed value, as this guarantees the simulation will use the same seed values for both the test which generates the init file and the test which includes the file. The syntax is as follows:

  • textstring,multi-step
  • textstring,montecarlo

In this form, textstring is any text, and multi-step and montecarlo are special keywords. Note that the text string to identify the initial conditions files and the keyword are separated by a comma. These two entries instruct DVM to make copies of all .init files generated during the Multi-Step or Monte Carlo simulation, and save these files into the DVM_SUPPORT directory.

The filenames generated by the program will be determined by the stepped parameter values, or the Monte Carlo seed values. For a multi-step simulation where FBASE is stepped over three values:

  • FBASE=900k
  • FBASE=1Meg
  • FBASE=1.25Meg

SIMPLIS will create three initial conditions files and the generateinitfile entry of:

textstring,multi-step

will generate these three files in the DVM_SUPPORT directory:

textstring.<schematic_name>_FBASE=900k.init
textstring.<schematic_name>_FBASE=1Meg.init
textstring.<schematic_name>_FBASE=1.25Meg.init

For nested multi-step simulations, the created filenames will include each parameter value with an underscore separating the parameter name/value pairs. No additional actions are required to use this syntax for nested multi-step.

Files created during a Monte Carlo simulation will have the seed values included in the filename where the stepped parameter values are located in the above filenames. One .init file will be generated for each Monte Carlo step.

Multi-Tone AC Analysis Simulations

This form of entry is only used for the Multi-Tone AC analysis and it requires you to run an AC analysis test objective. The Multi-Tone AC Analyses use special sources and loads to inject multiple frequencies into the circuit under test. The initial conditions file needs to be "keyed" to these injection values. There are five relevant parameters:

  1. start frequency
  2. end frequency
  3. injection amplitude
  4. sweep type
  5. number of frequencies

The generateinitfile entry of

textstring,multitoneac
Will produce a single init file with this format:
<schematic_name>.textstring^<start frequency>^<end frequency>^<injection amplitude>^<sweep type>^<number of frequencies>.init

As the linear sweep doesn't use the number of frequencies entry, this is omitted from the init filename.