piel.tools.hdl21#
Submodules#
Functions#
|
Configures the NGSPICE simulation for the circuit and returns a simulation options class. |
|
|
|
|
|
Runs the simulation for the circuit and returns the results. |
|
This function converts a numeric value to a number under a SPICE unit closest to the base prefix. This allows us |
Package Contents#
- configure_ngspice_simulation(run_directory: piel.types.PathTypes = '.')[source]#
Configures the NGSPICE simulation for the circuit and returns a simulation options class.
- Parameters:
run_directory (PathTypes) – Directory where the simulation will be run.
- Returns:
Configured NGSPICE simulation options.
- Return type:
vsp.SimOptions
- configure_transient_simulation(testbench: piel.types.AnalogueModule, stop_time_s: float, step_time_s: float, **kwargs)[source]#
- run_simulation(simulation: Any, simulator_name: Literal['ngspice'] = 'ngspice', simulation_options: Any = None, to_csv: bool = True)[source]#
Runs the simulation for the circuit and returns the results.
- Parameters:
simulation (h.sim.Sim) – HDL21 simulation class.
simulator_name (Literal["ngspice"]) – Name of the simulator to use.
simulation_options (Optional[vsp.SimOptions]) – Options for the simulation. Defaults to None.
to_csv (bool) – Whether to save the results to a CSV file. Defaults to True.
- Returns:
Results of the simulation.
- Return type:
hs.SimResult