bag3_testbenches.measurement.char
Package Contents
Classes
A class that creates and setups up a testbench for simulation, then save the result. |
|
A class that handles circuit performance measurement. |
Functions
|
assume yc = jwC |
|
assume res and ind in series; cap in parallel |
|
assume yc = (1/R) + jwC; returns C, R |
|
- class bag3_testbenches.measurement.char.CharSPTB(sim: Optional[bag.simulation.base.SimAccess], work_dir: pathlib.Path, tb_name: str, impl_lib: str, specs: Mapping[str, Any], sim_view_list: Optional[Sequence[Tuple[str, str]]], env_list: Optional[Sequence[str]], precision: int = 6, logger: Optional[pybag.core.FileLogger] = None)[source]
Bases:
bag.simulation.core.TestbenchManager
A class that creates and setups up a testbench for simulation, then save the result.
This class is used by MeasurementManager to run simulations.
- Parameters:
sim (SimAccess) – the simulator interface object.
work_dir (Path) – working directory path.
tb_name (str) – testbench name.
impl_lib (str) – unused. Remain for backward compatibility.
specs (Mapping[str, Any]) – testbench specs.
sim_view_list (Optional[Sequence[Tuple[str, str]]]) – unused. Remain for backward compatibility.
env_list (Optional[Sequence[str]]) – unused. Remain for backward compatibility.
precision (int) – numeric precision in simulation netlist generation.
logger (Optional[FileLogger]) – the logger object.
Notes
The specification dictionary for all testbenches have the following entries:
- sim_envsSequence[str]
list of simulation environments.
- sim_paramsMapping[str, Any]
simulation parameters dictionary.
- swp_infoUnion[Sequence[Any], Mapping[str, Any]]
Optional. the parameter sweep data structure.
- sim_options: Mapping[str, Any]
Optional. Simulator-specific options.
- monte_carlo_params: Mapping[str, Any]
Optional. If specified, will run Monte Carlo with the given parameters.
- classmethod get_schematic_class() Type[bag.design.module.Module] [source]
- get_netlist_info() bag.simulation.data.SimNetlistInfo [source]
Returns the netlist information object.
- Returns:
netlist_info – the simulation netlist information object.
- Return type:
- class bag3_testbenches.measurement.char.CharSPMeas(meas_specs: Mapping[str, Any], log_file: str, log_level: pybag.enum.LogLevel = LogLevel.DEBUG, precision: int = 6)[source]
Bases:
bag.simulation.measure.MeasurementManager
A class that handles circuit performance measurement.
This class handles all the steps needed to measure a specific performance metric of the device-under-test. This may involve creating and simulating multiple different testbenches, where configuration of successive testbenches depends on previous simulation results. This class reduces the potentially complex measurement tasks into a few simple abstract methods that designers simply have to implement.
- async async_measure_performance(name: str, sim_dir: pathlib.Path, sim_db: bag.simulation.cache.SimulationDB, dut: Optional[bag.simulation.cache.DesignInstance], harnesses: Optional[Sequence[bag.simulation.cache.DesignInstance]] = None) Mapping[int, Mapping[str, Any]] [source]
A coroutine that performs measurement.
- Parameters:
name (str) – name of this measurement.
sim_dir (Path) – simulation directory.
sim_db (SimulationDB) – the simulation database object.
dut (Optional[DesignInstance]) – the DUT to measure.
harnesses (Optional[Sequence[DesignInstance]]) – the list of DUT and harnesses to measure.
- Returns:
output – the measurement results.
- Return type:
Mapping[str, Any]
- async async_meas_case(name: str, sim_dir: pathlib.Path, sim_db: bag.simulation.cache.SimulationDB, dut: Optional[bag.simulation.cache.DesignInstance], sim_env: str, ibias: float = 0.0) Mapping[str, Any] [source]
- bag3_testbenches.measurement.char.estimate_cap(freq: numpy.ndarray, yc: numpy.ndarray) float [source]
assume yc = jwC
- bag3_testbenches.measurement.char.estimate_ind(freq: numpy.ndarray, zc: numpy.ndarray) Mapping[str, float] [source]
assume res and ind in series; cap in parallel