cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Charlycop
Observer
Observer
603 Views
Registered: ‎11-28-2020

Why Vivado refuse to use BRAM blocks ?

Jump to solution

Hi,

Vivado doesn't use BRAMs with this design. Usually it works, what am I doing wrong ?

 

 

TYPE memoire IS ARRAY(0 TO 2 ** (tailleadresse) - 1) OF STD_LOGIC_VECTOR(tailledonnee - 1 DOWNTO 0);

SIGNAL mem                 : memoire;

ATTRIBUTE ram_style        : STRING;
ATTRIBUTE ram_style OF mem : SIGNAL IS "block";

	memory: PROCESS (addrFromUGA, addrFromCPU, rwUne, rwProcesseur)
		VARIABLE pointeurUne, pointeurProcesseur : INTEGER range 0 TO (2 ** (tailleadresse) - 1);
	BEGIN
		pointeurUne        := to_integer(unsigned(addrFromUGA));
		pointeurProcesseur := to_integer(unsigned(addrFromCPU));

		IF (rwUne = '0' AND rwProcesseur = '0') THEN
			donneeUneOut        <= mem(pointeurUne);
			donneeProcesseurOut <= mem(pointeurProcesseur);
		ELSIF (rwUne = '1' AND rwProcesseur = '0') THEN
			mem(pointeurUne) <= donneeUneIn;
		ELSIF (rwUne = '0' AND rwProcesseur = '1') THEN
			mem(pointeurProcesseur) <= donneeProcesseurIn;
		ELSE NULL;
		END IF;
END PROCESS memory;
I'm using vivado 2018.3 on Windows 10 pro 20H2 with a surface pro 4, i7 CPU and 16Go or RAM.
0 Kudos
1 Solution

Accepted Solutions
bruce_karaffa
Scholar
Scholar
589 Views
Registered: ‎06-21-2017

Block RAMs use a clock.  You have an asynchronous process.

View solution in original post

4 Replies
bruce_karaffa
Scholar
Scholar
590 Views
Registered: ‎06-21-2017

Block RAMs use a clock.  You have an asynchronous process.

View solution in original post

dpaul24
Scholar
Scholar
547 Views
Registered: ‎08-07-2014

@Charlycop ,

Refer to Chapter4 of the https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_3/ug901-vivado-synthesis.pdf if you want the correct coding style to infer BRAMs.

------------FPGA enthusiast------------
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem

Charlycop
Observer
Observer
473 Views
Registered: ‎11-28-2020

Hi Bruce, you were right, but not only that, my controls were not correct either, thanks.

 

I'm using vivado 2018.3 on Windows 10 pro 20H2 with a surface pro 4, i7 CPU and 16Go or RAM.
0 Kudos
Charlycop
Observer
Observer
472 Views
Registered: ‎11-28-2020

the sample codes helped me to figure it out, thanks !

I'm using vivado 2018.3 on Windows 10 pro 20H2 with a surface pro 4, i7 CPU and 16Go or RAM.
0 Kudos