Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help with synthesizing the code

Status
Not open for further replies.

kakarala

Member level 1
Joined
Jun 22, 2010
Messages
40
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,801
Hii

i am trying to synthesize a code i wrote for computing motion estimation, when i am trying to synthesize the code , the program goes on executing and my computer is running out of memory me_engine.vhd is the top block.
 

Dont use for loops so careless. It will use up all the resources and take ages to synthesis.For example see the below cascaded for loops you have used in your code:

Code:
compensation : process(clk)
 begin
--  for x in 0 to (IM_ROWS/BLK_ROWS)-1 loop
--    for y in 0 to (IM_COLUMNS/BLK_COLUMNS)-1 loop 
   if (clk ='1' and clk'event) then	     
   for x in 0 to 29 loop
    for y in 0 to 43 loop 
--		  for i in x*(IM_ROWS/BLK_ROWS)  to ((x+1)*(IM_ROWS/BLK_ROWS)) - 1 loop
--	       for j in x*(IM_COLUMNS/BLK_COLUMNS)  to ((x+1)*(IM_COLUMNS/BLK_COLUMNS)) - 1 loop
       for i in x*(8)  to ((x+1)*(8)) - 1 loop
	        for j in y*(8)  to ((y+1)*(8)) - 1 loop
			 			 	 
			   motion_compensated(i,j) <= reference_image(i+motion_vectors(index1,0),j+motion_vectors(index1,1));
				
			 end loop;
        end loop;	
        index1 <= index1 + 1;
     end loop;
  end loop;
   end if;
end process;


Here the loop has a size of 30*44*7*7 = 64680.

Instead of such for loops use a clocked process and do the calculation at each clock edge.This may require more clock cycles to compute the result but will not give your PC hang.

--vipin
https://vhdlguru.blogspot.com/
 
  • Like
Reactions: hafeez

    hafeez

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top