bag.interface.skill
This module implements all CAD database manipulations using skill commands.
Module Contents
Classes
Skill interface between bag and Virtuoso. |
Functions
|
Convert given parameter dictionary to pcell parameter list format. |
|
Convert given python list to a skill list string. |
|
Given a Python dictionary, convert to sorted item list. |
|
Given instance map from DesignModule, format it for database changes. |
- bag.interface.skill._dict_to_pcell_params(table: Dict[str, Any]) List[Any] [source]
Convert given parameter dictionary to pcell parameter list format.
- Parameters:
table (Dict[str, Any]) – the parameter dictionary.
- Returns:
param_list – the Pcell parameter list
- Return type:
List[Any]
- bag.interface.skill.to_skill_list_str(pylist: List[str]) str [source]
Convert given python list to a skill list string.
- bag.interface.skill.dict_to_item_list(table: Dict[str, Any]) List[List[str]] [source]
Given a Python dictionary, convert to sorted item list.
- bag.interface.skill.format_inst_map(inst_map: Dict[str, Any]) List[List[Any]] [source]
Given instance map from DesignModule, format it for database changes.
- Parameters:
inst_map (Dict[str, Any]) – the instance map created by DesignModule.
- Returns:
ans – the database change instance map.
- Return type:
List[List[Any]]
- class bag.interface.skill.SkillInterface(dealer: bag.interface.zmqwrapper.ZMQDealer, tmp_dir: str, db_config: Dict[str, Any], lib_defs_file: str)[source]
Bases:
bag.interface.database.DbAccess
Skill interface between bag and Virtuoso.
This class sends all bag’s database and simulation operations to an external Virtuoso process, then get the result from it.
- get_exit_object() Any [source]
Returns an object to send to the server to shut it down.
Return None if this option is not supported.
- get_cells_in_library(lib_name: str) List[str] [source]
Get a list of cells in the given library.
Returns an empty list if the given library does not exist.
- create_library(lib_name: str, lib_path: str = '') None [source]
Create a new library if one does not exist yet.
- create_implementation(lib_name: str, template_list: Sequence[Any], change_list: Sequence[Any], lib_path: str = '') None [source]
- configure_testbench(tb_lib: str, tb_cell: str) Tuple[str, List[str], Dict[str, str], Dict[str, str]] [source]
Update testbench state for the given testbench.
This method fill in process-specific information for the given testbench.
- Parameters:
- Returns:
cur_env (str) – the current simulation environment.
envs (List[str]) – a list of available simulation environments.
parameters (Dict[str, str]) – a list of testbench parameter values, represented as string.
outputs (Dict[str, str]) – a dictionary of output expressions
- get_testbench_info(tb_lib: str, tb_cell: str) Tuple[List[str], List[str], Dict[str, str], Dict[str, str]] [source]
Returns information about an existing testbench.
- Parameters:
- Returns:
cur_envs (List[str]) – the current simulation environments.
envs (List[str]) – a list of available simulation environments.
parameters (Dict[str, str]) – a list of testbench parameter values, represented as string.
outputs (Dict[str, str]) – a list of testbench output expressions.
- update_testbench(lib: str, cell: str, parameters: Dict[str, str], sim_envs: List[str], config_rules: List[List[str]], env_parameters: List[List[Tuple[str, str]]]) None [source]
Update the given testbench configuration.
- Parameters:
lib (str) – testbench library.
cell (str) – testbench cell.
sim_envs (Sequence[str]) – list of enabled simulation environments.
config_rules (Sequence[List[str]]) – config view mapping rules, list of (lib, cell, view) rules.
env_parameters (Sequence[List[Tuple[str, str]]]) – list of param/value list for each simulation environment.
- instantiate_layout_pcell(lib_name: str, cell_name: str, view_name: str, inst_lib: str, inst_cell: str, params: Dict[str, Any], pin_mapping: Dict[str, str]) None [source]
Create a layout cell with a single pcell instance.
- create_schematics(lib_name: str, sch_view: str, sym_view: str, content_list: Sequence[Any], lib_path: str = '') None [source]
Create the given schematics in CAD database.
Precondition: the library already exists, all cellviews are writable (i.e. they have been closed already).
- Parameters:
- abstract create_layouts(lib_name: str, view: str, content_list: Sequence[Any]) None [source]
Create the given layouts in CAD database.
Precondition: the library already exists, all cellviews are writable (i.e. they have been closed already).
- instantiate_layout(lib_name: str, content_list: Sequence[Any], lib_path: str = '', view: str = 'layout') None [source]
Create a batch of layouts.
- release_write_locks(lib_name: str, cell_view_list: Sequence[Tuple[str, str]]) None [source]
Release write locks from all the given cells.
- refresh_cellviews(lib_name: str, cell_view_list: Sequence[Tuple[str, str]]) None [source]
Refresh the given cellviews in the database.
- perform_checks_on_cell(lib_name: str, cell_name: str, view_name: str) None [source]
Perform checks on the given cell.
- create_schematic_from_netlist(netlist: str, lib_name: str, cell_name: str, sch_view: str = '', **kwargs: Any) None [source]
Create a schematic from a netlist.
This is mainly used to create extracted schematic from an extracted netlist.
- get_cell_directory(lib_name: str, cell_name: str) pathlib.Path [source]
Returns the directory name of the given cell.
- create_verilog_view(verilog_file: str, lib_name: str, cell_name: str, **kwargs: Any) None [source]
Create a verilog view for mix-signal simulation.
- import_sch_cellview(lib_name: str, cell_name: str, view_name: str) None [source]
Recursively import the given schematic and symbol cellview.
- import_design_library(lib_name: str, view_name: str) None [source]
Import all design templates in the given library from CAD database.
- abstract import_gds_file(gds_fname: str, lib_name: str, layer_map: str, obj_map: str, grid: bag.layout.routing.grid.RoutingGrid) None [source]
- _import_design(lib_name: str, cell_name: str, view_name: str, cell_list: List[Tuple[str, str]]) None [source]
Recursive helper for import_design_library and import_sch_cellview.