Grid Specification Types
These types are used to capture user’s intended grid specification, i.e., which tiles go where in the device. These specifications will be later turned into a flattened device grid according to the device’s size.
-
struct t_grid_loc_spec
Grid location specification Each member is a formula evaluated in terms of ‘W’ (device width), and ‘H’ (device height). Formulas can be evaluated using parse_formula() from expr_eval.h.
-
struct t_grid_loc_def
Definition of how to place physical logic block in the grid.
This defines a region of the grid to be set to a specific type (provided its priority is high enough to override other blocks).
The diagram below illustrates the layout specification.
startx/endx and endx/endy define a rectangular region instance’s dimensions. The region instance is then repeated every repeatx/repeaty (if specified).+----+ +----+ +----+ | | | | | | | | | | ... | | | | | | | | +----+ +----+ +----+ . . . . . . . . . +----+ +----+ +----+ | | | | | | | | | | ... | | | | | | | | +----+ +----+ +----+ ^ | repeaty | | v (endx,endy) +----+ +----+ +----+ | | | | | | | | | | ... | | | | | | | | +----+ +----+ +----+ (startx,starty) <--------------> repeatx
Within a particular region instance a block of block_type is laid down every incrx/incry units (if not specified defaults to block width/height):
= an instance of block_type within the region
In the above diagram incrx = 10, and incry = 6+------------------------------+ |* * * *| | | | | | | | | | | |* * * *| ^ | | | | | incry | | | | | | v | | |* * * *| +------------------------------+ <-------> incrx
Public Members
-
int priority = 0
Priority of the specification. In case of conflicting specifications the largest priority wins.
-
t_grid_loc_spec x
Horizontal location specification.
-
t_grid_loc_spec y
Vertical location specification.
-
std::unique_ptr<t_metadata_dict> owned_meta
When 1 metadata tag is split among multiple t_grid_loc_def, one t_grid_loc_def is arbitrarily chosen to own the metadata, and the other t_grid_loc_def point to the owned version.
-
t_metadata_dict *meta = nullptr
Metadata for this location definition. This metadata may be shared with multiple grid_locs that come from a common definition.