Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

VHDL code for complex arithmetics

Status
Not open for further replies.

vijayalaxmi

Newbie level 1
Joined
Oct 4, 2007
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
i want to know a synthesizable code to find the value of....
for eg. x to the power of y , where x is an integer and y is a real number ,like
2 to the power of 0.5.

i tried with ** operator,like defining x and y as integer and real data types respectively and z as areal data type .given the exp. z<="**"(x,y),
where "**" is a predefined function in math_real package in ieee library.
but real data types are not synthesizable.
so,plz someone help me in this regard.
 

aajizattari

Member level 3
Joined
Nov 13, 2007
Messages
56
Helped
8
Reputation
16
Reaction score
0
Trophy points
1,286
Activity points
1,608
vhdl code

i TOO am a beginner here but

I think one possible way to step forward is


looking into FIXED POINT ARITHMETIC


May be you can get approximate solutions
 

echo47

Advanced Member level 5
Joined
Apr 7, 2002
Messages
3,942
Helped
636
Reputation
1,270
Reaction score
88
Trophy points
1,328
Location
USA
Activity points
33,183
vhdl code

Also check the libraries and cores provided with your synthesis software. It may contain floating point math modules that you can drop into your project.
 

avimit

Banned
Joined
Nov 16, 2005
Messages
413
Helped
91
Reputation
182
Reaction score
23
Trophy points
1,298
Location
Fleet, UK
Activity points
0
Re: vhdl code

Dear vijayalaxmi,
What you are trying to do isn't possible. This is because the synthesis flow is not mature enough to cater for this kind of complex arithmatic.
So, you need to see what 'y' is, then build a customised block for finding x**y, may be you will have to use a rom if range of x is limited, and store the values of x**y in rom.
For example in mp3 decoding you need to find z=x**(4/3) so I had do to a customized block to implement that, where I store some values in ROM, and the rest was a linear interpolation.
Hope it helps
Kr,
Avi
http://www.vlsiip.com
 

suru

Full Member level 3
Joined
Aug 31, 2007
Messages
157
Helped
4
Reputation
14
Reaction score
1
Trophy points
1,298
Activity points
1,934
vhdl code

i need vhdl code of turbo code. plz help me to get it.
 

vinodkumar

Full Member level 5
Joined
Oct 5, 2006
Messages
251
Helped
12
Reputation
24
Reaction score
3
Trophy points
1,298
Location
hyderabad
Activity points
2,822
Re: vhdl code

hi,is this operation required every time or its required only once.and also the power is multiple of 2 or anything else.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top