SymbolReplaceHelpers Module
Functions and values
| Function or value | Description |
|
|
|
|
Full Usage:
changeAdderComponent symModel compId oldComp newCompType
Parameters:
Model
compId : ComponentId
oldComp : Component
newCompType : ComponentType
Returns: Symbol
|
|
Full Usage:
changeBusComparef symModel compId constantVal constantText
Parameters:
Model
compId : ComponentId
constantVal : bigint
constantText : string
Returns: Symbol
|
|
Full Usage:
changeConstantf symModel compId constantVal constantText
Parameters:
Model
compId : ComponentId
constantVal : bigint
constantText : string
Returns: Symbol
|
|
Full Usage:
changeCounterComponent symModel compId oldComp newCompType
Parameters:
Model
compId : ComponentId
oldComp : Component
newCompType : ComponentType
Returns: Symbol
|
|
Full Usage:
changeCustom symModel compId oldComp newCompType
Parameters:
Model
compId : ComponentId
oldComp : Component
newCompType : ComponentType
Returns: Symbol
|
|
Full Usage:
changeGateComponent symModel compId gateType n
Parameters:
Model
compId : ComponentId
gateType : GateComponentType
n : int
Returns: Symbol
|
|
Full Usage:
changeInputValue symModel compId newVal
Parameters:
Model
compId : ComponentId
newVal : bigint
Returns: Symbol
|
|
Full Usage:
changeJoinNum symModel compId newNum
Parameters:
Model
compId : ComponentId
newNum : int
Returns: Symbol
|
|
Full Usage:
changeLsbf symModel compId newLsb
Parameters:
Model
compId : ComponentId
newLsb : bigint
Returns: Symbol
|
|
Full Usage:
changeMergeNComponent symModel compId numInputs
Parameters:
Model
compId : ComponentId
numInputs : int
Returns: Symbol
|
|
Full Usage:
changeNumberOfBitsf symModel compId newBits
Parameters:
Model
compId : ComponentId
newBits : int
Returns: Symbol
|
|
Full Usage:
changeReversedInputs symModel compId
Parameters:
Model
compId : ComponentId
Returns: Symbol
|
|
Full Usage:
changeSplitNComponent symModel compId numOutputs widths lsbs
Parameters:
Model
compId : ComponentId
numOutputs : int
widths : int list
lsbs : int list
Returns: Symbol
|
|
Full Usage:
createNewPort no hostID portType
Parameters:
int
hostID : ComponentId
portType : PortType
Returns: Port
|
|
|
|
|
|
|
|
|
|
|
Helper function to change the number of bits expected in a port of each component type. A symbol whose width is worked out from the text it draws, redone after that text has changed. Only the IO of an array component needs it: its legend says its own name, its channel and its width - "Join[3].(7:0)" - so changing any of those changes how wide the symbol has to be, and nothing else in Issie has a size that depends on a field the Properties pane can edit. The symbol resized to fit the legend its CURRENT type gives it. Array IO carries its width in its legend rather than in a separate line of text, so changing a width changes how much text there is to fit and the symbol has to follow. Public so that a test can ask whether it does: the resize is invisible from the type alone, and a symbol whose text has outgrown it is exactly what nobody notices until they see it drawn.
|
|
|
|
|
Full Usage:
withNumberOfBits newBits compType
Parameters:
int
compType : ComponentType
Returns: ComponentType
|
The component type with a different bus width, for every component that has one. Pure, and separate from the symbol it is applied to, so that "does a width change reach this component type" can be asked without a draw block model. It is worth asking: this match ends in a wildcard that returns the type UNCHANGED, so a component missing from it accepts a width typed into Properties and then silently throws it away - which is how the array IO components behaved until they were added below.
|