Module axi_id_remap_table

Internal module of axi_id_remap: Table to remap input to output IDs.

This module contains a table indexed by the output ID (type idx_t). Each table entry has two

fields: the input ID and a counter that records how many transactions with the input and output

ID of the entry are in-flight.

The mapping from input and output IDs is injective. Therefore, when the table contains an entry

for an input ID with non-zero counter value, subsequent input IDs must use the same entry and

thus the same output ID.

Relation of types and table layout

diagram of table

Complexity

This module has:

Parameters

InpIdWidth: int unsigned

Width of input IDs, therefore width of id_inp_t.

MaxUniqInpIds: int unsigned

Maximum number of different input IDs that can be in-flight. This defines the number of remap

table entries.

The maximum value of this parameter is 2**InpIdWidth.

MaxTxnsPerId: int unsigned

Maximum number of in-flight transactions with the same ID.

id_inp_t: type

Derived (=do not override) type of input IDs.

IdxWidth: int unsigned

Derived (=do not override) width of table index (ceiled binary logarithm of

MaxUniqInpIds).

idx_t: type

Derived (=do not override) type of table index (width = IdxWidth).

field_t: type

Derived (=do not override) type with one bit per table entry (thus also output ID).

CntWidth: int unsigned

Counter width, derived to hold numbers up to MaxTxnsPerId.

Ports

clk_i: input logic

Rising-edge clock of all ports

rst_ni: input logic

Asynchronous reset, active low

free_o: output field_t

One bit per table entry / output ID that indicates whether the entry is free.

free_oup_id_o: output idx_t

Lowest free output ID. Only valid if the table is not full (i.e., !full_o).

full_o: output logic

Indicates whether the table is full.

push_i: input logic

Push an input/output ID pair to the table.

push_inp_id_i: input id_inp_t

Input ID to be pushed. If the table already contains this ID, its counter must be smaller than

MaxTxnsPerId.

push_oup_id_i: input idx_t

Output ID to be pushed. If the table already contains the input ID to be pushed, the output

ID must match the output ID of the existing entry with the same input ID.

exists_inp_id_i: input id_inp_t

Input ID to look up in the table.

exists_o: output logic

Indicates whether the given input ID exists in the table.

exists_oup_id_o: output idx_t

The output ID of the given input ID. Only valid if the input ID exists (i.e., exists_o).

exists_full_o: output logic

Indicates whether the maximum number of transactions for the given input ID is reached. Only

valid if the input ID exists (i.e., exists_o).

pop_i: input logic

Pop an output ID from the table. This reduces the counter for the table index given in

pop_oup_id_i by one.

pop_oup_id_i: input idx_t

Output ID to be popped. The counter for this ID must be larger than 0.

pop_inp_id_o: output id_inp_t

Input ID corresponding to the popped output ID.

Types

cnt_t

Counter that tracks the number of in-flight transactions with an ID.

entry_t

Type of a table entry.

Signals

match: field_t