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: 
4,548 Views
Registered: ‎09-01-2016

Stopping an HLS IP Core with the PS

Jump to solution

Hi

 

I created, with Vivado HLS, an IP core that performs a calculation in the PL. This calculation needs to be stop whenever I want even if it hasn't been terminated. The module is controlled by the PS and has an AXI4Lite interface. In the driver file, I have a function to start the calculation but not to stop it.

 

I tried something like putting the code in a while loop. The while loop has a stop condition controlled by an input.

void foo(input1, input2,.., output)
{

 stop = 1;
   while(input1 && stop)
 {
  //calculation

 //if calculation is over, stop = 0
 }
}

But it doesn't work, because the function checks the inputs only when the start function is called in the PS. So I can't change the value of the stop condition when I want before the end.

I also tried something with the reset pin but it was a failure as well.

 

Do you have any idea how to do so ?

 

Thanks,

John

0 Kudos
1 Solution

Accepted Solutions
Teacher muzaffer
Teacher
8,476 Views
Registered: ‎03-31-2012

Re: Stopping an HLS IP Core with the PS

Jump to solution
with an or block you can't make the output zero. I guess I wasn't clear when I mentioned 'or'ing. Given that aresetn is active low, you need an "AND" gate with one input connected to ARESETN and the other input connected to GPIO_O pin. The default value of GPIO_O should be high. This allows ARESETN to control the state. When you want to override the current high state of output, you can write a zero to the GPIO_O which makes the output of the gate go low.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

0 Kudos
4 Replies
Teacher muzaffer
Teacher
4,531 Views
Registered: ‎03-31-2012

Re: Stopping an HLS IP Core with the PS

Jump to solution
if you want to arbitrarily stop the ip, you can actually reset it manually but you have to add that logic yourself. This can be accomplished by adding a gpio somewhere in the design and 'or'ing the output of gpio with the aresetn signal of the IP. This way when you write to the gpio, the block will be reset.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
4,496 Views
Registered: ‎09-01-2016

Re: Stopping an HLS IP Core with the PS

Jump to solution
Thanks for your answer muzaffer.

I tried your method. Unfortunately, it didn't work.
I added a gpio and connected the gpio_io_o pin to an OR block that I created. The second input of the OR block is connected to aresetn. The output is then connected to the reset pin of my hls module.
But when XGpio_DiscreteWrite is called, no reset is done and the module continue its calculation.

A solution ?
0 Kudos
Teacher muzaffer
Teacher
8,477 Views
Registered: ‎03-31-2012

Re: Stopping an HLS IP Core with the PS

Jump to solution
with an or block you can't make the output zero. I guess I wasn't clear when I mentioned 'or'ing. Given that aresetn is active low, you need an "AND" gate with one input connected to ARESETN and the other input connected to GPIO_O pin. The default value of GPIO_O should be high. This allows ARESETN to control the state. When you want to override the current high state of output, you can write a zero to the GPIO_O which makes the output of the gate go low.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.

View solution in original post

0 Kudos
4,421 Views
Registered: ‎09-01-2016

Re: Stopping an HLS IP Core with the PS

Jump to solution

Thank you very much muzaffer for your explanation. It worked perfectly.

0 Kudos