⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mtimes_001.cpp

📁 浮点fir设计工具
💻 CPP
字号:
//       AccelDSP 9.1.00 build 868 Production, compiled Feb 16 2007 
// 
//    THIS IS UNPUBLISHED, LICENSED SOFTWARE THAT IS THE CONFIDENTIAL 
//        AND PROPRIETARY PROPERTY OF XILINX OR ITS LICENSORS 
// 
//      Copyright(c) Xilinx, Inc., 2000-2007, All Rights Reserved. 
//   Reproduction or reuse, in any form, without the explicit written 
//          consent of Xilinx, Inc., is strictly prohibited. 
// 
//  User: WangQian 
//  Machine: A2D3DF917F70473 (i1586, Windows XP Service Pack 2, 5.01.2600) 
//  Date: Mon May 12 10:45:42 2008 
// 


#include "AccelCommon.h"
#include <math.h>



extern TAccelQuantizer ac_fixed_wrap_floor_12_8;
extern TAccelQuantizer ac_fixed_wrap_floor_24_20;
extern TAccelQuantizer ac_fixed_wrap_floor_26_20;
extern TAccelQuantizer ac_fixed_wrap_floor_29_20;
extern TAccelQuantizer ac_ufixed_wrap_floor_12_12;
extern TAccelQuantizer ac_ufixed_wrap_floor_5_0;


void mtimes_001( double inputA[16], double inputB[16], double & outputC )
{
    double accum;
    double accumindex;
    double prod1;

    /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
    /*       AccelDSP 9.1.00 build 868 Production, compiled Feb 16 2007 */
    /* */
    /*    THIS IS UNPUBLISHED, LICENSED SOFTWARE THAT IS THE CONFIDENTIAL */
    /*        AND PROPRIETARY PROPERTY OF XILINX OR ITS LICENSORS */
    /* */
    /*      Copyright(c) Xilinx, Inc., 2000-2007, All Rights Reserved. */
    /*   Reproduction or reuse, in any form, without the explicit written */
    /*          consent of Xilinx, Inc., is strictly prohibited. */
    /* */
    /*  User: WangQian */
    /*  Machine: A2D3DF917F70473 (i1586, Windows XP Service Pack 2, 5.01.2600) */
    /*  Date: Mon May 12 10:45:42 2008 */
    /* */
    /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
    /*  AccelWare Function: Mtimes                                                  */
    /*  AccelDSP Version: 9.1.00 build 868 Production                               */
    /*  AccelWare Version: 9.1.00 build 868 Production                              */
    /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
    /*  colsa: Number of columns in the A input.*/
    /*		value used "16"*/
    /*  colsb: Number of columns in the B input.*/
    /*		value used "1"*/
    /*  implementation: Select Architectural Implementation (currently only one implementation).*/
    /*		value used "default"*/
    /*  rowsa: Number of rows in the A input.*/
    /*		value used "1"*/
    /*  rowsb: Number of rows in the B input.*/
    /*		value used "16"*/
    /*  speedarea: Allows for various combinations of resource-sharing and pipelining.  It is a starting point and can be changed with directives.*/
    /*		value used "resource shared / non-pipelined"*/
    /*  type: double, galoisfield or complex.*/
    /*		value used "double"*/
    accum = accel_quantize( ac_fixed_wrap_floor_29_20, 0.0 ,_AT_);
    for ( accumindex = accel_quantize( ac_ufixed_wrap_floor_5_0, 1 ,_AT_); accumindex <= 16; accumindex = accel_quantize( ac_ufixed_wrap_floor_5_0, accumindex + 1 ,_AT_) )
    {
        prod1 = accel_quantize( ac_fixed_wrap_floor_24_20, inputA[(int)(accumindex - 1.0)] * inputB[(int)(accumindex - 1.0)] ,_AT_);
        accum = accel_quantize( ac_fixed_wrap_floor_29_20, prod1 + accum ,_AT_);
    }
    accumindex = accel_quantize( ac_ufixed_wrap_floor_5_0, 16.0 ,_AT_);
    outputC = accel_quantize( ac_fixed_wrap_floor_26_20, accum ,_AT_);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -