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.

Floating point to Fixed point conversion

Status
Not open for further replies.

bloodemon

Junior Member level 2
Joined
Feb 16, 2005
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,442
floating point to fixed point conversion

Hi,

I want to do a small survey, and would be very glad to see some useful discussion.

What kind of flow are you guys using?

Matlab(floating) -> C (floating) -> C(fixed)-> C performance tuning

or

Matlab(floating) -> Matlab(fixed)->C(fixed)->C performance tuning

I realized that in Matlab 7.0 there is a fixed point simulink toolbox, and a couple of other tools available for this conversion.

What's the tool you are using? or just do the conversion manually?
 

float to fixed point conversion in q formats

used to :mathcad(floating) -> C(fixed)->RTL
now: simulink -> RTL
 

float to fixed conversion for dsp

Hi.
If you are just intersted in fixed point on PC it is OK for doing the same thing on the processors, you need to consider lot of other parameters. You need to see if the floating oint can be implemented and develop a library for fixed point routines.
brmadhukar
 

What is your target processor?

I sometimes use MATLAB to help design my DSP algorithms. Then I write a C program (if targeting a PC), or I write HDL (if targeting an FPGA). I don't use any conversion software.

When writing C for a PC (Intel or AMD CPU), I usually don't bother with fixed point, because floating point runs about as fast, and it's a lot more convenient.

When writing HDL for an FPGA, I simply use integer arithmetic, and keep track of the required scaling factors and shifts along the way.
 

Matlab(floating) -> Matlab(fixed)-> RTL
 

Matlab(floating) -> Matlab(fixed)->C(fixed)->C performance tuning

C GNU compiler itself provides lot of performance tuning, including architecture specific optimization.
 

Hi Echo47,

Let's say, target for FPGA. When you saying use Matlab to help design your dsp algorithm, you mean algorithm verification that make sure the algorithm is working or use it to determine the scaling factors, etc.

bloodemon
 

I use MATLAB only for concept design in floating-point. I usually don't do any integer or fixed-point processing in MATLAB. When I code the design in C or HDL, I do the integer scaling at that time. That's just my style. I'm a better at writing C and HDL than MATLAB.
 

matlab float-> SPW (or simulink ) fixed-> RTL

How do you guys verify the RTL?

I compare the results of spw with RTL output.
It seems no hex or bin data formats of simulink output . so it is hard to compare the output of simulink and RTL.. How do you settle the problem?
 

Firstly, I develop algorithm in Matlab.
Then I do the precision simulation manually by parameter setting(don't need fixed point toolbox).
This work is like fixed c programing.
Finally, it is implementation of RTL.
 

I usually used c environment except design the filter coefficients or simulate the system function.

For instance, Porting MP3 Decoder on DSProcessor using assembly language.
(1)Floating Point C
(2)Discriminating tables,gobal variables,local variables,buffer from floating point c.
(3)Transforming 2/3 dimension variables/tables to one dimension array or point.
(4)Observing the values of table,gobal variable,local variable to dfine
integer/fraction precision using Q format.
(5)Using "printf/fprintf" watchs the precision to avoid overflow.
(6)Rearranging Q format.
(7)Transforming fixed point c to DSP assembly language.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top