bag3_analog.design.drv_shunt_peak

Module Contents

Classes

DrvShuntPeakDesigner

A design script class that attempts to find a globally optimal design via a characterization database.

class bag3_analog.design.drv_shunt_peak.DrvShuntPeakDesigner(*args, **kwargs)[source]

Bases: bag3_testbenches.design.optimize.base.OptDesigner

A design script class that attempts to find a globally optimal design via a characterization database.

The general design methodology is as follows: 1. Over a user-defined design space (multi-dimensional sweep of design variables), an array of designs are generated

and simulated simultaneously. Each design’s measurement results are stored in an HDF5 file, and the measurement results from all designs are combined and stored in a single HDF5 file to represent a characterization database.

  1. The measured results are then modeled as continuous multivariable functions by interpolating between adjacent design points.

  2. These models are passed into the optimization engine, which converges to a final design based on user-defined target specs.

Parameters:

dsn_specs (Mapping[str, Any]) –

The design script specifications. The following entries should be specified:

gen_specsUnion[Mapping[str, Any], Path, str]

The base/default generator parameters. For each set of design parameters, new generator parameters will be computed by overriding only the design variables. If a Path or str is specified, the argument will be treated as a path to a specs YAML file.

dsn_swp_paramsDict[str, Union[Dict[str, Union[str, float]], List[Union[str, float]], np.ndarray]]

The mapping of design sweep parameters (e.g., device sizing). Each combination is used to generate a unique DUT. Refer to the SweepParams constructor for more info. Defaults to {}.

sim_cfg_swp_paramsDict[str, Union[Dict[str, Union[str, float]], List[Union[str, float]], np.ndarray]]

The mapping of simulation configuration sweep parameters (e.g., biasing). Refer to the SweepParams constructor for more info. Defaults to {}.

sim_load_swp_paramsDict[str, Union[Dict[str, Union[str, float]], List[Union[str, float]], np.ndarray]]

The mapping of simulation load sweep parameters (e.g., capacitive loading). Refer to the SweepParams constructor for more info. Defaults to {}.

dsn_fixed_paramsDict[str, Any]

The mapping of design parameters to fixed (i.e., non-swept) values. This is useful for quickly changing certain design parameters by bypassing an update to gen_specs. Defaults to {}.

classmethod get_meas_var_list()[source]

Return the expected measurement variables. Used for caching.

async async_design(**kwargs: Any) Mapping[str, Any][source]
async verify_design(dut: bag.simulation.cache.DesignInstance, dsn_params: Dict[str, Any], sim_swp_params: Dict[str, Any]) Dict[str, Any][source]

Simulates and verifies design. This method is to be implemented by subclasses.

Parameters:
  • dut (DesignInstance) – The DUT.

  • dsn_params (Dict[str, Any]) – Design parameters.

  • sim_swp_params (Dict[str, np.ndarray]) – Simulation sweep parameters.

Returns:

res – The measurement results.

Return type:

Dict[str, Any]

async run_sim(meas_name: str, mm_cls: Type[bag.simulation.measure.MeasurementManager], dut: bag.simulation.cache.DesignInstance, dsn_name: str, dsn_params: Dict[str, Any], sim_swp_params: Dict[str, Any]) Dict[str, Any][source]
static postproc_tran(data: Mapping[str, Any], dsn_params: Dict[str, Any]) Dict[str, Any][source]
static aggregate_results(res_list: List[Dict[str, Any]]) Dict[str, Any][source]
classmethod get_dut_gen_specs(is_lay: bool, base_gen_specs: bag.util.immutable.Param, gen_params: Mapping[str, Any]) Union[bag.util.immutable.Param, Dict[str, Any]][source]

Returns the updated generator specs with some design variables.

Parameters:
  • is_lay (bool) – True if DUT is layout, False if schematic.

  • base_gen_specs (Param) – The base/default generator specs.

  • dsn_params (Mapping[str, Any]) – The design variables.

Returns:

gen_specs – The updated generator specs.

Return type:

Union[Param, Dict[str, Any]]

classmethod get_em_dut_gen_specs(base_gen_specs: bag.util.immutable.Param, gen_params: Mapping[str, Any]) Union[bag.util.immutable.Param, Dict[str, Any]][source]

Returns the updated generator specs with some design variables.

Parameters:
  • base_gen_specs (Param) – The base/default generator specs.

  • gen_params (Mapping[str, Any]) – The design variables.

Returns:

gen_specs – The updated generator specs.

Return type:

Union[Param, Dict[str, Any]]