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
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?
Forget about real numbers and use fixed point arithmetic, i.e. convert your numbers to integer values, scaled by an appropriate factor.
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
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?
:
Edited by Moderator
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.