cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Newbie
Newbie
5,968 Views
Registered: ‎11-12-2013

Multidimensional Array Image Data: Synthesis not completing during saving of Image Pixels...Memory error.

Dear All,

 

It would be great if someone can guide me on this one.. I am trying to save incoming Image data as pixels in Multidimensional arrays (Arrays or Array type). the Image data is 640 x 480 pixels. Somehow i am unable to achieve the synthesis for the code i've written below.. The device is Spartan 6xc6slx45-3csg324. Kindly guide me as to how can i achieve proper saving of the entire image in multidimensional indexing so that i can use it to compare with another multidimensional constant and conclude results. I have tried the traditional multidimensional array indexing as well, the (i,j) form and it gives the same result. Am i running short of logic or resources in FPGA?

 

Some kind help and guidance will be appreciated. The code along with the error is written below.

 


library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity reg_file is
generic(
--CI : integer:=10; -- number of bits
--RI : integer:=9;
W : integer:=2;
--C : integer:=641;
ROW: natural:=481;-- number of row bits
COL: natural:=641); -- number of column bits
--R : integer:=481);
port(
clk,reset: in std_logic;
wr_en: in std_logic;
--c_addr : in std_logic_vector (CI-1 downto 0);
--r_addr : in std_logic_vector (RI-1 downto 0) ;
pix_data: in std_logic;
r_data: out std_logic );
end reg_file;

architecture arch of reg_file is
type image is array (ROW-1 downto 0) of std_logic_vector(COL-1 downto 0);
signal t1: image :=(others=>(others=>'0'));
--constant ROW natural:=4;
--constant COL natural:=6;

begin

process (clk,reset,wr_en)
variable i: natural range 1 to 480;
variable j: natural range 1 to 640;
begin
if reset = '1' then
t1 <=(others=>(others=>'0'));
elsif (rising_edge(clk))then
if wr_en = '1' then
    if (i<ROW) then
        if(j<COL) then
            t1(i)(j) <= pix_data;
            r_data <= t1(i)(j);
            j := j+1;
        end if;
    if (j=640) then
        i := i+1;
        j :=1;
        end if;
    end if;
end if;
end if;
end process;

end arch;

 

ERROR:Portability:3 - This Xilinx application has run out of memory or has encountered a memory conflict.  Current memory usage is 2075356 kb.  You can try increasing your system's physical or virtual memory.  If you are using a Win32 system, you can increase your application memory from 2GB to 3GB using the /3G switch in your boot.ini file. For more information on this, please refer to Xilinx Answer Record #14932. For technical support on this issue, you can open a WebCase with this project atta
ched at http://www.xilinx.com/support.

 

Looking forward to hear soon from somebody.

0 Kudos
5 Replies
Highlighted
Professor
Professor
5,963 Views
Registered: ‎08-14-2007

Re: Multidimensional Array Image Data&colon; Synthesis not completing during saving of Image Pixels...Memory error.

Your asynchronous reset of "t1" would force the use of individual flip-flops to create your array.  If you had hoped for this to synthesize into block RAM or distributed RAM, you would need to remove that reset.  It's still OK to specify an initial value, however.

 

I'd suggest looking at the XST user manual for the proper way to infer memories.

 

As for running out of resources, if your part has 307,200 flip-flops you might be able to build this.  However the actual error you got was that the tools ran out of memory on your PC trying to build the design.  So even if you went to a large enough part to fit the design, you'd also need to go to a 64-bit OS to build the design.

-- Gabor
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
5,962 Views
Registered: ‎07-01-2010

Re: Multidimensional Array Image Data&colon; Synthesis not completing during saving of Image Pixels...Memory error.

Hi ,

 

The portability error indicates  insufficient memory for the application to run .

 

What is the operating system are you using?

 

Can you try running this on a 64-bit machine with more than 3 GB memory (RAM)?

 

Regards,

Achutha

---------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------
0 Kudos
Highlighted
Newbie
Newbie
5,958 Views
Registered: ‎11-12-2013

Re: Multidimensional Array Image Data&colon; Synthesis not completing during saving of Image Pixels...Memory error.

Thanks Gabor for enlightening me with some great info. As for the asynchronous reset of t1, i intentionally intialized it.. You're right i can remove it and then go about to synthesize as a BLOCK RAM.


Currently i do not have access to a 64 Bit OS to run the model, can you suggest any other way around or some modification so that i can get it synthesized with a 32 Bit OS Model?

 

I am looking into the XST user manual u mentioned, but i somehow am guessing that i will land up with the same issue at the end.

 

Please do suggest any workaround to construct a Matrix of the image pixels so that i can compare with a constant Multidimensional Array of Characters...

0 Kudos
Highlighted
Newbie
Newbie
5,957 Views
Registered: ‎11-12-2013

Re: Multidimensional Array Image Data&colon; Synthesis not completing during saving of Image Pixels...Memory error.

Dear Achutha,

 

I am running of Windows 7, 32 Bit Os. with Xilinx 14.1 ISE. Unfortunately i do not have access to a 64 Bit OS right now.

 

Is there any other way i can work around to get this running in the current model?

0 Kudos
Highlighted
Professor
Professor
5,952 Views
Registered: ‎08-14-2007

Re: Multidimensional Array Image Data&colon; Synthesis not completing during saving of Image Pixels...Memory error.

I would suggest fixing the code so that it will infer block RAM.  Your system memory usage will go down to something reasonable (i.e. no need for 64-bit OS) as long as you're not trying to infer hundreds of thousands of flip-flops.

-- Gabor
0 Kudos