CreditInterface<LogicType extends Logic> class

A typed single-pool channel controlled by returned credits.

The provider presents valid and data only after consuming a previously provisioned credit. The consumer returns one credit by asserting creditReturn. contract may describe static reset provisioning for same-reset-domain composition; the default unspecified contract preserves legacy external provisioning. A credit is a receiver-capacity token, not a count of payload lanes or bytes. This interface transfers one payload per asserted valid and has no same-cycle ready signal.

Use ReadyValidCreditGate when a ready/valid payload has a variable credit cost, such as CompactedLanes.validCount.

Inheritance
Available extensions

Constructors

CreditInterface(LogicType data, {CreditContract contract = const CreditContract.unspecified()})
Creates a single-pool credit interface with the given payload shape.

Properties

allowRenamedPayloadClones → bool
Whether typed ports accept recursively type-preserving parent renames.
no setterinherited
contract → CreditContract
Static provisioning and same-cycle eligibility metadata.
final
creditFlow → CreditFlowControl
Payload-independent debit and return accounting.
latefinal
creditReturn → Logic
Consumer pulse returning one credit to the provider.
no setter
data → LogicType
Payload carried by the credit-controlled channel.
final
hashCode → int
The hash code for this object.
no setterinherited
ignoreConstantPayloadNames → bool
Whether generated constant leaf names can differ from driveable clones.
no setterinherited
modify ↔ String Function(String original)?
A function that modifies all port names during connection.
getter/setter pairinherited
ports → Map<String, Logic>
Maps from the Interface's defined port name to an instance of a Logic.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subInterfaces → Map<String, PairInterface>
A mapping from sub-interface names to instances of sub-interfaces.
no setterinherited
typedPayloadPorts → Map<String, TypedInterfacePortPolicy>
Ports that should retain and validate their declared payload schemas.
no setterinherited
valid → Logic
Provider indication that data is transferred in this cycle.
no setter

Methods

addSubInterface<PairInterfaceType extends PairInterface>(String name, PairInterfaceType subInterface, {bool reverse = false, String uniquify(String original)?}) → PairInterfaceType
Registers a new subInterface on this PairInterface, enabling a simple way to build hierarchical interface definitions.
inherited
clone() → CreditInterface<LogicType>
Creates a new Interface with the same ports as this.
override
conditionalDriveOther(Interface<PairDirection> other, Iterable<PairDirection> tags) → Conditional
Makes this conditionally drive interface signals tagged with tags on other.
inherited
conditionalReceiveOther(Interface<PairDirection> other, Iterable<PairDirection> tags) → Conditional
Makes this signals tagged with tags be driven conditionally by other.
inherited
connectIO(Module module, Interface srcInterface, {Iterable<PairDirection>? inputTags, Iterable<PairDirection>? outputTags, Iterable<PairDirection>? inOutTags, String uniquify(String original)?}) → void
Connects this interface while retaining a structured payload port type.
override
driveOther(Interface<PairDirection> other, Iterable<PairDirection> tags) → void
Makes this drive interface signals tagged with tags on other.
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 the Logic port.
override
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
Connects this pair interface using the directions implied by role.
inherited
port(String name) → Logic
Accesses a port named name.
inherited
receiveOther(Interface<PairDirection> other, Iterable<PairDirection> tags) → void
Makes this signals tagged with tags be driven by other.
inherited
setPorts(List<Logic> ports, [Iterable<PairDirection>? tags]) → void
Adds a collection of ports to this Interface, each associated with all of tags.
inherited
split() → (PairProvider<InterfaceType>, PairConsumer<InterfaceType>)

Available on InterfaceType, provided by the PairInterfaceSplit extension

Returns typed provider and consumer endpoints for this interface.
toString() → String
A string representation of this object.
inherited
tryPort(String name) → Logic?
Provides the port named name if it exists, otherwise null.
inherited

Operators

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