Forum Discussion

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

Real time Counter in Kernel

Hi,

I want to define a real time counter and print his result .

Can I define Real time clock "i" in kernel and print the result of counter?.

In Other hand, I thought that I define a counter "i" in my Kernel and I store My counter "i" in global memory and then I read buffer from Host.

My question : Does this counter "i" defined in kernel works under real time FPGA clock ?

If yes , How I can print the result of counter ? This code (below) doesn't work for me.

Kernel (

__global uint *restrict Y,

int Gid = get_global_id(0);

i=i+1;

Y[Gid]=i;

Thank you.