While generating fields, the generator must satisfy all relevant constraints. These constraints may be defined in several places including:
The original struct definition
Extensions to the struct definition
Other struct definitions using the hierarchical path notation
We have seen many examples of constraints in the original struct definition and the extensions to the struct definition. Example 5-9 shows a constraint defined using the hierarchical path notation.
Example shows the resolution of a constraint specified using a hierarchical path notation. <' struct cell { //Original struct definition len: uint(bits:8); //Field len, default range [0..255] keep len in [0..48]; //All cells constrain len to [0..48] }; struct port { cell_inst: cell; //Instantiate the cell keep cell_inst.len > 5; //Hierarchical constraint for cell_inst //len is now constrained to [6..48] }; '>