Interface<TagType extends Enum> 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
-
clone(
) → Interface< TagType> -
Creates a new Interface with the same ports as
this. -
conditionalDriveOther(
Interface< TagType> other, Iterable<TagType> tags) → Conditional -
Makes
thisconditionally drive interface signals tagged withtagsonother. -
conditionalReceiveOther(
Interface< TagType> other, Iterable<TagType> tags) → Conditional -
Makes
thissignals tagged withtagsbe 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 tosrcInterfaceand this Interface. -
driveOther(
Interface< TagType> other, Iterable<TagType> tags) → void -
Makes
thisdrive interface signals tagged withtagsonother. -
getPorts(
[Iterable< TagType> ? tags]) → Map<String, Logic> -
Returns all interface ports associated with the provided
tagsas 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
thissignals tagged withtagsbe 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
nameif it exists, otherwisenull.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited