bag3_digital.measurement.stdcells.inv
Module Contents
Classes
A simple inverter measurement manager. |
- class bag3_digital.measurement.stdcells.inv.InvMeas(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 simple inverter measurement manager.
This class measures the input-output delay of an inverter, as well as the output rise/fall times. A rail-to-rail 50% duty-cycle square wave is used as the input. Average power is estimated using numpy.trapz.
Notes
The specification dictionary has the following entries in addition to the default ones:
- sim_paramsMapping[str, float]
Required entries are listed below.
- t_perfloat
The period of the input stimulus.
- t_rffloat
The rise/fall time of the input.
- c_loadfloat
The load capacitance at the output.
- sim_envsSequence[str]
The sequence of corners/simulation environments to characterize over.
- plotbool
Optional. True to plot time-domain waveforms for debug. Defaults to False.
- 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[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_pvt(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]], sim_env: str) Mapping[str, Union[numpy.ndarray, bag.simulation.data.SimData]] [source]
A coroutine that performs measurement for one corner.
- 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.
sim_env (str) – The simulation environment.
- Returns:
output – The measurement results. Contains the following entries:
- sim_dataSimData
The raw simulation data.
- delay_risenp.ndarray
The input-to-output delay for a low to high transition at the output.
- delay_fallnp.ndarray
The input-to-output delay for a high to low transition at the output.
- trans_risenp.ndarray
The output rise time.
- trans_fallnp.ndarray
The output fall time.
- pwr_avgnp.ndarray
The average power dissipation.
- Return type: