UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor panfei
Visitor
6,629 Views
Registered: ‎02-01-2013

Initial Value for Distributed Ram not working in Planehead

Hello, everyone. I desgined a 2 read 1 write ram with initial value. When I try to set the ram_style as "distributed", the initial value becomes all 0 instead of the right one. I am using Planahead 14.4 for ML505 (Virtex-5) 

 

Here is my VHDL code for definition and initialization of RAM:

 
TYPE RAM IS ARRAY (RAM_SIZE-1 DOWNTO 0) OF bit_vector(DATA_WIDTH-1 DOWNTO 0);
 FUNCTION init_ram return RAM is
   variable tmp: RAM; -- := (others => (others => '0'));
 begin
   for I in RAM'range loop
     tmp(I) := to_bitvector(std_logic_vector(to_unsigned(integer(real(MEMORY_BASE_ADDRESS) + real(BUCKET_SIZE) * real(I)), DATA_WIDTH)));
   end loop;
   return tmp;
 END init_ram;


 SIGNAL ram_inst : RAM := init_ram;
 attribute ram_style: string;
 attribute ram_style of ram_inst : signal is "distributed";

0 Kudos
1 Reply
Teacher xilinxacct
Teacher
320 Views
Registered: ‎10-23-2018

Re: Initial Value for Distributed Ram not working in Planehead

@panfei

Are you setting the local array value instead of the RAM as you intend?

0 Kudos