ParamExpression Type
An arithmetic expression containing symbolic parameters For MVP this could be limited to PInt and PParameter only. However, it would be useful to have a more general type definition so that functions that manipulate constraints, parameters, etc can be written in a more general way. The actual parameter value is customisable so that the same code can be used for int parameters (normal) and BigInt parameters (needed for constant values in N bit components). For MVP set 'PINT = int TODO: refactor this to use an enumeration DU for operators to reduce cases. The built-in functions are already in that shape: PBinFunc names its operation with an enumeration rather than taking a case of its own per function.
Union cases
| Union case | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Divide by a power of two, rounding towards minus infinity: an ARITHMETIC shift, so a negative value stays negative and `-1>>1` is `-1`. There is no logical right shift to go with it: a parameter is a number rather than a bit pattern of some width, so there is no width for zeros to come in from. See shiftRightBy.
|
|
|
Instance members
| Instance member | Description |
Full Usage:
this.IsPAdd
Returns: bool
|
|
Full Usage:
this.IsPBinFunc
Returns: bool
|
|
Full Usage:
this.IsPCLog2
Returns: bool
|
|
Full Usage:
this.IsPDivide
Returns: bool
|
|
Full Usage:
this.IsPInt
Returns: bool
|
|
Full Usage:
this.IsPMultiply
Returns: bool
|
|
Full Usage:
this.IsPParameter
Returns: bool
|
|
Full Usage:
this.IsPRemainder
Returns: bool
|
|
Full Usage:
this.IsPShiftLeft
Returns: bool
|
|
Full Usage:
this.IsPShiftRight
Returns: bool
|
|
Full Usage:
this.IsPSubtract
Returns: bool
|
|