cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Explorer
Explorer
2,086 Views
Registered: ‎08-26-2014

Can I connect an HLS input/output port (ap_ovld) with itself?

Jump to solution

Hello,

 

I have created this HLS IP where I need to update out1 and out2 every time I execute the function:

 

void fcn(float in, float *out1, float *out2)
{
   static int start = 1;

   if(start == 1)
   {
      *out1 = 0;
      *out2 = 0;
      start = 0;
   }
   
   *out1 = *out1 + in * 2;
   *out2 = *out2 + in * 3;
}

Vivado HLS correctly creates the input variable as ap_none, and the two output variables as ap_ovld as you can see in the interface summary:

 

HLS in_outs.png

 

After generating the IP block and adding it to Vivado, I connected the outputs to the inputs like you can see in the diagram below. However, the values I read are always zero. Does anyone know why? As far as I can see int the VHDL, they are passed through a register.

 

 

Vivado diagram.png

 

Best regards,

 

Cerilet

0 Kudos
Reply
1 Solution

Accepted Solutions
Explorer
Explorer
2,459 Views
Registered: ‎08-26-2014

Well, I finally got to the end of the cave and I found that yes, you can and you should connect the output to the input if you want the next time step to calculate *out1(t) with the previously calculated value *out1(t-1). Otherwise, it will read zeros (because it is not connected to anything, obviously) and it will calculate the next output value *out1(t) based on that *out1(t-1) = 0.

View solution in original post

0 Kudos
Reply
1 Reply
Explorer
Explorer
2,460 Views
Registered: ‎08-26-2014

Well, I finally got to the end of the cave and I found that yes, you can and you should connect the output to the input if you want the next time step to calculate *out1(t) with the previously calculated value *out1(t-1). Otherwise, it will read zeros (because it is not connected to anything, obviously) and it will calculate the next output value *out1(t) based on that *out1(t-1) = 0.

View solution in original post

0 Kudos
Reply