KB: Parameterize values of circuit elements with formula in mixed-signal simulation
Solution Details
User defined parameters/formulas can be specified by placing a text frame object with its first line '.nsx' which is compiled as a part of Spice netlist to be simulated. Place ยป Text Frame with its first line '.nsx' which is compiled as a part of Spice netlist to be simulated. Following standard Spice syntax, a line starting with '.param' indicates parameter declaration, and if line change is desired for multiple parameters, the lines following can be prepended with plus character '+'.
Areas of SPICE User Code
If you prefer to keep the schematics clean, you may opt to define them as global parameters in Simulation Dashboard panel, under Analysis Setup & Run section, Settings button, on Global Parameters tab:
Global Parameters
Starting with AD22.6, there is an sample project bundled at the time of installation at the path C:\Users\Public\Documents\Altium\AD22\Examples\Simulation Quick Start, where, for example, 5_Changing the gain.SchDoc contains the usage of such parameterization.
Schematic Capture Improvements
Below section of our manual describes all functions/operators supported: Available Functions
A few words of caution on the use of Spice user code in the text frame object is that commands such as .op, .tran, .ac, .control are ignored intentionally, as it can interfere with those specified in Simulation Dashboard panel. Users who need such an advanced control over the SPICE better type it into a netlist and run the netlist directly. Please refer to another article how this is done: KB: Run mixed-signal simulation off of netlist generated externally to compare the results from other engines directly