cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Adventurer
Adventurer
438 Views
Registered: ‎04-04-2010

BRAM interference sometimes works, sometimes not ([Synth 8-2914] Unsupported RAM template)

Jump to solution

Vivado can correctly infer READ_FIRST memory with byte selectable write enable signals

architecture rtl of RAM_single_port is
	subtype memory_cell_type is std_logic_vector(8 * width_in_bytes - 1 downto 0);
	type ram_chip_type is array (0 to depth - 1) of memory_cell_type;
begin	
	portA: process is	
	variable ram : ram_chip_type;	
	begin
		wait until rising_edge(clk);
		-- read
		douta <= ram(addra);		
		-- write
		for i in 0 to width_in_bytes - 1 loop
			if wea(i) = '1' then
				ram(addra)(8 * i + 7 downto 8 * i) := dina(8 * i + 7 downto 8 * i);		
			end if;
		end loop;
	end process;		
end architecture;

but if the logic is changed slightly to WRITE_FIRST

	portA: process is	
	variable ram : ram_chip_type;	
	begin
		wait until rising_edge(clk);
		-- write
		for i in 0 to width_in_bytes - 1 loop
			if wea(i) = '1' then
				ram(addra)(8 * i + 7 downto 8 * i) := dina(8 * i + 7 downto 8 * i);		
			end if;
		end loop;
		-- read
		douta <= ram(addra);	
	end process;	

Vivado can no longer infer the RAM, and reports

[Synth 8-2914] Unsupported RAM template

Yet WRITE_FIRST with byte selectable write enable signals is a supported RAM type within the IP library

0 Kudos
Reply
1 Solution

Accepted Solutions
Moderator
Moderator
362 Views
Registered: ‎07-21-2014

@anding 

Please refer to the below example of Byte-write with WRITE_FIRST(page no. 134):
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug901-vivado-synthesis.pdf

Thanks
Anusheel

View solution in original post

0 Kudos
Reply
3 Replies
Adventurer
Adventurer
392 Views
Registered: ‎04-04-2010

Grateful for any suggestions...?

0 Kudos
Reply
Moderator
Moderator
363 Views
Registered: ‎07-21-2014

@anding 

Please refer to the below example of Byte-write with WRITE_FIRST(page no. 134):
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2020_1/ug901-vivado-synthesis.pdf

Thanks
Anusheel

View solution in original post

0 Kudos
Reply
Adventurer
Adventurer
332 Views
Registered: ‎04-04-2010

Thank you Anusheel, that is a great guide!