hellgate202 / PandaCam

GNU General Public License v3.0
2 stars 1 forks source link

Zynq 7010 compatible? #2

Closed fpgasdr closed 3 years ago

fpgasdr commented 3 years ago

Hi again, I'm considering to evaluate PandaCam in a cheaper ov5640 compatible FPGA development board (like the EBAZ4205 for 10€) with zynq7010 fpga version but get just one resource problem, the Brams. As you can see in Vivado implementation utilization report:

Screenshot from 2021-02-26 01-36-27

the Brams blocks used are 71 but zynq 7010 has only 60 so I need to remove a few from design to get it done.

-maybe convert some Bram to memory LUT?. -Also can I reduce Brams from frame_buffer and/or median_filter that use most of the memory?.

what do you recommend?.

I guess the simplest will be to remove median filter at first...

Thanks.

hellgate202 commented 3 years ago

First of all, I recommend you to checkout master branch of csi2_rx, because imx477 branch went some way forward and I did some changes to it (I think I've changed some DPHY timings) and I didn't check backwords compatibility with OV5640. It was long ago, so you can try running it from imx477 as well. (Change imx477_pwup module in csi2_2_lane_wrap_module to ov5640_pwup)

Second, frame buffer is required by HDMI output. It increases FPS to 60 by duplicating each frame and help to maintain CEA861 timings. If you don't need HDMI output or you are sure that your monitor can handle native 30 Hz (You will need to change timings in hdmi_tx module) you can remove it (don't forget to change clocks on modules after the frame_buffer).

Third, median filter can be removed or changed to 3x3 with parameters without remorse, I didn't find it useful in noisy enviorment and in high illuminated sceens it only blurs the image a bit.

fpgasdr commented 3 years ago

thanks, I will let you know when ported this project to this board.