bag3_testbenches.measurement.digital.flop.char
Module Contents
Classes
Characterize all timing constraints of a flop. |
|
Generate fake timing constraints of a flop. |
Functions
|
|
|
- class bag3_testbenches.measurement.digital.flop.char.FlopTimingCharMM(meas_specs: Mapping[str, Any], log_file: str, log_level: pybag.enum.LogLevel = LogLevel.DEBUG, precision: int = 6)[source]
Bases:
bag.simulation.measure.MeasurementManager
Characterize all timing constraints of a flop.
Assumes that timing margin is between [-t_clk_per/4, t_clk_per/4]
Notes
specification dictionary has the following entries:
- flop_paramsMapping[str, Any]
flop parameters.
- delay_thresfloat
Defaults to 0.05. Percent increase in delay for setup/hold constraints. Use infinity to disable. At least one of delay_thres or delay_inc must be specified. If both are given, both constraints will be satisfied.
- delay_incfloat
Defaults to infinity. Increase in delay in seconds for setup/hold constraints. At least one delay_thres or delay_inc must be specified. If both are given, both constraints will be satisfied.
- constraint_min_mapMapping[Tuple[str, bool], float]
mapping from measurement mode to min constraint map.
- sim_env_namestr
Use to query for sim_env dependent timing offset.
- tbm_clsUnion[str, Type[FlopTimingBase]]
The testbench class.
- tbm_specsMapping[str, Any]
TestbenchManager specifications.
- c_loadfloat
load capacitance for input constraint characterizations.
- t_rf_listSequence[float]
list of input rise/fall time values for characterization.
- t_clk_rf_listSequence[float]
list of clock rise/fall time values for input characterization.
- t_clk_rf_firstbool
True if clock rise/fall time is the first axis of input characterization.
- out_swp_infoSequence[Any]
the swp_info object for output delay characterization.
- search_paramsMapping[str, Any]
interval search parameters, with the following entries:
- max_marginfloat
Optional. maximum timing margin in seconds. Defaults to t_clk_per/4.
- tolfloat
tolerance of the binary search. Terminate the search when it is below this value.
- overhead_factorfloat
ratio of simulation startup time to time it takes to simulate one sweep point.
- fakebool
Defaults to False. True to output fake data for debugging.
- use_dutbool
Defaults to True. True to instantiate DUT.
- wrapper_paramsMapping[str, Any]
Used only if simulated with a DUT wrapper. Contains the following entries:
- libstr
wrapper library name.
- cellstr
wrapper cell name.
- paramsMapping[str, Any]
DUT wrapper schematic parameters.
- pinsSequence[str]
wrapper pin list.
- power_domainMapping[str, Tuple[str, str]
power domain of wrapper.
- 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 get_in_timing(name: str, sim_db: bag.simulation.cache.SimulationDB, dut: Optional[bag.simulation.cache.DesignInstance], sim_dir: pathlib.Path, meas_mode: bag3_testbenches.measurement.digital.flop.base.FlopMeasMode, fake: bool, t_clk_rf: float, t_rf: float, ck_idx: int, rf_idx: int, arr_shape: Tuple[int, Ellipsis], t_clk_rf_first: bool, timing_table: Dict[str, Any]) None [source]
- async get_out_timing(name: str, sim_db: bag.simulation.cache.SimulationDB, dut: Optional[bag.simulation.cache.DesignInstance], sim_dir: pathlib.Path, tbm_cls: Type[bag3_testbenches.measurement.digital.flop.base.FlopTimingBase], meas_mode: bag3_testbenches.measurement.digital.flop.base.FlopMeasMode, fake: bool, timing_table: Dict[str, Any]) None [source]
- class bag3_testbenches.measurement.digital.flop.char.FlopTimingFakeMM(meas_specs: Mapping[str, Any], log_file: str, log_level: pybag.enum.LogLevel = LogLevel.DEBUG, precision: int = 6)[source]
Bases:
bag.simulation.measure.MeasurementManager
Generate fake timing constraints of a flop.
Notes
specification dictionary has the following entries in addition to IntervalSearchMM:
- flop_paramsMapping[str, Any]
map from pin name to timing constraint values.
- t_rf_listSequence[float]
list of input rise/fall time values for characterization.
- t_clk_rf_listSequence[float]
list of clock rise/fall time values for input characterization.
- t_clk_rf_firstbool
True if clock rise/fall time is the first axis of input characterization.
- out_swp_infoSequence[Any]
the swp_info object for output delay characterization.
- 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]
- bag3_testbenches.measurement.digital.flop.char._get_arr_table(timing_table: Dict[str, Any], pin_name: str, ttype_str: str, timing_info: Mapping[str, Any]) Dict[str, Any] [source]
- bag3_testbenches.measurement.digital.flop.char._get_out_data(tbm: bag3_testbenches.measurement.digital.flop.base.FlopTimingBase, data: Optional[bag.simulation.data.SimData], out_pin: str, edge: bag3_testbenches.measurement.data.tran.EdgeType, data_shape: Tuple[int, Ellipsis]) Tuple[numpy.ndarray, numpy.ndarray] [source]