# Log in or Sign up.

<-- Previous Next -- > TOPIC: Code required for floating point arithmetic

I have a code for a gamma filter which has many floating point equations and variables.The code needs to be implemented on spartan 3 which does not have a floating point core.As a result i need code or help in writing code for floating point arithmetic like addition,subtraction,multiplication and division.

If anyone could give me some idea as to how i should go about implementing floating point operations on a core which does not support thenm i'll be very gratefull.

thanx

Hi,Thank you so much for the link..it was very useful.

I have another problem now.

I have generated 4 cores for my code for floating point add/sub,division,multiplication and cos sine functions.

This is two lines from the C code:

if (numch ==1) {

cfarr[0] = 2.0*low_CF*PI;

tauarr[0] = q/cfarr[0];

and this is my verilog intrepetation of it:

fp_mult M1 ( 1, overflow, invalid_op, clk, underflow, 2.0, low_CF, r1);

fp_mult M2 ( 1, overflow, invalid_op, clk, underflow, r1, PI, cfarr[0]);

fp_div D2(1, overflow, invalid_op, clk, underflow, q,cfarr[0], tauarr[0]);

where fp_mult and fp_div are the generated cores.

Now if i want to run the two C commands in the If block iteratively eg:

for(i = 0; i< numch; i++) {

cfarr[i] = 2.0*low_CF*PI*exp(CFH*(i)/(numch-1));

tauarr[i] = q/cfarr[i];

how should i represent it in verilog?

Thanx

shwetika

Thank you for the help

Hi,

I need code for implementing floating point operations on a spartan3 board or some idea about how should i go about doing it as i believe it will take me a huge amount of time to do it from scratch.

how i can help u....?

You have to be logged in to be able to post a comment. To login click here. First time? Sign up. It just takes a few minutes to sign up.

Users with most replies

**User**

**No. of Replies**

© vlsibank

Terms and Conditions · Site Feedback · SiteMap and Unsubscribe

shwetika4/18/2008 8:52:46 PMComments Posted:

3Questions Posted:2