If modulation index is a floating point number, how do I represent in FPGA?

Status
Not open for further replies.

keerthna

Member level 1
Joined
Sep 16, 2014
Messages
33
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
Activity points
251
If modulation index is a floating point number, how do i represent in fpga?

I am designing a pwm module and i want to have a 4-bit input which is the modulation index and based on which the output of the sine wave changes.

For example

module lut(clk,mi,sineout);
input clk;
output sineout;
reg [3:0]mi;

since 2^4=16, i will use another signal so as to have a step size of 1/16 and this is multiplied with mi and that becomes the modulation index.

but this is a floating point number. how do i give this to the fpga?
 

Re: If modulation index is a floating point number, how do i represent in fpga?

If numbers are known, I suggest you create a map inside the FPGA and use indexes to point at maps. In general, FPGAs aren't friendly to floating numbers, you need to avoid them at all costs. You can find floating cores in IPCore of your FPGA IDE (Xilinx, Altera and Lattice have them), but I'd rather avoid it altogether...
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…