API reference - Class CellMappingNotation used in Ruby API documentation Description: A cell mapping (source to target layout) A cell mapping is an association of cells in two layouts forming pairs of cells, i.e. one cell corresponds to another cell in the other layout. The CellMapping object describes the mapping of cells of a source layout B to a target layout A. The cell mapping object is basically a table associating a cell in layout B with a cell in layout A. The mapping object is used to create and hold that table. There are three basic modes in which a table can be generated:
Top-level identity means that only one cell (the top cell) is regarded identical. All child cells are not considered identical. In full mode (see below), this will create a new, identical cell tree below the top cell in layout A. Geometrical identity is defined by the exact identity of the set of expanded instances in each starting cell. Therefore, when a cell is mapped to another cell, shapes can be transferred from one cell to another while effectively rendering the same flat geometry (in the context of the given starting cells). Location identity is basically the safest way to map cells from one hierarchy into another, because it preserves the flat shape geometry. However in some cases the algorithm may find multiple mapping candidates. In that case it will make a guess about what mapping to choose. Name identity means that cells are identified by their names - for a source cell in layer B, a target cell with the same name is looked up in the target layout A and a mapping is created if a cell with the same name is found. However, name identity does not mean that the cells are actually equivalent because they may be placed differently. Hence, cell mapping by name is not a good choice when it is important to preserve the shape geometry of a layer. A cell might not be mapped to another cell which basically means that there is no corresponding cell. In this case, flattening to the next mapped cell is an option to transfer geometries despite the missing mapping. You can enforce a mapping by using the mapping generator methods in 'full' mode, i.e. from_names_full or from_geometry_full. These versions will create new cells and their corresponding instances in the target layout if no suitable target cell is found. CellMapping objects play a role mainly in the hierarchical copy or move operations of Layout. However, use is not restricted to these applications. Public constructors
Public methods
Detailed description[const] void assign(const CellMapping other)Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content. [const] unsigned int cell_mapping(unsigned int cell_index_b)Description: Determine cell mapping of a layout_b cell to the corresponding layout_a cell.
void clearDescription: Clears the mapping. This method has been introduced in version 0.23. void createDescription: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. void destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing. [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. [const] CellMapping dupDescription: Creates a copy of self void for_single_cell(const Layout layout_a,unsigned int cell_index_a,const Layout layout_b,unsigned int cell_index_b)Description: Initialize the cell mapping for top-level identity
The cell mapping is created for cell_b to cell_a in the respective layouts. This method clears the mapping and creates one for the single cell pair. In addition, this method completes the mapping by adding all the child cells of cell_b to layout_a and creating the proper instances. This method has been introduced in version 0.23. unsigned int[] for_single_cell_full(Layout layout_a,unsigned int cell_index_a,const Layout layout_b,unsigned int cell_index_b)Description: Initialize the cell mapping for top-level identity
The cell mapping is created for cell_b to cell_a in the respective layouts. This method clears the mapping and creates one for the single cell pair. This method has been introduced in version 0.23. void from_geometry(const Layout layout_a,unsigned int cell_index_a,const Layout layout_b,unsigned int cell_index_b)Description: Initialize the cell mapping using the geometrical identity
The cell mapping is created for cells below cell_a and cell_b in the respective layouts. This method employs geometrical identity to derive mappings for the child cells of the starting cell in layout A and B. If the geometrical identity is ambiguous, the algorithm will make an arbitrary choice. This method has been introduced in version 0.23. unsigned int[] from_geometry_full(Layout layout_a,unsigned int cell_index_a,const Layout layout_b,unsigned int cell_index_b)Description: Initialize the cell mapping using the geometrical identity in full mapping mode
The cell mapping is created for cells below cell_a and cell_b in the respective layouts. This method employs geometrical identity to derive mappings for the child cells of the starting cell in layout A and B. If the geometrical identity is ambiguous, the algorithm will make an arbitrary choice. Full mapping means that cells which are not found in the target layout A are created there plus their corresponding instances are created as well. The returned list will contain the indexes of all cells created for that reason. This method has been introduced in version 0.23. void from_names(const Layout layout_a,unsigned int cell_index_a,const Layout layout_b,unsigned int cell_index_b)Description: Initialize the cell mapping using the name identity
The cell mapping is created for cells below cell_a and cell_b in the respective layouts. This method employs name identity to derive mappings for the child cells of the starting cell in layout A and B. This method has been introduced in version 0.23. unsigned int[] from_names_full(Layout layout_a,unsigned int cell_index_a,const Layout layout_b,unsigned int cell_index_b)Description: Initialize the cell mapping using the name identity in full mapping mode
The cell mapping is created for cells below cell_a and cell_b in the respective layouts. This method employs name identity to derive mappings for the child cells of the starting cell in layout A and B. Full mapping means that cells which are not found in the target layout A are created there plus their corresponding instances are created as well. The returned list will contain the indexes of all cells created for that reason. This method has been introduced in version 0.23. [const] bool has_mapping?(unsigned int cell_index_b)Description: Determine if a cell of layout_b has a mapping to a layout_a cell.
[const] bool is_const_object?Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. void map(unsigned int cell_index_b,unsigned int cell_index_a)Description: Explicitly specify a mapping.
Beside using the mapping generator algorithms provided through from_names and from_geometry, it is possible to explicitly specify cell mappings using this method. This method has been introduced in version 0.23. [static] CellMapping newDescription: Creates a new object of this class |