Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
10 years ago

Problem with barrier(CLK_GLOBAL_MEM_FENCE)

hi ,

When I added the barrier(CLK_GLOBAL_MEM_FENCE) in the kernel code , I always got the message "quartus compilation failed"

I searched some threads and knew the if-else will result in this warning message (....at most two workgroup is allowed)

But in my kernel program , there are lots of if-else to decide the path like as follow:

""""""""""

func1

func2

funcA

funcB

funcC{

if

func1

else

func2

}

funcD{

if

funcA

else

funcB

}

funcE{

if

funcC

else

funcD

}

__kernel void func()

{

funcE;

barrier(CLK_GLOBAL_MEM_FENCE)

}

""""""""""

Could anyone tell us how to utilization the code if there are lots of if-else to decide the PATH?

BinarySearch might encounter the same situation (It's just my guess).

How to solve this situation ? Maybe we can use pipe or other programming skills to fit the design in DE5

Thanks : )
No RepliesBe the first to reply