bag3_testbenches.measurement.digital.delay_match

Module Contents

Classes

DelayMatch

This class tweaks a given parameter to match two delays.

class bag3_testbenches.measurement.digital.delay_match.DelayMatch(*args: Any, **kwargs: Any)[source]

Bases: bag3_testbenches.measurement.search.IntervalSearchMM

This class tweaks a given parameter to match two delays.

This class adjusts a given parameter using binary search to try and match the delay of two different paths, or the delay of a single path to a target number. Most often this is used to extract input capacitance.

Assumptions:

  1. There are no corner or parameter sweeps.

  2. the reference and adjust delay paths have the same out_invert value.

Notes

specification dictionary has the following entries:

adj_namestr

the adjust parameter name.

adj_signbool

True if increasing parameter value increases delay, False otherwise.

adj_paramsMapping[str, Any]

adjust delay path parameters.

ref_delayfloat

Optional. The target delay value.

ref_paramsMapping[str, Any]

reference delay path parameters. Used only if ref_delay is not present.

use_dutbool

Optional. True to instantiate DUT. Defaults to True.

search_paramsMapping[str, Any]

interval search parameters, with the following entries:

lowfloat

lower bound.

highOptional[float]

upper bound. If None, perform a unbounded binary search.

stepfloat

initial step size for unbounded binary search.

tolfloat

tolerance of the binary search. Terminate the search when it is below this value.

max_errfloat

Used only in unbounded binary search. If unbounded binary search exceeds this value, raise an error.

overhead_factorfloat

ratio of simulation startup time to time it takes to simulate one sweep point.

tbm_specsMapping[str, Any]

DigitalTranTB related specifications. The following simulation parameters are required:

t_sim :

total simulation time.

t_rst :

reset duration.

t_rst_rf :

reset rise/fall time.

t_bit :

bit value duration.

t_rf :

input pulse rise/fall time.

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.

pulse_listSequence[Mapping[str, Any]]

List of pulse sources. Each dictionary has the following entries:

pinstr

the pin to connect to.

tperUnion[float, str]

period.

tpwUnion[float, str]

the flat region duration.

trfUnion[float, str]

rise/fall time.

tdUnion[float, str]

Optional. Pulse delay in addition to any reset period. Defaults to 0.

posbool

Optional. True if this is a positive pulse (010). Defaults to True.

load_listSequence[Mapping[str, Any]]

Optional. List of loads. Each dictionary has the following entries:

pin: str

the pin to connect to.

typestr

the load device type.

valueUnion[float, str]

the load parameter value.

Initialize this MeasurementManager.

Returns:

  • tbm (TestbenchManager) – the TestbenchManager object.

  • tb_params (Mapping[str, Any]) – the testbench schematic parameters dictionary.

  • intv_params (Mapping[str, Mapping[str, Any]]) – A dictionary from search parameter name to its configuration dictionary. The values have the following entries:

    lowfloat

    lower bound.

    highOptional[float]

    upper bound. If None, perform a unbounded binary search.

    stepfloat

    initial step size for unbounded binary search.

    tolfloat

    tolerance of the binary search. Terminate the search when it is below this value.

    max_errfloat

    Used only in unbounded binary search. If unbounded binary search exceeds this value, raise an error.

    overhead_factorfloat

    ratio of simulation startup time to time it takes to simulate one sweep point.

  • intv_defaults (Mapping[str, Any]) – If any interval configuration are not specified, the value is taken from this dictionary.

  • has_init (bool) – True to run an initialization step.

  • use_dut (bool) – True to instantiate DUT.

process_init(cur_info: bag.simulation.measure.MeasInfo, sim_results: bag.simulation.cache.SimResults) Tuple[Dict[str, Any], bool][source]
process_output_helper(cur_info: bag.simulation.measure.MeasInfo, sim_results: bag.simulation.cache.SimResults, remaining: Set[str]) Mapping[str, Tuple[Tuple[float, float], Dict[str, Any], bool]][source]