c-code function into VHDL?

Guest #2477070
Rate this post
• ▲ useful
▼ not useful
i have to calculates lots of constants, dependant only of 1 generic 
value. I can do that in C or in Octave (Matlab-like language).

I don know how to load those constants, i've been doing it "by hand" in 
the VHDL header, first calculating them, and them putting them into 
matrixes in an array type. Can i implement the c-code (or matlab code) 
into the vhdl code like some kind of function? Have in mind that i'm not 
asking for sinthetizing this secuential code for calculation, i'm just 
looking for the ability to know the number of components and length of 
signals by every "layer" in my design.

Thanks a lot
Guest #2482346
Rate this post
• ▲ useful
▼ not useful
Maybe myHDL (http://www.myhdl.org/doku.php) could solve your problem, 
but it might be quite a change.
For simulation, some people have done interesting stuff with the GHDL 
simulator by interfacing it with C routines 
(http://www.fpgarelated.com/showarticle/20.php). But not sure if that 
helps, as you're speaking of constants. I'm just using those extensions 
to pull configuration values out of .INI files.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

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.