port method
- String portRef
Gets a reference to a specific port within this interface.
The portRef
can be either a simple port name (e.g., "data") or include
slicing/indexing syntax (e.g., "data7:0
", "addr3
").
Returns either a StandardInterfacePortReference for simple port names or a SliceInterfacePortReference for sliced access.
Implementation
InterfacePortReference port(String portRef) {
if (SlicePortReference._isSliceAccess(portRef)) {
return SliceInterfacePortReference.fromString(this, portRef);
}
if (StandardPortReference._isStandardAccess(portRef)) {
return StandardInterfacePortReference(this, portRef);
}
throw RohdBridgeException('Invalid port access string: $portRef');
}