Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Using Gorner-algorithm in VHDL

Status
Not open for further replies.

bibijons

Junior Member level 3
Joined
May 20, 2005
Messages
31
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Germany
Activity points
1,618
hey,
i'm a college student and i have to solve an algorithm in vhdl. can anyone help me to start with.
this is my function:
e^x=1+x/1!+x^2/2!+x^3/3! and so on.

i have to describe the system in vhdl and simulate the function with vhdl.
and it is also asked for a synthesis with the xilinx webpack.

who can help me with this project.

tnx for help
 

project vhdl

OK, this look like a univ. project.

anyway, you should do it iteratively, perform: new = old + old*(x/n) at the n-th iteration.

I have seen something close to the Taylor expansion hardware you need to build.

it is hxxp://www.niosforum.com in the custom instructions tutorial for Nios 2.

at least give it a shot on your own and then take a look there.

the_penetrator©
 

gorner algorithm

Try use Gorner-algorithm:
instread y(x)=Σa(i)x^i (num.of operations: m add & (m-1)*m/2 mult)
calculate y(x) = a0 + x(a1 + x(a2 + ... + am)) (m add & m mult)

other way: use CORDIC
(source code you find to opencores_org)
 

gorner algorithm

hi,
i generated this code, but i have another problem, the loop is only done one time, what do i need, that the increment works.

who do i determine the outputs, i have seen std_logic, but it ist not working.

sourcecode:
begin
if (x=0) and (i=0) and (Therm=0) and (Sum=1) and (n=1) then




Therm:=(x**i)/n*i;

n:=n*i;

Sum:=Sum+Therm;

x:=x+1;
i:=i+1;

--output2<=Sum;
output1<=input;

end if;
tnx
bibijons
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top