11-12-2013 10:25 AM
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.
entity reg_file is
--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);
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 );
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;
variable i: natural range 1 to 480;
variable j: natural range 1 to 640;
if reset = '1' then
if wr_en = '1' then
if (i<ROW) then
t1(i)(j) <= pix_data;
r_data <= t1(i)(j);
j := j+1;
if (j=640) then
i := i+1;
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.
11-12-2013 10:51 AM
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.
11-12-2013 10:52 AM
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)?
11-12-2013 11:17 AM
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...
11-12-2013 11:19 AM
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?
11-12-2013 11:28 AM
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.