hani nik
Newbie level 6
fixed point number representation
Hi.
I am writing an algorithm in Matlab which would eventually have to be implemented on FPGA. The numbers I use in Matlab are real numbers, positive and negative with up to 4 decimal points.
My question:
1.) Before I write the Verilog code, I assume I need to test the algorithm using fixed-point numbers in Matlab, right?
2.) the 'real numbers' in MATLAB... (I guess this is a silly question for all you experts out there but I am a newbie so thank you for bearing with this)... if I do a straight forward conversion of "dec2bin" in MATLAB, it would give me a floating point number, right? is there a straight forward way to convert real numbers to fixed-point Q15 format in Matlab?
3.) When implemented in FPGA later, at what stage will the conversion be done. i.e. does the number being fed to the board already have to be in the number format required or can the board settle that?
Thank you. Any advice is very much appreciated.
Hi.
I am writing an algorithm in Matlab which would eventually have to be implemented on FPGA. The numbers I use in Matlab are real numbers, positive and negative with up to 4 decimal points.
My question:
1.) Before I write the Verilog code, I assume I need to test the algorithm using fixed-point numbers in Matlab, right?
2.) the 'real numbers' in MATLAB... (I guess this is a silly question for all you experts out there but I am a newbie so thank you for bearing with this)... if I do a straight forward conversion of "dec2bin" in MATLAB, it would give me a floating point number, right? is there a straight forward way to convert real numbers to fixed-point Q15 format in Matlab?
3.) When implemented in FPGA later, at what stage will the conversion be done. i.e. does the number being fed to the board already have to be in the number format required or can the board settle that?
Thank you. Any advice is very much appreciated.