Forum Discussion

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

Problem with 128Bits from RTL module and Opencl

I have an output from RTL module with 128 bits width and I want to transfert this output to global memory for print in linux terminal.

So, I know the type of 64 bits is unsigned long and What's the type of 128 bits ? I found the type unsigned long long but The opencl guide says that these types (unsigned long long, ulong long, ulong longn: A 128-bit unsigned integer scalar and vector.) are reserved and cannot be used by applications as type names.

Please can someone tell me What's the type I can declare in my kernel and in my cpp files ?

I tried __global unsigned long long *restrict startx and also I tried __global ulong2 *restrict but no success !

What's exactly the type of 128 bits and 256bits and 512 bits that can I define in kernel.cl and API OpenCL (.cpp) ?

Thank you.

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I think the vector should work I thought, at least from one of my own experiments. I forget the bit order that it is in. You might be able to write two 64 bits out and have it received by the vector type, it's been a while since I've built RTL so I'll need a bit more catchup.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I tried vector as you see (ulong2) but unfortunately doesn't work. I want to know exactly how to manage an output oven then 64 bit. If you know please give an example .

    thank you.
  • zjinf's avatar
    zjinf
    Icon for Occasional Contributor rankOccasional Contributor

    How did you fix it ???? i have the same problem, but altera or intel user guide give no explain or example for it , i have 128 bit RTL output, that is 4 32 bit int for kernel, i can't received form the kernel in parallel( i want RTL parallel out), but i don't know how to write kernel code interface