Implementing scanning indow using HDL FIFOs

2 次查看(过去 30 天)
Hello, I have been trying to implement s canning window algorithm using the HDL FIFO block to no avail, I constantly get results that are delayed and can't keep track of why that is, the push and pop don't seem to behave as I expect them to.
A scanning window for a 3x3 window for instance would use 3 FIFOs (with a register size equal to the row size of the input) connected to each other (first OUT into second IN, and second OUT to third IN), the elements of the matrix or map are stramed through the FIFOs, once they're full the last elemnt of each is popped, that's done three ti;es to generate a 3x3 window, then the same is done untill the FIFOs are empty. that's when the whole thing is shifted one row down sinc ethe first row elemnts are not present in the enxt windows (no padding is needed since it's valid 2D Convolution)0
Are there any good examples on this? or any advice on how to implement it efficiently?

回答(1 个)

Bharath Venkataraman
We have a block that does the windowing - please look at the Line Buffer block. I believe this will meet your needs.
  2 个评论
Alla
Alla 2020-3-10
The block does not allow for doing much, my aim is to have something I can reconfigure and customize.
Bharath Venkataraman
It does the threee things you were asking for before:
  1. Form a 3x3 window
  2. Has FIFOs connected to each other
  3. The rows are shifted down
You can now implement the convolution/filtering operation.
If you want that as well, the Image Filter block does the filtering as well.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 HDL Coder 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by