Both lo and hi are valid for all constraints For single ended constraints both

Both lo and hi are valid for all constraints for

This preview shows page 131 - 134 out of 332 pages.

Both lo() and hi() are valid for all constraints. For single-ended constraints, both functions are defined to return the single endpoint, 'a'. For double-ended constraints, lo() returns 'a' and hi() returns 'b'. Examples Here are some examples. Constraint of integer [2,8] contains the values 2, 3, 4, 5, 6, 7, 8 (2,8) contains the values 3, 4, 5, 6, 7 Constraint of double [2,8] contains all real numbers in the range including 2.0 and 8.0 (2,8) contains all the real numbers in the range except 2.0 and 8.0 Declaration example a_value : constraint of double = [2.0,8.0]; Table 4-20 Constraint Categories Literal Description Constraint category [a,b] Closed range from a to b, including both endpoints CONSTRAINT_GELE (a,b) Open range from a to b, omitting the endpoints CONSTRAINT_GTLT [a,b) Half-open range from a to b, including a but not b CONSTRAINT_GELT (a,b] Half-open range from a to b, omitting a but including b CONSTRAINT_GTLE >= a Range of all numbers greater than or equal to a CONSTRAINT_GE > a Range of all numbers greater than a CONSTRAINT_GT <= a Range of all numbers less than or equal to a CONSTRAINT_LE < a Range of all numbers less than a CONSTRAINT_LT == a Range containing only the number a CONSTRAINT_EQ
Image of page 131
Chapter 4: PXL Data Types and Typing 4-36 IC Validator User Guide K-2015.06 IC Validator User Guide Version K-2015.06 Assignment examples distance <= 2.0 // All values less than or equal to 2.0 distance = <= 2.0 // All values less than or equal to 2.0 distance = [ 2.0, 8.0 ) // All values >= 2.0 and < 8.0 count = 5 // Count is exactly equal to 5 count = ==5 // Count is exactly equal to 5 Note: The symbols such as == and <= are part of the constraint. The assignment operator = is optional for variables expecting a constraint type. However, if a variable of the constraint type is on the right side, the assignment operator is necessary: my_constraint: constraint of double = < 5.0; external1(layer1, distance = my_constraint ); external1(layer1, distance <5); // same as above external1(layer1, distance = < 5); // same as above User-Defined Structures and Types In addition to the primitive types, PXL supports the structures and types shown in Table 4-21 . newtype... A newtype declares a type of new variable. It does not define a variable. Each type is unique. The following example is of a valid type definition: /* * define a new type, direction. */ Table 4-21 User-Defined Types User-defined type Salient features newtype... Defines a type. enum of... Defines a list of enumerated elements. list of... Defines a list of elements. hash of... Converts a list of elements of one data type to another data type. struct of... Defines a composite type consisting of multiple variables. function Defines a user-defined function that can be passed to another user-defined function and can be called as if it were an ordinary variable.
Image of page 132
Chapter 4: PXL Data Types and Typing 4-37 IC Validator User Guide Version K-2015.06 direction: newtype enum of { up, down, left, right, all // trailing comma is allowed }; /* define two distinct types */ T1: newtype integer; T2: newtype integer; /* define objects of the two types */ o1: T1; o2: T2; The following example is of an invalid type definition: /* given the definitions above, o1 and o2 are of
Image of page 133
Image of page 134

You've reached the end of your free preview.

Want to read all 332 pages?

  • Fall '18
  • Electronic design automation, The Run, Data-flow analysis, Definite assignment analysis, IC Validator

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes