real in vhdl

Guest #3614269
Rate this post
• ▲ useful
▼ not useful
hi all
i want to ask a question and i don't know if it possible in vhdl or how 
to make it.
if i have an eqution such as

x= m(a)+a*max(a)+b*sd_d(a)
and the values of a and b is as
a=1
b=1.5
--------
a=1
b=1.75
--------
a=1.5
b=0
---------
and i want to substitue the values of a,b every time and check the x 
value with comparator
how i make it in vhdl.any idea please
Guest #3614613
Rate this post
• ▲ useful
▼ not useful
John Mayer wrote:
> Something with an array, and a pointer which increment at the pace
> you
> want (prescale Clk). Each (2 i your case)array have the different values
> for a and b, and a common pointer gets incremented.
>
> what are you going to check x for?

i didn't understand your sugestion , could you clear plz.
i want to multiply constant a1=1 & b2=1.5
with integer values ,should i convert real constant to real first or how 
too enter that real constant to vhdl
Moderator (Company: Titel) #3615802
Rate this post
• ▲ useful
▼ not useful
medahat wrote:
> i didn't understand your sugestion
I didn't understand your question.

> i want to multiply constant a1=1 & b2=1.5 with integer values
Ok, thats absolutely no problem.

> ,should i convert real constant to real first
That is not neccessary. A real constant is a real number, which can 
multiplies with another real value instantly.

> or how too enter that real constant to vhdl
Real numbers are entered in a way like 1.23 or 23.4 or 0.9999 or some 
other numbers with a dot in between...

And now lets try it another way. Answer ALL of the following questions:
What is your actual problem?
Where do the numbers come from (a file, the keyboard, your brain,...)?
Must this be implemented in hardware, or is it for simulation only?
Can you show vhdl code causing problems to you?

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.