bag3_magnetics.layout.inductor.util

Module Contents

Classes

IndTemplate

Inductor template with helper methods

IndLayoutHelper

Class for drawing various geometries. This is used as a hack because of the mysterious C++ error that happens

Functions

round_int(→ int)

compute_vertices(...)

bag3_magnetics.layout.inductor.util.round_int(val_f: float) int[source]
bag3_magnetics.layout.inductor.util.compute_vertices(n_sides: int, n_turns: int, radius_x: int, radius_y: int, width: int, spacing: int) Sequence[Sequence[bag.typing.PointType]][source]
class bag3_magnetics.layout.inductor.util.IndTemplate(temp_db: bag.layout.template.TemplateDB, params: bag.util.immutable.Param, **kwargs: Any)[source]

Bases: bag.layout.template.TemplateBase, abc.ABC

Inductor template with helper methods

property actual_bbox: bag.layout.util.BBox[source]
_draw_turn(lay_id: int, width: int, n_sides: int, vertices: Sequence[bag.typing.PointType], start_x: int, stop_x: int, bridge_xl: int, bridge_xr: int, suf: str) Mapping[str, Sequence[bag.typing.PointType]][source]
_draw_bridge(coord_l: bag.typing.PointType, coord_r: bag.typing.PointType, layer_l: int, layer_r: int, layer_bridge: int, width: int, style: pybag.enum.PathStyle = PathStyle.round) None[source]
_draw_leads(lay_id: int, width: int, term_coords: Sequence[bag.typing.PointType], res1_l: int, res2_l: int, y_end: int = 0, up: bool = False) Tuple[bag.layout.util.BBox, bag.layout.util.BBox][source]
_draw_lead(lay_id: int, width: int, term_coord: bag.typing.PointType, res_l: int, y_end: int = 0, up: bool = False) bag.layout.util.BBox[source]
_draw_fill(n_sides: int, fill_specs: Mapping[str, Any], core_turn_coords: Sequence[Mapping[str, Sequence[bag.typing.PointType]]], width: int, dx: int, dy: int, ring_turn_coords: Sequence[bag.typing.PointType], ring_width: int) None[source]
class bag3_magnetics.layout.inductor.util.IndLayoutHelper(temp_db: bag.layout.template.TemplateDB, params: bag.util.immutable.Param, **kwargs: Any)[source]

Bases: bag.layout.template.TemplateBase

Class for drawing various geometries. This is used as a hack because of the mysterious C++ error that happens while drawing multi turn inductor in the normal way

classmethod get_params_info() Mapping[str, str][source]

Returns a dictionary from parameter names to descriptions.

Returns:

param_info – dictionary from parameter names to descriptions.

Return type:

Mapping[str, str]

draw_layout() None[source]

Draw the layout of this template.

Override this method to create the layout.

WARNING: you should never call this method yourself.