TagInterface class
An interface to a Content-Addressable Memory (CAM) that allows querying for tags and returns the index of the matching tag if found.
For lookups, tag is the query and idx/hit are the results.
Only entries with their valid bit set will match during lookups.
For writes, en enables the write, idx is the destination address,
tag is the data to write, and hit sets/clears the valid bit
(hit=1 marks the entry valid, hit=0 marks it invalid).
- Inheritance
-
- Object
- Interface<
DataPortGroup> - TagInterface
Constructors
- TagInterface(int idWidth, int tagWidth)
-
Constructs a new interface of specified
idWidthandtagWidthfor querying a CAM.
Properties
- en → Logic
-
Enable signal for write operations.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hit → Logic
-
For lookups: indicates whether a valid match was found.
For writes: sets/clears the valid bit (1=valid, 0=invalid).
no setter
- idWidth → int
-
The width of addresses in the memory.
final
- idx → Logic
-
The entry number (index) where the tag was found (lookup) or
the destination address (write).
no setter
-
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
- tag → Logic
-
The "tag" to match (for lookup) or write (for write operations).
no setter
- tagWidth → int
-
The width of data in the memory.
final
Methods
-
clone(
) → TagInterface -
Makes a copy of this TagInterface with matching configuration.
override
-
conditionalDriveOther(
Interface< DataPortGroup> other, Iterable<DataPortGroup> tags) → Conditional -
Makes
thisconditionally drive interface signals tagged withtagsonother.inherited -
conditionalReceiveOther(
Interface< DataPortGroup> other, Iterable<DataPortGroup> tags) → Conditional -
Makes
thissignals tagged withtagsbe driven conditionally byother.inherited -
connectIO(
Module module, Interface srcInterface, {Iterable< DataPortGroup> ? inputTags, Iterable<DataPortGroup> ? outputTags, Iterable<DataPortGroup> ? inOutTags, String uniquify(String original)?}) → void -
Connects
module's inputs, outputs, and inOuts up tosrcInterfaceand this Interface.inherited -
driveOther(
Interface< DataPortGroup> other, Iterable<DataPortGroup> tags) → void -
Makes
thisdrive interface signals tagged withtagsonother.inherited -
getPorts(
[Iterable< DataPortGroup> ? tags]) → Map<String, Logic> -
Returns all interface ports associated with the provided
tagsas 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< DataPortGroup> other, Iterable<DataPortGroup> tags) → void -
Makes
thissignals tagged withtagsbe driven byother.inherited -
setPorts(
List< Logic> ports, [Iterable<DataPortGroup> ? 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
nameif it exists, otherwisenull.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited