Multiple streams can share routing by connecting
pktmerge
to pktsplit
. When buffers are transferred via pktmerge
connected to pktsplit
, each
pktmerge.in[i]
is routed to the corresponding
pktsplit.out[i]
. The in-degree of pktmerge
should be equal to the out-degree of pktsplit
. An example graph code is as
follows:for (int i=0; i<WAYS; i++) {
connect<>(plioIn[i].out[0], kOut[i].in[0]);
connect<>(kOut[i].out[0], merge.in[i]);
connect<>(split.out[i], kIn[i].in[0]);
connect<>(kIn[i].out[0], plioOut[i].in[0]);
}
connect<> (merge.out[0], split.in[0]);
The graph view is shown in
the following figure.Figure 1. Pktmerge to Pktsplit Graph View
Packet Split and Merge Sizes
Currently, packet switching up to 32 streams is supported. A maximum 32 to 1 pktmerge
, and 1 to 32 pktsplit
are supported. Using packet switching with large
fanout
/fanin
(16/32 streams) can be resource
expensive, and care should be taken when using these in designs.
Recommended: AMD recommends that you avoid
unnecessarily splitting packets and immediately merging them again. This adds
complexity on the router solution.
Packet Split and Merge Broadcast
When streams pass through
pktmerge
to pktsplit
, broadcast is supported from pktsplit
. In this situation, pktmerge.in[i]
is broadcast to the corresponding multiple destinations
that connect to pktsplit.out[i]
. Following is an
example code, where merge.in[WAYS-1]
is broadcast
to split.out[WAYS-1]
and split.out[WAYS]
:for (int i=0; i<WAYS; i++) {
connect<>(plioIn[i].out[0], kOut[i].in[0]);
connect<>(kOut[i].out[0], merge.in[i]);
connect<>(split.out[i], kIn[i].in[0]);
connect<>(kIn[i].out[0], plioOut[i].in[0]);
}
connect<>(split.out[WAYS-1], kIn[WAYS].in[0]);
connect<>(kIn[WAYS].out[0],plioOut[WAYS].in[0]);
connect<> (merge.out[0], split.in[0]);
The graph view is shown in the following figure.
Figure 2. Pktmerge to Pktsplit Graph View with Broadcast