Header menu logo issie

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
Item1 : ParamExpression
Item2 : ParamExpression
Item1 : ParamBinFunc
Item2 : ParamExpression
Item3 : ParamExpression

PCLog2 ParamExpression

Full Usage: PCLog2 ParamExpression

Parameters:

Bits needed to index the operand's value: ceil(log2 n). See clog2.

Item : ParamExpression
Item1 : ParamExpression
Item2 : ParamExpression

PInt ParamInt

Full Usage: PInt ParamInt

Parameters:
Item : ParamInt
Item1 : ParamExpression
Item2 : ParamExpression

PParameter ParamName

Full Usage: PParameter ParamName

Parameters:
Item : ParamName
Item1 : ParamExpression
Item2 : ParamExpression

Multiply by a power of two: `a<

Item1 : ParamExpression
Item2 : ParamExpression

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.

Item1 : ParamExpression
Item2 : ParamExpression
Item1 : ParamExpression
Item2 : ParamExpression

Instance members

Instance member Description

this.IsPAdd

Full Usage: this.IsPAdd

Returns: bool
Returns: bool

this.IsPBinFunc

Full Usage: this.IsPBinFunc

Returns: bool
Returns: bool

this.IsPCLog2

Full Usage: this.IsPCLog2

Returns: bool
Returns: bool

this.IsPDivide

Full Usage: this.IsPDivide

Returns: bool
Returns: bool

this.IsPInt

Full Usage: this.IsPInt

Returns: bool
Returns: bool

this.IsPMultiply

Full Usage: this.IsPMultiply

Returns: bool
Returns: bool

this.IsPParameter

Full Usage: this.IsPParameter

Returns: bool
Returns: bool

this.IsPRemainder

Full Usage: this.IsPRemainder

Returns: bool
Returns: bool

this.IsPShiftLeft

Full Usage: this.IsPShiftLeft

Returns: bool
Returns: bool

this.IsPShiftRight

Full Usage: this.IsPShiftRight

Returns: bool
Returns: bool

this.IsPSubtract

Full Usage: this.IsPSubtract

Returns: bool
Returns: bool

Type something to start searching.