Interface<TagType> class
Represents a logical interface to a Module.
Interfaces make it easier to define port connections of a Module
in a reusable way. The TagType
allows grouping of port signals
of the module when connecting at a Module level.
When connecting an Interface to a Module, you should always create a new instance of the Interface so you don't modify the one being passed in through the constructor. Modifying the same Interface as was passed would have negative consequences if multiple Modules were consuming the same Interface, and also breaks the rules for Module input and output connectivity.
- Implementers
Constructors
Properties
Methods
-
conditionalDriveOther(
Interface< TagType> other, Iterable<TagType> tags) → Conditional -
Makes
this
conditionally drive interface signals tagged withtags
onother
. -
conditionalReceiveOther(
Interface< TagType> other, Iterable<TagType> tags) → Conditional -
Makes
this
signals tagged withtags
be driven conditionally byother
. -
connectIO(
Module module, Interface srcInterface, {Iterable< TagType> ? inputTags, Iterable<TagType> ? outputTags, Iterable<TagType> ? inOutTags, String uniquify(String original)?}) → void -
Connects
module
's inputs, outputs, and inOuts up tosrcInterface
and this Interface. -
driveOther(
Interface< TagType> other, Iterable<TagType> tags) → void -
Makes
this
drive interface signals tagged withtags
onother
. -
getPorts(
[Iterable< TagType> ? tags]) → Map<String, Logic> -
Returns all interface ports associated with the provided
tags
as a Map from the port name to the Logic port. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
port(
String name) → Logic -
Accesses a port named
name
. -
receiveOther(
Interface< TagType> other, Iterable<TagType> tags) → void -
Makes
this
signals tagged withtags
be driven byother
. -
setPorts(
List< Logic> ports, [Iterable<TagType> ? tags]) → void -
Adds a collection of ports to this Interface, each associated with all
of
tags
. -
toString(
) → String -
A string representation of this object.
inherited
-
tryPort(
String name) → Logic? -
Provides the port named
name
if it exists, otherwisenull
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited