bag.simulation.base
This module handles high level simulation routines.
This module defines SimAccess, which provides methods to run simulations and retrieve results.
Module Contents
Classes
A class that interacts with a simulator. |
|
An implementation of |
|
A class that interacts with an EM simulator. |
|
An implementation of |
Functions
|
|
|
|
|
- class bag.simulation.base.SimAccess(parent: str, sim_config: Mapping[str, Any])[source]
Bases:
abc.ABC
A class that interacts with a simulator.
- Parameters:
- property dir_path: pathlib.Path[source]
the directory for simulation files.
- Type:
Path
- abstract create_netlist(output_path: pathlib.Path, sch_netlist: pathlib.Path, info: bag.simulation.data.SimNetlistInfo, precision: int = 6) None [source]
- abstract get_sim_file(dir_path: pathlib.Path, sim_tag: str) pathlib.Path [source]
Returns path to the simulation file.
- abstract load_sim_data(dir_path: pathlib.Path, sim_tag: str) bag.simulation.data.SimData [source]
Load simulation results.
- abstract async async_run_simulation(netlist: pathlib.Path, sim_tag: str) None [source]
A coroutine for simulation a testbench.
- Parameters:
netlist (Path) – the netlist file name.
sim_tag (str) – optional simulation name. Empty for default.
- run_simulation(netlist: pathlib.Path, sim_tag: str) None [source]
- class bag.simulation.base.SimProcessManager(tmp_dir: str, sim_config: Mapping[str, Any])[source]
-
An implementation of
SimAccess
usingSubProcessManager
.- Parameters:
- property manager: bag.concurrent.core.SubProcessManager[source]
- class bag.simulation.base.EmSimAccess(parent: str, sim_config: Mapping[str, Any])[source]
Bases:
abc.ABC
A class that interacts with an EM simulator.
- Parameters:
- property dir_path: pathlib.Path[source]
the directory for simulation files.
- Type:
Path
- static _get_em_base_path(root_path: pathlib.Path) pathlib.Path [source]
- get_log_path(root_path: pathlib.Path) pathlib.Path [source]
Path: the directory for simulation files.
- abstract async async_gen_nport(cell_name: str, gds_file: pathlib.Path, params: Mapping[str, Any], root_path: pathlib.Path, run_sim: bool = False) pathlib.Path [source]
A coroutine for running EM sim to generate nport for the current module.
- Parameters:
- Returns:
sp_file – location of generated s parameter file
- Return type:
Path
- run_simulation(cell_name: str, gds_file: pathlib.Path, params: Mapping[str, Any], root_path: pathlib.Path) None [source]
- class bag.simulation.base.EmSimProcessManager(tmp_dir: str, sim_config: Mapping[str, Any])[source]
Bases:
EmSimAccess
,abc.ABC
An implementation of
EmSimAccess
usingSubProcessManager
.- Parameters:
- property manager: bag.concurrent.core.SubProcessManager[source]