AnsweredAssumed Answered

Multiply and add with fixed-point registers?

Question asked by rkn on Apr 23, 2012
Latest reply on Sep 27, 2012 by rkn



with the floating point register I can execute the following line with in one cycle:


f1=f0*f4, f9=f8*f12, f2=dm(i4,m4), f10=pm(i12,m12); (1)


but with fixed point registers I'm getting an error from the compiler:


r1=r0*r4, r9=r8*r12, r2=dm(i4,m4), r10=pm(i12,m12); (2)


I'm only allowed to write the following line:


r1=r0*r4, r2=dm(i4,m4); (3)


So it seems that for fixed point it is only allows to do one operation and one memory transfer per cycle. Is that true? Or is there a trick or a setting needed to get line (2) working?

I can not change it to floating point because I need to do some integer arithmetic for addressing memory.


Second point: Line (3) is executed within one cycle. If I write


r1=r0*r4, r2=pm(i12,m12); (4)


it takes 2 cycles. Why? Can fixed point registers only be used with dm bus transfers?