bag3_digital.measurement.cap.max_trf

Module Contents

Classes

CapMaxRiseFallTime

Measures maximum output capacitance given maximum rise/fall time.

class bag3_digital.measurement.cap.max_trf.CapMaxRiseFallTime(*args: Any, **kwargs: Any)[source]

Bases: bag.simulation.measure.MeasurementManagerFSM

Measures maximum output capacitance given maximum rise/fall time.

Assumes that no parameters/corners are swept. Adds buffers to all input pins.

Notes

specification dictionary has the following entries:

in_pinstr

input pin name.

out_pinstr

output pin name.

max_trffloat

maximum rise/fall time, in seconds.

fakebool

Defaults to False. True to return fake data.

buf_paramsMapping[str, Any]

input buffer parameters.

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_rst :

reset duration.

t_rst_rf :

reset rise/fall time.

t_bit :

bit value duration.

t_rf :

input pulse rise/fall time.

initialize(sim_db: bag.simulation.cache.SimulationDB, dut: bag.simulation.cache.DesignInstance, harnesses: Optional[Sequence[bag.simulation.cache.DesignInstance]] = None) Tuple[bool, bag.simulation.measure.MeasInfo][source]

Initialize this MeasurementManager to get ready for measurement.

Parameters:
Returns:

  • done (bool) – If True, then do not run measurement.

  • info (MeasInfo) – the initial MeasInfo object.

get_sim_info(sim_db: bag.simulation.cache.SimulationDB, dut: bag.simulation.cache.DesignInstance, cur_info: bag.simulation.measure.MeasInfo, harnesses: Optional[Sequence[bag.simulation.cache.DesignInstance]] = None) Tuple[Union[Tuple[bag.simulation.core.TestbenchManager, Mapping[str, Any]], bag.simulation.measure.MeasurementManager], bool][source]

Get the testbench manager needed for the current measurement state.

Override to customize your testbench manager.

Parameters:
  • sim_db (SimulationDB) – the simulation database object.

  • dut (DesignInstance) – the design instance.

  • cur_info (MeasInfo) – the MeasInfo object representing the current measurement state.

  • harnesses (Optional[Sequence[DesignInstance]]) – the list of harness instances

Returns:

  • sim_object (Union[Tuple[TestbenchManager, Mapping[str, Any]], MeasurementManager]) – either a TestbenchManager/tb_params tuple, or a measurement manager instance.

  • use_dut (bool) – True to run simulation with DesignInstance.

process_output(cur_info: bag.simulation.measure.MeasInfo, sim_results: Union[bag.simulation.cache.SimResults, bag.simulation.cache.MeasureResult]) Tuple[bool, bag.simulation.measure.MeasInfo][source]

Process simulation output data.

Parameters:
  • cur_info (MeasInfo) – the MeasInfo object representing the current measurement state.

  • sim_results (Union[SimResults, MeasureResult]) – the simulation results object.

Returns:

  • done (bool) – True if this measurement is finished.

  • next_info (MeasInfo) – the updated measurement state.