bag.design.database

This module defines the design database class.

Module Contents

Classes

ModuleDB

A database of all modules.

Attributes

ModuleType

bag.design.database.ModuleType[source]
class bag.design.database.ModuleDB(tech_info: bag.layout.tech.TechInfo, lib_name: str, log_file: str, prj: Optional[bag.core.BagProject] = None, name_prefix: str = '', name_suffix: str = '', log_level: pybag.enum.LogLevel = LogLevel.DEBUG)[source]

Bases: bag.util.cache.MasterDB

A database of all modules.

This class is a subclass of MasterDB that defines some extra properties/function aliases to make creating schematics easier.

Parameters:
  • tech_info (TechInfo) – the TechInfo instance.

  • lib_name (str) – the cadence library to put all generated templates in.

  • log_file (str) – the log file path.

  • prj (Optional[BagProject]) – the BagProject instance.

  • name_prefix (str) – generated schematic name prefix.

  • name_suffix (str) – generated schematic name suffix.

  • log_level (LogLevel) – the logging level.

property tech_info: bag.layout.tech.TechInfo[source]

the TechInfo instance.

classmethod get_schematic_class(lib_name: str, cell_name: str) Type[bag.design.module.Module][source]

Get the Python class object for the given schematic.

Parameters:
  • lib_name (str) – schematic library name.

  • cell_name (str) – schematic cell name.

Returns:

sch_cls – the schematic class.

Return type:

Type[Module]

get_model_netlist_template(fpath: pathlib.Path) jinja2.Template[source]
instantiate_schematic(design: bag.design.module.Module, top_cell_name: str = '', output: pybag.enum.DesignOutput = DesignOutput.SCHEMATIC, **kwargs: Any) None[source]

Alias for instantiate_master(), with default output type of SCHEMATIC.

batch_schematic(info_list: Sequence[Tuple[bag.design.module.Module, str]], output: pybag.enum.DesignOutput = DesignOutput.SCHEMATIC, **kwargs: Any) None[source]

Alias for batch_output(), with default output type of SCHEMATIC.

new_model(master: bag.design.module.Module, model_params: bag.util.cache.Param, **kwargs: Any) bag.design.module.Module[source]

Create a new schematic master instance with behavioral model information

Parameters:
  • master (Module) – the schematic master instance.

  • model_params (Param) – model parameters.

  • **kwargs (Any) – optional arguments

Returns:

master – the new master instance.

Return type:

Module

instantiate_model(design: bag.design.module.Module, model_params: bag.util.cache.Param, top_cell_name: str = '', **kwargs: Any) None[source]
batch_model(info_list: Sequence[Tuple[bag.design.module.Module, str, Mapping[str, Any]]], output: pybag.enum.DesignOutput = DesignOutput.SYSVERILOG, **kwargs: Any) Sequence[Tuple[bag.design.module.Module, str]][source]