Using C programming to call VHDL implementation

OP #4170347
I'm thinking about writing a C function which basically passes an 
array/vector of real numbers to a VHDL implementation as an argument and 
the VHDL code does some computation using the array in a FPGA and 
returns the result back to the C function. So, my question - How do I go 
about writing a C function to call the VHDL implementation? Can anyone 
guide me in the right direction like a tutorial,API or anything?

Any help will be appreciated. Thanks! :)
Guest #4170359
But anyway:
in VHDL you have to DESCRIBE a hardware that computes the numbers.
Additional you have to describe the hardware of a interface (SPI, 
parallel, CAN, whatever) to interchange data between controller and 
FPGA.

After that 90% of the work is done.
And then you can write the C function that sends and receives data to 
and from the FPGA via the interface you implemented in the FPGA.

Sorry, but it seems that you have no clue of embedded systems..
#4170486
Schlumpf wrote:
> After that 90% of the work is done.
> And then you can write the C function that sends and receives data to
> and from the FPGA via the interface you implemented in the FPGA.

Nirmal Benann wrote:
> Want to try something interesting.

If you 'just' want to try something interesting, maybe it's a good idea 
to start with a soft or hard processor (Soc) directly located on your 
FPGA. The processor where your C program runs in this case is 'closer' 
to the FPGA, interfacing (hopefully) supported by the tool chain.

Running your C program on the PC, you Need to care about your local 
Drivers, too (USB, ETH, whatever) and Schlumpfs '90% of the work is 
done' may not quite be true.

Reply

A question of your own? This thread is over 11 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.