Despite the fact that the contents of both output files of MINIMOS-NT can be configured by the user in a very flexible way, it is still necessary to transform or process these outputs after the actual simulation has been finished. In order to simplify the interface between MINIMOS-NT and such post-processing steps, a new post-processing system directly administered by MINIMOS-NT has been introduced.
Most of the post-processing is normally done in separate scripts, which read and parse the output files of MINIMOS-NT and start some additional calculations. For example, the purpose of this can be data conditioning for visualization purposes or the generation of input files for the next simulation tool in a simulation flow. To simplify the calling procedures and to make an additional wrap-around script obsolete, MINIMOS-NT is now able to execute arbitrary shell commands and to call external programs.
But MINIMOS-NT can also provide additional post-processing steps based on its own output data. A simple example is the lastLine post-processing steps, which stores the last line of each curve file block in a new curve file. This feature is especially useful for conditional steppings (see Appendix B.3), for example after the extraction of the curve. Although the respective behavior could also be controlled directly in the curve output module depending on an input-deck keyword, it was decided to use this feature as a demonstration on how to implement MINIMOS-NT post-processing steps.
However, MINIMOS-NT was also equipped with a more sophisticated post-processing step, namely a Fast Fourier Transformation functionality. The implementation of the transformation itself is based on the code given in [165]. In addition, a general input-deck-based interface is provided for the user.
The user can specify an arbitrary number of post-processing steps, which are processed in a consecutive order. The respective input-deck section has the name PostProcessing.
It is basically structured as follows:
PostProcessing { postProcOnly = no; // Perform only post-processing steps printSteps = no; // Print available post-processing steps enter = yes; // Enable post-processing at all Steps { FirstStep { function = ""; } SecondStep { FirstSubStep { function = ""; } ... } ... } }
The simulator iterates over all subsections found in section PostProcessing.Steps. The kind of post-processing step to execute is specified in the function string. Each block can be deactivated by setting enter to no. Since post-processing uses per definition already calculated data, the preceding simulation can be completely skipped in case the output files are already present (postProcOnly). In addition, the user can request a short help (printSteps) to see which post-processing functions are available at all.
As stated above, the lastLine step is a very simple one. Therefore it is used to sketch the usage and implementation idea. All available post-processing steps can be derived from default steps. In case of lastLine this predefined step looks as follows:
StepDefaults { GeneralStep { enter = yes; // Perform function in this step? function = ""; // Function, such as "LastLine" or "FFT" } <GeneralIOStep> : GeneralStep { input = ""; // Input file output = ""; // Output file } LastLineStep : GeneralIOStep // Write last line of each block { // to new curve file function = "LastLine"; } }
The necessary inputs are already derived from other sections, so a typical instance can be defined very quickly:
PostProcessing { Steps { +LastLine : ^StepDefaults.LastLineStep { input = ~Curve.file; output = "ft_" + ~Curve.file; } } }
In this example, the simulation task is to start a conditional stepping in order to extract the curve. The output of each step is written to the file specified in the Curve section. This file is the input file for the post-processing step, whereas the output file name is simply the same name with a preceding ft_.