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 must 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 following figure shows the graph view.
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. Take care 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, pktsplit supports broadcast. In this situation, pktmerge.in[i] is broadcast to the corresponding
multiple destinations that connect to pktsplit.out[i]. The following example code, shows merge.in[WAYS-1] 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