Forum Discussion

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

C2H compiler streaming interface

Hi,

Is it possible to write a image preprocessing functions in streaming operations using C2H compiler.

E.g if i want to perform few operations on an image without storing it into memory buffer.

filter --> threshold --> ccl ... and so on..

I am kind of confused about the way i need to write these C functions such that the input output will act as streams and wont access the memory. And thus can be efficiently hardware accelerated using C2H compiler.

can somebody please give a small example .. e.g the prototype of such function and a small sample code.

thanks in advance.

2 Replies

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

    It doesn't support streaming but you might be able to use a ST-->MM FIFO which C2H could then access using a master that continuously accesses the FIFO slave port.

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

    <div class='quotetop'>QUOTE (BadOmen @ Jul 17 2009, 03:30 AM) <{post_snapback}> (index.php?act=findpost&pid=23157)</div>

    --- Quote Start ---

    It doesn&#39;t support streaming but you might be able to use a ST-->MM FIFO which C2H could then access using a master that continuously accesses the FIFO slave port.[/b]

    --- Quote End ---

    Oh Ok. Thank you BadOmen.

    I needed a few suggestions regarding the following topic.

    I have to evaluate the ImpulseC c2h converter and Altera c2h compiler.

    And I suppose the major difference between the two is, the ImpulseC uses its own API and functions and datatypes, and the C code needs to be written in a particular structure in order to get it converted to hardware efficiently.

    As for the altera c2h compiler, the code structure is comparatively pretty straight forward using standard C variable types.

    Apart from it, the ImpulseC converts streaming algorithms with its co_stream data type. while for Altera c2h compiler, to implement streaming algorithms, we need to use the ST--> MM FIFO as you mentioned.

    Is there any major difference between the performances of these two c2h converters ?

    I understand if the C code is not written as per the guidelines, the hardware generation might not be very efficient but assuming that, i would be able to write a C code following the proper guidelines, will there be major difference between the performances of the two.

    thanks in advance.

    regards.