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: 
Visitor mlnlab
Visitor
303 Views
Registered: ‎05-17-2019

Sequential access in BRAM

Jump to solution

Hello,

I have a problem when synthesizing the following code with HLS:

void fix(double PORT_A[SIZE]){
	#pragma HLS INTERFACE bram port=PORT_A
        
        double x1,x2;
	
        x1=PORT_A[0];
	x2=PORT_A[1];

	PORT_A[2]=x1+x2;
}

Basically, after the synthesis, besides the port I've defined as interface (PORT_A), HSL instantiates another BRAM port B.

By looking in the analysis perspective I've noticed that the following operations

x1=PORT_A[0];
x2=PORT_A[1];

are performed in parallel at the same cycle (and this force the synthesis to put a second BRAM).

Is there a way to tell HLS to serialize the two operations?

Thanks

 

 

0 Kudos
1 Solution

Accepted Solutions
Scholar u4223374
Scholar
235 Views
Registered: ‎04-26-2015

Re: Sequential access in BRAM

Jump to solution

From UG902:

 

When using an ap_memory interface, specify the array targets using the RESOURCE
directive. If no target is specified for the arrays, Vivado HLS determines whether to use a
single or dual-port RAM interface.

 

In this case, it looks like HLS has decided that a dual-port interface makes sense. You need to tell it that it's only a single-port RAM using the RESOURCE pragma.

View solution in original post

2 Replies
Scholar u4223374
Scholar
236 Views
Registered: ‎04-26-2015

Re: Sequential access in BRAM

Jump to solution

From UG902:

 

When using an ap_memory interface, specify the array targets using the RESOURCE
directive. If no target is specified for the arrays, Vivado HLS determines whether to use a
single or dual-port RAM interface.

 

In this case, it looks like HLS has decided that a dual-port interface makes sense. You need to tell it that it's only a single-port RAM using the RESOURCE pragma.

View solution in original post

Visitor mlnlab
Visitor
211 Views
Registered: ‎05-17-2019

Re: Sequential access in BRAM

Jump to solution

YES! This is the solution!

Putting this pragma saved me:

#pragma HLS RESOURCE variable=INOUT_PORT core=RAM_1P_BRAM

 

Many thanks for the support.

0 Kudos