AnsweredAssumed Answered

Problems with MAC and EMAC macros in ColdFire V1+

Question asked by Javier Cambra Enguix on Jun 19, 2013

Hello,

 

I am using the library CFLMOPM in order to implement some DSP functions in a ColdFire V1+ processor.

 

Software for the Library of Macros for Optimization Using eMAC and MAC Programmer's Manual

 

http://cache.freescale.com/files/32bit/doc/ref_manual/CFLMOPM.pdf?fsrch=1&sr=1

 

When using the CONV macro I get a CPU exception (illegal address). I am wondering if somebody has used this library for DSP in ColdFire V1+. I just using the simple example we can find in the documentation of this library.

 

Does anybody had this kind of problems?

 

I attached the project.

 

Thanks,

Javier

 

/* User includes (#include below this line is not maintained by Processor Expert) */

#include "emac_macro.h"

 

#define X_SIZE 20

#define H_SIZE 10

FRAC32 f32_y[X_SIZE+H_SIZE-1];

 

FRAC32 f32_x[X_SIZE] = {

D_TO_F32(0), D_TO_F32(0.309016994374947),

D_TO_F32(0.587785252292473), D_TO_F32(0.809016994374947),

D_TO_F32(0.951056516295154), D_TO_F32(0.99999),

D_TO_F32(0.951056516295154), D_TO_F32(0.809016994374947),

D_TO_F32(0.587785252292473), D_TO_F32(0.309016994374948),

D_TO_F32(1.22514845490862E-16), D_TO_F32(-0.309016994374948),

D_TO_F32(-0.587785252292473), D_TO_F32(-0.809016994374947),

D_TO_F32(-0.951056516295154), D_TO_F32(-1),

D_TO_F32(-0.951056516295154), D_TO_F32(-0.809016994374948),

D_TO_F32(-0.587785252292473), D_TO_F32(-0.309016994374948) };

 

FRAC32 f32_h[H_SIZE] = {

D_TO_F32(.1), D_TO_F32(.2), D_TO_F32(.3), D_TO_F32(.4),

D_TO_F32(.5), D_TO_F32(.6), D_TO_F32(.7), D_TO_F32(.8),

D_TO_F32(.9), D_TO_F32(.99) };

 

void main(void)

{

  /* Write your local variable definition here */

 

 

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

  PE_low_level_init();

  /*** End of Processor Expert internal initialization.                    ***/

 

  /* Write your code here */

  /* For example: for(;;) { } */

  CONV(f32_y, f32_x, f32_h, X_SIZE, H_SIZE);

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/

  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/

  for(;;){}

  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/

} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/

 

Original Attachment has been moved to: CONV_1.zip

Outcomes