vlsibank

Log in or Sign up.
Main EDA Embedded Systems ASIC FPGA VHDL Verilog CMOS Semiconductors DSP Mixed Signal Architecture Miscellaneous

<-- Previous Next -- > TOPIC: Code required for floating point arithmetic
Posted by: shwetika     4/12/2008 8:30:32 PM     Category: Verilog
Questions posted: 2         Comments Posted: 3
Hi,
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

Posted by: shwetika     4/18/2008 8:52:46 PM
Comments Posted:3       Questions Posted:2

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


Posted by: shwetika     4/14/2008 12:52:29 PM
Comments Posted:3       Questions Posted:2

Thank you for the help


Posted by: shwetika     4/14/2008 12:52:11 PM
Comments Posted:3       Questions Posted:2

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.


Posted by: $---Jay---$     4/14/2008 5:21:35 AM
Comments Posted:104       Questions Posted:1

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.

Login to access the site

  Username:
  Password:
   Signup Forgot Password?    

Users with most replies

   User
 No. of Replies
263
104
86
76
75
70
63
61
57