PortReference class sealed
A Reference
to a port on a BridgeModule.
This abstract class provides a unified interface for accessing and manipulating ports on a BridgeModule, including support for port slicing, connections, and hierarchical port punching operations.
- Implementers
- Annotations
Constructors
- PortReference.fromPort(Logic port)
-
Creates a PortReference from an existing Logic port.
factory
- PortReference.fromString(BridgeModule module, String portRef)
-
Creates a PortReference from a BridgeModule and a port reference
string.
factory
Properties
- direction → PortDirection
-
The direction of the port (input, output, or inOut).
latefinal
- hashCode → int
-
The hash code for this object.
no setteroverride
- module → BridgeModule
-
The BridgeModule that this reference belongs to.
finalinherited
- port → Logic
-
The actual Logic port that this reference points to.
latefinal
- portName → String
-
The name of the port that this reference points to.
final
- portSubset → dynamic
-
The port subset that this reference represents.
no setter
- portSubsetLogic → Logic
-
A Logic representation of the port subset.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → int
-
The bit width of this port reference.
latefinal
Methods
-
drivesLogic(
Logic other) → void - Drives a Logic signal with this port's value.
-
gets(
PortReference other) → void -
Connects this port to be driven by
other
. -
getsLogic(
Logic other) → void - Connects this port to be driven by a Logic signal.
-
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.
-
punchUpTo(
BridgeModule parentModule, {String? newPortName}) → PortReference - Creates a matching port in the parent module and connects them.
-
replicateTo(
BridgeModule newModule, PortDirection direction, {String? newPortName}) → PortReference - Creates a new port in the specified module with the given direction.
-
slice(
int endIndex, int startIndex) → PortReference -
Creates a slice of this port from
endIndex
down tostartIndex
. -
tieOff(
[dynamic value = 0]) → void -
Ties this port to a constant
value
. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator [](
int index) → PortReference -
Gets a single bit of this port at the specified
index
.