Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tools:actsim [2023/04/14 15:33]
rajit [Mixed-signal simulation]
tools:actsim [2023/04/16 11:32] (current)
rajit [Using files for test data]
Line 303: Line 303:
  }  }
 </file> </file>
 +
 +This example will also need a file ''_infile_.0'' that contains the [[sim:start|list of values]].
 ===== Mixed-signal simulations ===== ===== Mixed-signal simulations =====
  
Line 366: Line 368:
  
 <code> <code>
-sim.device.analog_window +real analog_window 0.05
-sim.device.case_for_sim +
-sim.device.settling_time +
-sim.device.dump_all +
-sim.device.output_format +
-sim.device.waveform_steps +
-sim.device.waveform_time +
-sim.device.model_files +
-sim.device.outfile +
-sim.device.stop_time+
 </code> </code>
 +This specifies when an analog signal output should be treated as a digital 0 or digital 1.  The value 0.05 means within 5% of the rail-to-rail voltage. So for a 1V power supply, this would be 0.95 for a digital 1 threshold, and 0.05 for a digital 0 threshold.
  
 +<code>
 +int case_for_sim 1
 +</code>
 +SPICE is case-insensitive, and the internals of the analog simulator usually have either a lowercase or uppercase name for all the signals. Set this to 1 (the default, and correct value for Xyce) if it is uppercase, 0 for lowercase.
 +
 +<code>
 +real settling_time 1e-12
 +</code>
 +This is the settling time parameter for the built-in ADC device used to convert between the digital and analog signals.
 +
 +<code>
 +int dump_all 1
 +</code>
 +If this is true, all voltage signals should be saved to the output trace file. Otherwise, only the interface signals are saved to the trace file.
 +
 +<code>
 +string output_format "prn:lxt2:alint:vcd"
 +</code>
 +This specifies which output trace file formats should be generated from the underlying analog simulation engine. Any number of colon-separated formats are supported, but only one of the built-in formats (raw, prn, etc) can be used.
 +
 +<code>
 +int waveform_steps 10
 +real waveform_time 10e-12
 +</code>
 +The digital input is converted to a ramp before being fed to the analog simulation. This specifies the duration and number of steps used for the conversion.
 +
 +<code>
 +string model_files "path.sp"
 +</code>
 +By default, the simulation will look for the file ''models.sp'' in the ACT configuration directory. This string can be used to override this default and pick a different SPICE file that includes all the needed models.
 +
 +<code>
 +string outfile "xyce_out"
 +</code>
 +This is the name of the trace file output that is generated.
 +
 +<code>
 +real stop_time 100e-12
 +</code>
 +This is the time at which the trace file output should stop.
  
 ==== Standard sim namespace helper functions ==== ==== Standard sim namespace helper functions ====