Coldfire V1 Math support

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Coldfire V1 Math support

1,473 Views
davepinnh
Contributor I
How do the JM64/128 perform a multiply?

I see from the manual there are optional MAC, DIV, and EMAC functions as part of the V1 solution. So does the JM64 or JM128 implement any of these hardware functions?

Im guessing not. So how many cycles for a 16x16 multiply on the JM128?

Labels (1)
0 Kudos
3 Replies

357 Views
davepinnh
Contributor I
OK, great. But without a EMAC or hardware assist, how many clock cycles to do a 16x16 multiply or a MULS.L in a V1.
 
0 Kudos

357 Views
kef
Specialist I
OK, with TPM free running at least prescaler:
 
volatile long a=5;
volatile long b=5;
 
foo()
{
t = TPM1CNT;
   a = a*b;  // 2 loads, muls.l and store
   a = a*b;
   a = a*b;
   a = a*b;
   a = a*b;
   a = a*b;
   a = a*b;
   a = a*b;
   a = a*b;
   a = a*b;
t = TPM1CNT-t;
}
 
after foo executed, I found 77 in the t. Results should be similar repeating the same with shorts
0 Kudos

357 Views
kef
Specialist I
MUL.L and MUL.W instructions are present in MCF51QE. Should be present in JM too.
0 Kudos