Coldfire V1 Math support

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Coldfire V1 Math support

2,157 次查看
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?

标签 (1)
0 项奖励
回复
3 回复数

1,041 次查看
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 项奖励
回复

1,041 次查看
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 项奖励
回复

1,041 次查看
kef
Specialist I
MUL.L and MUL.W instructions are present in MCF51QE. Should be present in JM too.
0 项奖励
回复