bag.env

This module defines various methods to query information about the design environment.

Module Contents

Functions

get_bag_work_path(→ pathlib.Path)

Returns the BAG working directory.

get_bag_tmp_path(→ pathlib.Path)

Returns the BAG temporary files directory.

get_tech_path(→ pathlib.Path)

Returns the technology directory.

get_bag_work_dir(→ str)

Returns the BAG working directory.

get_bag_tmp_dir(→ str)

Returns the BAG temporary files directory.

get_tech_dir(→ str)

Returns the technology directory.

get_bag_config(→ Dict[str, Any])

Returns the BAG configuration dictioanry.

get_tech_params(→ Dict[str, Any])

Returns the technology parameters dictioanry.

create_tech_info(→ bag.layout.tech.TechInfo)

Create TechInfo object.

create_routing_grid(→ bag.layout.routing.RoutingGrid)

Create RoutingGrid object.

create_routing_grid_from_file(...)

Create RoutingGrid object from the given config file.

can_connect_to_port(→ bool)

Check if we can successfully connect to a port.

get_port_number(→ Tuple[int, str])

Read the port number from the port file..

get_netlist_setup_file(→ str)

Returns the netlist setup file path.

get_gds_layer_map(→ str)

Returns the GDS layer map file.

get_gds_object_map(→ str)

Returns the GDS object map file.

get_bag_device_map(→ List[Tuple[str, str]])

get_tech_global_info(→ Dict[str, Any])

bag.env.get_bag_work_path() pathlib.Path[source]

Returns the BAG working directory.

bag.env.get_bag_tmp_path() pathlib.Path[source]

Returns the BAG temporary files directory.

bag.env.get_tech_path() pathlib.Path[source]

Returns the technology directory.

bag.env.get_bag_work_dir() str[source]

Returns the BAG working directory.

bag.env.get_bag_tmp_dir() str[source]

Returns the BAG temporary files directory.

bag.env.get_tech_dir() str[source]

Returns the technology directory.

bag.env.get_bag_config() Dict[str, Any][source]

Returns the BAG configuration dictioanry.

bag.env.get_tech_params(bag_config: Optional[Dict[str, Any]] = None) Dict[str, Any][source]

Returns the technology parameters dictioanry.

Parameters:

bag_config (Optional[Dict[str, Any]]) – the BAG configuration dictionary. If None, will try to read it from file.

Returns:

tech_params – the technology configuration dictionary.

Return type:

Dict[str, Any]

bag.env.create_tech_info(bag_config: Optional[Dict[str, Any]] = None) bag.layout.tech.TechInfo[source]

Create TechInfo object.

bag.env.create_routing_grid(tech_info: Optional[bag.layout.tech.TechInfo] = None, bag_config: Optional[Dict[str, Any]] = None) bag.layout.routing.RoutingGrid[source]

Create RoutingGrid object.

bag.env.create_routing_grid_from_file(config_fname: str, tech_info: Optional[bag.layout.tech.TechInfo] = None, bag_config: Optional[Dict[str, Any]] = None) bag.layout.routing.RoutingGrid[source]

Create RoutingGrid object from the given config file.

bag.env.can_connect_to_port(port: int) bool[source]

Check if we can successfully connect to a port.

Used to check if Virtuoso server is up.

bag.env.get_port_number(bag_config: Optional[Dict[str, Any]] = None) Tuple[int, str][source]

Read the port number from the port file..

Parameters:

bag_config (Optional[Dict[str, Any]]) – the BAG configuration dictionary. If None, will try to read it from file.

Returns:

  • port (int) – the port number. Negative on failure.

  • msg (str) – Empty string on success, the error message on failure.

bag.env.get_netlist_setup_file() str[source]

Returns the netlist setup file path.

bag.env.get_gds_layer_map() str[source]

Returns the GDS layer map file.

bag.env.get_gds_object_map() str[source]

Returns the GDS object map file.

bag.env.get_bag_device_map(name: str) List[Tuple[str, str]][source]
bag.env.get_tech_global_info(prj_name: str) Dict[str, Any][source]