PairInterface class
A simplified version of Interface which is intended for a common situation where two components are communicating with each other and may share some common inputs.
It can be either directly used for simple scenarios, or extended for more complex situations.
- Inheritance
-
- Object
- Interface<
PairDirection> - PairInterface
Constructors
-
PairInterface({List<
Port> ? portsFromConsumer, List<Port> ? portsFromProvider, String modify(String original)?}) - Constructs an instance of a PairInterface with the specified ports.
- PairInterface.clone(PairInterface otherInterface)
- Creates a new instance of a PairInterface with the same ports other characteristics.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- modify ↔ (String Function(String original)?)
-
A function that can be used to modify all port names in a certain way.
read / write
-
ports
→ Map<
String, Logic> -
Maps from the Interface's defined port name to an instance of a Port.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
-
subInterfaces
→ Map<
String, PairInterface> -
A mapping from sub-interface names to instances of sub-interfaces.
read-only
Methods
-
addSubInterface<
PairInterfaceType extends PairInterface> (String name, PairInterfaceType subInterface, {bool reverse = false}) → PairInterfaceType -
Registers a new
subInterface
on this PairInterface, enabling a simple way to build hierarchical interface definitions. -
conditionalDriveOther(
Interface< PairDirection> other, Iterable<PairDirection> tags) → Conditional -
Makes
this
conditionally drive interface signals tagged withtags
onother
.inherited -
conditionalReceiveOther(
Interface< PairDirection> other, Iterable<PairDirection> tags) → Conditional -
Makes
this
signals tagged withtags
be driven conditionally byother
.inherited -
connectIO(
Module module, Interface srcInterface, {Iterable< PairDirection> ? inputTags, Iterable<PairDirection> ? outputTags, String uniquify(String original)?}) → void -
Connects
module
's inputs and outputs up tosrcInterface
and this Interface.override -
driveOther(
Interface< PairDirection> other, Iterable<PairDirection> tags) → void -
Makes
this
drive interface signals tagged withtags
onother
.inherited -
getPorts(
[Iterable< PairDirection> ? tags]) → Map<String, Logic> -
Returns all interface ports associated with the provided
tags
as a Map from the port name to theLogic
port.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pairConnectIO(
Module module, Interface< PairDirection> srcInterface, PairRole role, {String uniquify(String original)?}) → void -
A simplified version of connectIO for PairInterfaces where by only
specifying the
role
, the input and output tags can be inferred. -
port(
String name) → Logic -
Accesses a port named
name
.inherited -
receiveOther(
Interface< PairDirection> other, Iterable<PairDirection> tags) → void -
Makes
this
signals tagged withtags
be driven byother
.inherited -
setPorts(
List< Logic> ports, [Iterable<PairDirection> ? tags]) → void -
Adds a collection of ports to this Interface, each associated with all
of
tags
.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
tryPort(
String name) → Logic? -
Provides the port named
name
if it exists, otherwisenull
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited