TypedPortReference<PortType extends Logic>
extension type
A typed view of a PortReference.
PortType is the concrete type of the root port. It does not describe
portSubset, whose type can change based on slicing and array indexing.
This extension type implements PortReference, so it can be passed directly to existing APIs that accept an untyped reference without allocation or conversion.
- on
- Implemented types
- Available extensions
Constructors
- TypedPortReference(PortReference reference)
-
Creates a typed view of
reference.factory
Properties
- direction → PortDirection
-
The direction of the port (input, output, or inOut).
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- module → BridgeModule
-
The BridgeModule that this reference belongs to.
finalinherited
- port → PortType
-
The root port with its checked concrete type.
no setter
- portName → String
-
The name of the port that this reference points to.
finalinherited
- portSubset → dynamic
-
The port subset that this reference represents.
no setterinherited
- portSubsetLogic → Logic
-
A Logic representation of the port subset.
latefinalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int
-
The bit width of this port reference.
latefinalinherited
Methods
-
asTyped<
PortType extends Logic> () → TypedPortReference< PortType> -
Available on PortReference, provided by the TypedPortReferenceConversions extension
Returns this reference as a TypedPortReference when its root port is aPortType. -
drivesLogic(
Logic other) → void -
Drives a Logic
otherwith this port.inherited -
gets(
PortReference other, {SameModuleConnectionType? sameModuleConnectionType, String? intermediateSignalName}) → void -
Connects this port to be driven by
other.inherited -
getsLogic(
Logic other) → void -
Connects this port to be driven by a Logic
other.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
punchDownTo(
BridgeModule subModule, {String? newPortName}) → PortReference -
Creates a matching port in a submodule and connects them.
inherited
-
punchUpTo(
BridgeModule parentModule, {String? newPortName}) → PortReference -
Creates a matching port in the parent module and connects them.
inherited
-
replicateTo(
BridgeModule newModule, PortDirection direction, {String? newPortName}) → PortReference -
Creates a new port in the specified module with the given direction.
inherited
-
slice(
int endIndex, int startIndex) → PortReference -
Creates a slice of this port from
endIndexdown tostartIndex.inherited -
tieOff(
{dynamic value = 0, bool fill = false}) → void -
Ties this port to a constant
value.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
tryAsTyped<
PortType extends Logic> () → TypedPortReference< PortType> ? -
Available on PortReference, provided by the TypedPortReferenceConversions extension
Returns this reference as a TypedPortReference, ornullif its root port is not aPortType. -
validate(
) → void -
Validates that this reference resolves to an existing port and subset.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → PortReference -
Gets a single bit of this port at the specified
index.inherited