MVB Reordering

ENTITY MVB_REORDERING IS

The MVB_REORDERING component moves MVB items to other positions within the same MVB word. Each RX item has its own key (see REORDER_KEY) which says to which TX position that item must be moved. It is a pure scatter network (ITEMS multiplexers controlled by ITEMS*ITEMS comparators) without any storage of items: an item is always transmitted in the same word in which it was received, it is never moved to another word. The amount of logic grows quadratically with ITEMS.

The requested reordering does not have to be a complete permutation, gaps are allowed. A TX position which is not targeted by any valid RX item gets TX_VLD=’0’ (data on that position are undefined). Compaction (all valid items moved to the lowest positions) as well as scattering (valid items moved to arbitrary positions) are therefore both valid use cases.

RX_DST_RDY is directly connected to TX_DST_RDY, the component never generates backpressure of its own. Latency is one clock cycle when OUT_REG_EN=True, otherwise the whole datapath is combinational.

The reordering logic needs at least 2 items, because the key of a single item would be zero bits wide. ITEMS=1 is therefore allowed only together with the bypass mode (REORDERING_EN=False), any other use is refused by an assert during elaboration.

Warning

The keys are not checked in any way and there is no output reporting a discarded item. The user must guarantee these conditions for each valid RX item (an item with RX_VLD(j)=’1’):

  • Unique keys - two valid RX items must not target the same TX position. In case of such collision, the item on the higher RX position (higher index j) wins and the other item is silently discarded.

  • Key range - the key value must be lower than ITEMS. When ITEMS is not a power of two, the key is able to encode also higher values (for ITEMS=5 the key is 3 bits wide and encodes values 0 to 7) and an item with such key is silently discarded, because no TX position matches it.

Keys of invalid RX items (RX_VLD(j)=’0’) are don’t care.

Generics

Generic

Type

Default

Description

ITEMS

natural

5

Number of MVB items in word. The minimum value is 2, ITEMS=1 is allowed only with REORDERING_EN=False.

ITEM_WIDTH

natural

64

Width of one MVB item in bits.

OUT_REG_EN

boolean

True

Enable the output register on the TX MVB interface. It breaks the combinational path through the multiplexers at the cost of one clock cycle of latency.

REORDERING_EN

boolean

True

Enable the reordering logic. When False, the RX MVB word is passed to the TX MVB interface unchanged and REORDER_KEY is ignored. This bypass mode is the only mode supported with ITEMS=1.

Ports

Port

Type

Mode

Description

CLK

std_logic

in

Clock input

RESET

std_logic

in

Reset input synchronized with CLK

=====

RX MVB INTERFACE (original item positions)

=====

=====

RX_DATA

std_logic_vector(ITEMS*ITEM_WIDTH-1 downto 0)

in

RX_VLD

std_logic_vector(ITEMS-1 downto 0)

in

RX_SRC_RDY

std_logic

in

RX_DST_RDY

std_logic

out

=====

TX MVB INTERFACE (new item positions)

=====

=====

TX_DATA

std_logic_vector(ITEMS*ITEM_WIDTH-1 downto 0)

out

TX_VLD

std_logic_vector(ITEMS-1 downto 0)

out

TX_SRC_RDY

std_logic

out

TX_DST_RDY

std_logic

in

REORDER_KEY

std_logic_vector(ITEMS*log2(ITEMS)-1 downto 0)

in

Target TX position of each RX item, log2(ITEMS) bits per item. The key of RX item j is REORDER_KEY((j+1)*log2(ITEMS)-1 downto j*log2(ITEMS)). Valid with RX_VLD and RX_SRC_RDY. The keys must meet the conditions described in the warning above.