bag.verification.calibre

This module implements LVS/RCX using Calibre and stream out from Virtuoso.

Module Contents

Classes

RCXMode

Generic enumeration.

NetlistType

Generic enumeration.

Calibre

A subclass of VirtuosoChecker that uses Calibre for verification.

Functions

_drc_passed_check(→ Tuple[bool, str])

Check if DRC passed

_lvs_passed_check(→ Tuple[bool, str])

Check if LVS passed

_lvl_passed_check(→ Tuple[bool, str])

Check if LVL passed

class bag.verification.calibre.RCXMode[source]

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

xrc = 0[source]
xact = 1[source]
qrc = 2[source]
starrc = 3[source]
class bag.verification.calibre.NetlistType[source]

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

SPF = 0[source]
SPECTRE = 1[source]
class bag.verification.calibre.Calibre(tmp_dir: str, root_dir: Dict[str, str], template: Dict[str, str], env_vars: Dict[str, Dict[str, str]], link_files: Dict[str, List[str]], params: Dict[str, Dict[str, Any]], rcx_program: str = 'pex', max_workers: int = 0, source_added_file: str = '', import_ref_lib: str = '', cancel_timeout_ms: int = 10000, enable_color: bool = False, **kwargs: Dict[str, Any])[source]

Bases: bag.verification.virtuoso.VirtuosoChecker

A subclass of VirtuosoChecker that uses Calibre for verification.

Parameters:
  • tmp_dir (str) – temporary directory to save files in.

  • root_dir (Dict[str, str]) – dictionary of root run directories.

  • template (Dict[str, str]) – dictionary of SVRF jinja template files.

  • env_vars (Dict[str, Dict[str, str]]) – dictionary of environment variables.

  • params (Dict[str, Dict[str, Any]]) – dictionary of default flow parameters.

  • rcx_program (str) – the extraction program name.

  • max_workers (int) – maximum number of sub-processes BAG can launch.

  • source_added_file (str) – the Calibre source.added file location. Environment variable is supported. If empty (default), this is not configured.

  • import_ref_lib (str) – the import reference libraries list file location. Environment variable is supported. If empty (default), this is not configured.

  • cancel_timeout_ms (int) – cancel timeout in milliseconds.

  • enable_color (bool) – True to enable coloring in GDS export.

get_rcx_netlists(lib_name: str, cell_name: str) List[str][source]

Returns a list of generated extraction netlist file names.

Parameters:
  • lib_name (str) – library name.

  • cell_name (str) – cell_name

Returns:

netlists – a list of generated extraction netlist file names. The first index is the main netlist.

Return type:

List[str]

setup_drc_flow(lib_name: str, cell_name: str, lay_view: str = 'layout', layout: str = '', params: Optional[Dict[str, Any]] = None, run_dir: Union[str, pathlib.Path] = '') Sequence[bag.verification.base.FlowInfo][source]
setup_lvs_flow(lib_name: str, cell_name: str, sch_view: str = 'schematic', lay_view: str = 'layout', layout: str = '', netlist: str = '', params: Optional[Dict[str, Any]] = None, run_rcx: bool = False, run_dir: Union[str, pathlib.Path] = '') Sequence[bag.verification.base.FlowInfo][source]
setup_rcx_flow(lib_name: str, cell_name: str, sch_view: str = 'schematic', lay_view: str = 'layout', layout: str = '', netlist: str = '', params: Optional[Dict[str, Any]] = None, run_dir: Union[str, pathlib.Path] = '') Sequence[bag.verification.base.FlowInfo][source]
_setup_flow_helper(lib_name: str, cell_name: str, layout: Optional[str], netlist: Optional[str], lay_view: str, sch_view: str, user_params: Optional[Dict[str, Any]], mode: str, run_cmd: List[str], check_fun: Callable[[Optional[int], str], Any], run_dir_override: Union[str, pathlib.Path], str_suffix: str = '') List[bag.verification.base.FlowInfo][source]
_make_control_file(mode: str, run_dir: pathlib.Path, ctl_params: Dict[str, str]) pathlib.Path[source]
setup_lvl_flow(gds_file: str, ref_file: str, run_dir: Union[str, pathlib.Path] = '') Sequence[bag.verification.base.FlowInfo][source]
bag.verification.calibre._drc_passed_check(retcode: int, log_file: str) Tuple[bool, str][source]

Check if DRC passed

Parameters:
  • retcode (int) – return code of the LVS process.

  • log_file (str) – log file name.

Returns:

  • success (bool) – True if LVS passed.

  • log_file (str) – the log file name.

bag.verification.calibre._lvs_passed_check(retcode: int, log_file: str) Tuple[bool, str][source]

Check if LVS passed

Parameters:
  • retcode (int) – return code of the LVS process.

  • log_file (str) – log file name.

Returns:

  • success (bool) – True if LVS passed.

  • log_file (str) – the log file name.

bag.verification.calibre._lvl_passed_check(retcode: int, log_file: str) Tuple[bool, str][source]

Check if LVL passed

Parameters:
  • retcode (int) – return code of the LVL process.

  • log_file (str) – log file name.

Returns:

  • success (bool) – True if LVL passed.

  • log_file (str) – the log file name.