.ibisami - IBIS-AMI Modeling Utilities

General IBIS-AMI utilities for PyBERT.

Original author: David Banas <capn.freako@gmail.com>

Original date: June 16, 2024

Copyright (c) 2024 David Banas; all rights reserved World wide.

A partial extraction of the old pybert/utility.py, as part of a refactoring.

pybert.utility.ibisami.run_ami_model(dll_fname: str, param_cfg: pyibisami.ami.parser.AMIParamConfigurator, use_getwave: bool, ui: float, ts: float, chnl_h: numpy.typing.NDArray.~Real, x: numpy.typing.NDArray.~Real, bits_per_call: int = 0) tuple[numpy.typing.NDArray.~Real, numpy.typing.NDArray.~Real, numpy.typing.NDArray.~Real, numpy.typing.NDArray.~Real, str, list[str]][source]

Run a simulation of an IBIS-AMI model.

Parameters:
  • dll_fname – Filename of DLL/SO.

  • param_cfg – A pre-configured AMIParamConfigurator instance.

  • use_getwave – Use AMI_GetWave() when True, AMI_Init() when False.

  • ui – Unit interval (s).

  • ts – Sample interval (s).

  • chnl_h – Impulse response input to model (V/sample).

  • x – Input waveform.

Keyword Arguments:

bits_per_call – Number of bits per call of GetWave(). Default: 0 (Means “Use existing value.”)

Returns:

A tuple consisting of

  • the model output convolved w/ any channel impulse response given in chnl_h,

  • the model determined sampling instants (a.k.a. - “clock times”), if appropriate,

  • the model’s impulse response (V/sample),

  • the impulse response of the model concatenated w/ the given channel (V/sample),

  • input parameters, and any message returned by the model’s AMI_Init() function, and

  • any output parameters from GetWave() if apropos.

Raises:
  • IOError – if the given file name cannot be found/opened.

  • RuntimeError – if the given model doesn’t support the requested mode.