bag.simulation.spectre
This module implements bag’s interface with spectre simulator.
Module Contents
Classes
This class handles interaction with Spectre simulators. |
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes
- class bag.simulation.spectre.SpectreInterface(tmp_dir: str, sim_config: Dict[str, Any])[source]
Bases:
bag.simulation.base.SimProcessManager
This class handles interaction with Spectre simulators.
- Parameters:
tmp_dir (str) – temporary file directory for SimAccess.
sim_config (Dict[str, Any]) –
the simulation configuration dictionary. Contains the following options:
- env_filestr
the yaml path for PVT corners.
- use_pysrrbool
True to use pysrr. Defaults to False.
- compressbool
True to compress simulation data when saving to HDF5 file. Defaults to True.
- rtol: float
relative tolerance for checking if 2 simulation values are the same. Defaults to 1e-8.
- atol: float
absolute tolerance for checking if 2 simulation values are the same. Defaults to 1e-22.
- kwargsDict[str, Any]
additional spectre simulation arguments. Contains the following options:
- commandstr
the command to launch simulator. Defaults to spectre.
- envOptional[Dict[str, str]]
an optional dictionary of environment variables. None to inherit from parent. Defaults to None.
- run_64bool
True to run in 64-bit mode. Defaults to True.
- formatstr
the output raw data file format. Defaults to psfxl.
- psfversionstr
the version of psfxl to use. If not specified, defaults to the simulator’s default psfversion.
- optionsList[str]
the command line simulator options. Defaults to an empty list.
- create_netlist(output_path: pathlib.Path, sch_netlist: pathlib.Path, info: bag.simulation.data.SimNetlistInfo, precision: int = 6) None [source]
- get_sim_file(dir_path: pathlib.Path, sim_tag: str) pathlib.Path [source]
- load_sim_data(dir_path: pathlib.Path, sim_tag: str) bag.simulation.data.SimData [source]
- async async_run_simulation(netlist: pathlib.Path, sim_tag: str) None [source]
- async _srr_to_hdf5(compress: bool, rtol: float, atol: float, raw_path: pathlib.Path, hdf5_path: pathlib.Path, log_path: pathlib.Path, cwd_path: pathlib.Path) None [source]
- async _format_monte_carlo(lines: List[str], cwd_path: pathlib.Path, compress: bool, rtol: float, atol: float, final_hdf5_path: pathlib.Path) None [source]
- bag.simulation.spectre._write_sim_env(lines: List[str], models: List[Tuple[str, str]], temp: int) None [source]
- bag.simulation.spectre._write_param_set(lines: List[str], params: Sequence[str], values: Sequence[bag.util.immutable.ImmutableList[float]], precision: int) None [source]
- bag.simulation.spectre._get_sweep_str(par: str, swp_spec: Optional[bag.simulation.data.SweepSpec], precision: int) str [source]
- bag.simulation.spectre._write_sweep_start(lines: List[str], swp_info: bag.simulation.data.SweepInfo, swp_idx: int, precision: int) int [source]
- bag.simulation.spectre._write_monte_carlo(lines: List[str], mc: bag.simulation.data.MonteCarlo) int [source]