CsrBackdoorInterface class

An interface to interact very simply with a CSR.

Can be used for either read, write or both directions.

Inheritance

Constructors

CsrBackdoorInterface({required CsrInstanceConfig config})
Constructs a new interface of specified dataWidth and conditionally instantiates read and writes ports based on hasRead and hasWrite.

Properties

config → CsrInstanceConfig
Configuration for the associated CSR.
final
dataWidth → int
The width of data in the CSR.
final
hashCode → int
The hash code for this object.
no setterinherited
hasRead → bool
Should this CSR be readable by the HW.
final
hasWrite → bool
Should this CSR be writable by the HW.
final
ports → Map<String, Logic>
Maps from the Interface's defined port name to an instance of a Logic.
no setterinherited
rdData → Csr?
The read data from the CSR.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
wrData → Logic?
Data to write to the CSR in this cycle.
no setter
wrEn → Logic?
Write the CSR in this cycle.
no setter

Methods

clone() → CsrBackdoorInterface
Makes a copy of this Interface with matching configuration.
override
conditionalDriveOther(Interface<CsrBackdoorPortGroup> other, Iterable<CsrBackdoorPortGroup> tags) → Conditional
Makes this conditionally drive interface signals tagged with tags on other.
inherited
conditionalReceiveOther(Interface<CsrBackdoorPortGroup> other, Iterable<CsrBackdoorPortGroup> tags) → Conditional
Makes this signals tagged with tags be driven conditionally by other.
inherited
connectIO(Module module, Interface srcInterface, {Iterable<CsrBackdoorPortGroup>? inputTags, Iterable<CsrBackdoorPortGroup>? outputTags, Iterable<CsrBackdoorPortGroup>? inOutTags, String uniquify(String original)?}) → void
Connects module's inputs, outputs, and inOuts up to srcInterface and this Interface.
inherited
driveOther(Interface<CsrBackdoorPortGroup> other, Iterable<CsrBackdoorPortGroup> tags) → void
Makes this drive interface signals tagged with tags on other.
inherited
getPorts([Iterable<CsrBackdoorPortGroup>? tags]) → Map<String, Logic>
Returns all interface ports associated with the provided tags as a Map from the port name to the Logic port.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
port(String name) → Logic
Accesses a port named name.
inherited
receiveOther(Interface<CsrBackdoorPortGroup> other, Iterable<CsrBackdoorPortGroup> tags) → void
Makes this signals tagged with tags be driven by other.
inherited
setPorts(List<Logic> ports, [Iterable<CsrBackdoorPortGroup>? 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, otherwise null.
inherited

Operators

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