Interface<TagType> class Null safety

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.

Constructors

Interface()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
ports Map<String, Logic>
Maps from the Interface's defined port name to an instance of a Port.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

connectIO(Module module, Interface srcInterface, {Set<TagType>? inputTags, Set<TagType>? outputTags, String uniquify(String original)?}) → void
Connects module's inputs and outputs up to srcInterface and this Interface.
getPorts([Set<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 non-existent method or property is accessed.
inherited
port(String name) Logic
Accesses a port named name.
setPorts(List<Logic> ports, [List<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

Operators

operator ==(Object other) bool
The equality operator.
inherited