kakarala
Member level 1
hello
i am trying to write the synthesisable code to compute the sad for two blocks. I wrote the following code and i am able to compute the absolute difference of each pixel in two blocks. But when i want to add all the 16 differences , by using the following statement
sad <= tmp(0,0)+tmp(0,1)+tmp(0,2)+tmp(0,3)+tmp(1,0)+tmp(1,1)+tmp(1,2)+tmp(1,3)+tmp(2,0)+tmp(2,1)+tmp(2,2)+tmp(2,3)+tmp(3,0)+tmp(3,1)+tmp(3,2)+tmp(3,3);
It is taking hours to synthesise the code. so is there any simple way to add all the differences?
I am using package "images" that contain images i have attached the codes
i am trying to write the synthesisable code to compute the sad for two blocks. I wrote the following code and i am able to compute the absolute difference of each pixel in two blocks. But when i want to add all the 16 differences , by using the following statement
sad <= tmp(0,0)+tmp(0,1)+tmp(0,2)+tmp(0,3)+tmp(1,0)+tmp(1,1)+tmp(1,2)+tmp(1,3)+tmp(2,0)+tmp(2,1)+tmp(2,2)+tmp(2,3)+tmp(3,0)+tmp(3,1)+tmp(3,2)+tmp(3,3);
It is taking hours to synthesise the code. so is there any simple way to add all the differences?
I am using package "images" that contain images i have attached the codes