次のコードが使用されている場合、Vitis HLS でシフト レジスタが推論されるようになりました。
int A[N]; // This will be replaced by a shift register
for(...) {
// The loop below is the shift operation
for (int i = 0; i < N-1; ++i)
A[i] = A[i+1];
A[N] = ...;
// This is an access to the shift register
... A[x] ...
}
シフト レジスタはサイクルごとに 1 つのシフト操作を実行できるので、パフォーマンスが大幅に向上します。また、シフト レジスタのどこででもサイクルごとにランダムな読み出しアクセスを実行できるので、FIFO よりも柔軟性があります。