Forum Discussion

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

C to HW

I have been doing for months the c2h tutorial and results haven't been successful.

Sooo...If I want to do the same thing as the tutorial (c2h) with a program I created what should I do?

HELP! :eek:

4 Replies

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

    Then you should read the tutorial again, and again until you understand it.

    I needed to read some of the Altera docs four times before I could understand them.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Could you be more specific and tell me which Altera docs helped you?

    Because for me the tutorial skips steps which are needed to get the right results, or assumes the user knows when we don't know.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Then you should read the tutorial again, and again until you understand it.

    I needed to read some of the Altera docs four times before I could understand them.

    --- Quote End ---

    Hi!

    I need to generate a sine wave from the Nios II core to compare it with a VHDL code of a triangular wave to produce a PWM. I had produced a VHDL code for a sine wave using a look up table.Do I just need to write a simple C code with a sine function? How can this C code be used to be compared and communicate with my triangular wave VHDL code?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You can still use a lookup table for this. C2H accelerators can access memory just like a processor does. If you stuff the results into a FIFO and clock the data out of it at a regular rate then you should get a nice set of sine samples from it.