亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? example5_acc.c

?? 或許這個代碼會對大家有用
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*
 * This file is not available for use in any application other than as a
 * MATLAB(R) MEX file for use with the Simulink(R) Accelerator product.
 */

/*
 * Real-Time Workshop code generation for Simulink model "example5_acc.mdl".
 *
 * Model Version                        : 1.35
 * Real-Time Workshop file version      : 5.0 $Date: 2002/05/30 19:21:33 $
 * Real-Time Workshop file generated on : Mon Jan 10 16:29:25 2005
 * TLC version                          : 5.0 (Jun 18 2002)
 * C source code generated on           : Mon Jan 10 16:29:25 2005
 */

#include <math.h>
#include <string.h>
#include "example5_acc.h"
#include "example5_acc_private.h"
#include <stdio.h>
#include "simstruc.h"

#define CodeFormat                      S-Function
#define AccDefine1                      Accelerator_S-Function

/* Initial conditions for atomic system: '<Root>/Spectrum Scope' */
void example5_Spectrum_Scope_Init(SimStruct *S)
{
  /* simstruct variables */
  example5_D_Work *example5_DWork = (example5_D_Work *) ssGetRootDWork(S);
  example5_Parameters *example5_P = (example5_Parameters *) ssGetDefaultParam(S);

  /* Level1 S-Function Block: <S5>/Frame Scope (sdspfscope2) */
  /* Call into Simulink for MEX-version of S-function */
  ssCallAccelRunBlock(S, 0, 0, SS_CALL_MDL_INITIALIZE_CONDITIONS);

  /* DSP Blockset Buffer/Unbuffer (sdsprebuff2) - '<S19>/Buffer' */

  /* Copy ICs into circular buffer */
  {
    const int_T bufLenBytes = 2048 * sizeof(real_T);
    byte_T *circBufPtr = (byte_T *)&example5_DWork->Buffer_CircBuff[0];
    const byte_T *icPtr = (const byte_T *)&example5_P->Buffer_IC;
    int_T i = 1;
    while (i-- > 0) {
      MWDSP_CopyScalarICs(circBufPtr, icPtr, 1024, sizeof(real_T));
      circBufPtr += bufLenBytes;
    }
  }

  /* Initialize DWork for IN_BUF_PTR and OUT_BUF_PTR */
  {
    *&example5_DWork->Buffer_IN_BUF_PTR = (void *)( (byte_T
      *)&example5_DWork->Buffer_CircBuff[0] + 1024 * sizeof(real_T) );
    *&example5_DWork->Buffer_OUT_BUF_PTR = (void *)( (byte_T
      *)&example5_DWork->Buffer_CircBuff[0] + 256 * sizeof(real_T) );
  }

  /* Calculate shiftPerElement
   * (assuming that number of bits
   *  per element is power of two)
   */
  {
    int_T expn;
    const double frac = frexp((double)sizeof(real_T), &expn);
    *&example5_DWork->Buffer_ShiftPerElem = expn - 1;
    UNUSED_ARG(frac);
  }

  /* DSP Blockset Filter Implementation (sdspfilter) - '<S20>/Digital Filter' */
  {
    real_T *statePtr = (real_T *) &example5_DWork->Digital_Filter_FILT_STATES[0];
    /* Scalar expansion of ICs with extra zero element per channel */
    int_T chanCount = 128;
    while (chanCount--) {
      int_T numElems = 19;
      while (numElems--) {
        *statePtr++ = *(const real_T *)&example5_P->Digital_Filter_ICRTP;
      }
      *statePtr++ = 0.0;
    }
  }
}

/* Outputs for atomic system: '<Root>/Spectrum Scope' */
void example5_Spectrum_Scope(SimStruct *S, int_T tid)
{
  /* simstruct variables */
  example5_BlockIO *example5_B = (example5_BlockIO *) _ssGetBlockIO(S);
  example5_D_Work *example5_DWork = (example5_D_Work *) ssGetRootDWork(S);
  example5_Parameters *example5_P = (example5_Parameters *) ssGetDefaultParam(S);

  /* local block i/o variables */
  creal_T rtb_FFT[128];
  real_T rtb_S_Function;
  real_T rtb_Math_Function1;
  real_T rtb_Window_o1[1024];
  real_T rtb_Zero_Pad[128];

  if (ssIsSampleHit(S, 3, tid)) {       /* Sample time: [0.016, 0.0] */

    /* Level1 S-Function Block: <S5>/Frame Scope (sdspfscope2) */
    /* Call into Simulink for MEX-version of S-function */
    ssCallAccelRunBlock(S, 0, 0, SS_CALL_MDL_OUTPUTS);
  }

  /* DSP Blockset Buffer/Unbuffer (sdsprebuff2) - '<S19>/Buffer' */
  {
    /* Copy input samples to buffer */
    if (ssIsSampleHit(S, 0, tid)) {
      MWDSP_Buf_CopyScalar_OL_1ch((const byte_T *)&example5_B->Inherit_Shape1_b,
       (byte_T **)&example5_DWork->Buffer_IN_BUF_PTR, (byte_T
        *)&example5_DWork->Buffer_CircBuff[0],
       *&example5_DWork->Buffer_ShiftPerElem, 2048 * sizeof(real_T));
    }

    /* Copy output samples from buffer */
    if (ssIsSampleHit(S, 3, tid)) {
      MWDSP_Buf_OutputFrame_1ch((byte_T *)&example5_B->Buffer[0], (byte_T
        **)&example5_DWork->Buffer_OUT_BUF_PTR, (byte_T
        *)&example5_DWork->Buffer_CircBuff[0],
       *&example5_DWork->Buffer_ShiftPerElem, 2048 * sizeof(real_T) ,1024, 256 *
       sizeof(real_T));
    }
  }

  if (ssIsSampleHit(S, 3, tid)) {       /* Sample time: [0.016, 0.0] */

    /* DSP Blockset Window (sdspwindow2) - '<S20>/Window' */

    {
      int_T i;
      for (i=0; i<1024; i++) {
        rtb_Window_o1[i] = example5_B->Buffer[i] * example5_B->Window_o2[i];
      }
    }

    /* DSP Blockset Pad (sdsppad) - '<S21>/Zero Pad' */
    /* Input dimensions: [1024 x 1], output dimensions: [128 x 1] */
    memcpy( &rtb_Zero_Pad[0], &rtb_Window_o1[0], (128 * sizeof(real_T)) );

    /* DSP Blockset FFT (sdspfft2) - '<S21>/FFT' */
    /* Real input, 1 channels, 128 rows, linear output order */
    /* Interleave data to prepare for real-data algorithms: */
    MWDSP_FFTInterleave_BR_D(&rtb_FFT[0], &rtb_Zero_Pad[0], 1, 128);
    /* Apply half-length algorithm to single real signal: */
    {
      creal_T *lastCol = &rtb_FFT[0];   /* Point to last column of input */
      MWDSP_R2DIT_TBLS_Z(lastCol, 1, 128, 64, &example5_P->FFT_TwiddleTable[0],
       2, 0);                           /* Radix-2 DIT FFT using TableSpeed twiddle computation */
      MWDSP_DblLen_TBL_Z(lastCol, 128, &example5_P->FFT_TwiddleTable[0], 1);
    }

    /* Math: '<S21>/Magnitude Squared'
     *
     * Regarding '<S21>/Magnitude Squared':
     *   Op: magnitude^2
     */

    {
      int_T i1;

      const creal_T *u0 = &rtb_FFT[0];
      real_T *y0 = &example5_B->Magnitude_Squared[0];

      for (i1=0; i1 < 128; i1++) {
        y0[i1] = u0[i1].re * u0[i1].re + u0[i1].im * u0[i1].im;
      }
    }

    /* DSP Blockset Filter Implementation (sdspfilter) - '<S20>/Digital Filter' */
    /* Filter algorithm: FIR Direct-Form (double precision floating-point) */
    /* Complexities: input - real, num coeffs - real */
    /* Implementing filter algorithm */
    MWDSP_FIR_DF_DD(&example5_B->Magnitude_Squared[0],
     &example5_B->Digital_Filter[0],
     &example5_DWork->Digital_Filter_FILT_STATES[0],
     &example5_DWork->Digital_Filter_DF_INDX, 20, 1, 128,
     &example5_P->Digital_Filter_RTP1COEFF[0], 1);

    /* S-Function Block (sdotproduct): <S24>/S-Function */
    rtb_S_Function = example5_B->Window_o2[0] * example5_B->Window_o2[0];
    {
      int_T i1;

      const real_T *u0 = &example5_B->Window_o2[1];
      const real_T *u1 = &example5_B->Window_o2[1];

      for (i1=0; i1 < 1023; i1++) {
        rtb_S_Function += u0[i1] * u1[i1];
      }
    }

    /* Math: '<S22>/Math Function1'
     *
     * Regarding '<S22>/Math Function1':
     *   Op: reciprocal
     */

    rtb_Math_Function1 = 1.0/(rtb_S_Function);

    /* Product: '<S20>/Product2' */
    {
      int_T i1;

      const real_T *u0 = &example5_B->Digital_Filter[0];
      real_T *y0 = &example5_B->Product2_b[0];

      for (i1=0; i1 < 128; i1++) {
        y0[i1] = u0[i1] * rtb_Math_Function1;
      }
    }
  }
}

/* Update for atomic system: '<Root>/Spectrum Scope' */
void example5_Spectrum_Scope_Update(SimStruct *S, int_T tid)
{

  if (ssIsSampleHit(S, 3, tid)) {       /* Sample time: [0.016, 0.0] */

    /* Level1 S-Function Block: <S5>/Frame Scope (sdspfscope2) */
    /* Call into Simulink for MEX-version of S-function */
    ssCallAccelRunBlock(S, 0, 0, SS_CALL_MDL_UPDATE);
  }
}

/* Outputs for root system: '<Root>' */
static void mdlOutputs(SimStruct *S, int_T tid)
{
  /* simstruct variables */
  example5_BlockIO *example5_B = (example5_BlockIO *) _ssGetBlockIO(S);
  example5_D_Work *example5_DWork = (example5_D_Work *) ssGetRootDWork(S);
  example5_Parameters *example5_P = (example5_Parameters *) ssGetDefaultParam(S);

  /* local block i/o variables */
  creal_T rtb_temp35;
  real_T rtb_Complex_to_Real_Imag_o1;
  real_T rtb_Complex_to_Real_Imag_o2;
  real_T rtb_temp40;

  if (ssIsSampleHit(S, 2, tid)) {       /* Sample time: [8.3333333333333339E-004, 0.0] */

    /* DSP Blockset Random Source (sdsprandsrc2) - '<S2>/Random Source' */
    MWDSP_RandSrc_U_D((real64_T*)&rtb_temp40,&example5_P->Random_Source_a_Min,1,&example5_P->Random_Source_a_Max,1,&example5_DWork->Random_Source_a_STATE_DWORK[0],1,1);

    /* Constant: '<S6>/Constant' */
    example5_B->Constant = example5_P->Constant_Value;

    /* RelationalOperator: '<S2>/Relational Operator' */
    rtb_temp40 = (rtb_temp40 > example5_B->Constant);

    /* S-Function Block: <S2>/Reshape */
    example5_B->Reshape = rtb_temp40;
  }

  if (ssIsSampleHit(S, 1, tid)) {       /* Sample time: [1.0416666666666667E-004, 0.0] */

    /* DSP Blockset Delay (sdspdly2) - '<S3>/Integer Delay1' */

    {
      int_T ti = example5_DWork->Integer_Delay1_BUFF_OFFSET;

      memcpy(&example5_B->Integer_Delay1, ((byte_T *)
        &example5_DWork->Integer_Delay1_BUFF[0] + (ti*(2 * sizeof(real_T)))), (2
        * sizeof(real_T)));
    }
  }

  /* Level2 S-Function Block: <S3>/M-FSK Demodulator Baseband (scomfskdemod) */
  /* Call into Simulink for MEX-version of S-function */
  ssCallAccelRunBlock(S, 1, 5, SS_CALL_MDL_OUTPUTS);

  /* Level2 S-Function Block: <S11>/Inherit Shape1 (scominhshape) */
  /* Call into Simulink for MEX-version of S-function */
  ssCallAccelRunBlock(S, 1, 6, SS_CALL_MDL_OUTPUTS);

  if (ssIsSampleHit(S, 2, tid)) {       /* Sample time: [8.3333333333333339E-004, 0.0] */

    /* Level2 S-Function Block: <Root>/Error Rate Calculation (scomerrrate2) */
    /* Call into Simulink for MEX-version of S-function */
    ssCallAccelRunBlock(S, 1, 7, SS_CALL_MDL_OUTPUTS);

    /* Display: '<Root>/Display' */
    /* Call into Simulink for Display */
    ssCallAccelRunBlock(S, 1, 8, SS_CALL_MDL_OUTPUTS);

    /* DSP Blockset Delay (sdspdly2) - '<Root>/Integer Delay' */

    {
      int_T ti = example5_DWork->Integer_Delay_BUFF_OFFSET;

      memcpy(&example5_B->Integer_Delay, ((byte_T *)
        &example5_DWork->Integer_Delay_BUFF[0] + (ti*sizeof(real_T))),
       sizeof(real_T));
    }

    /* RelationalOperator: '<Root>/Relational Operator' */
    example5_B->Relational_Operator_b = (example5_B->Inherit_Shape1_a !=
      example5_B->Integer_Delay);

    /* Scope: '<Root>/Scope' */
    /* Call into Simulink for Scope */
    ssCallAccelRunBlock(S, 1, 11, SS_CALL_MDL_OUTPUTS);
  }

  /* Level2 S-Function Block: <S4>/M-FSK Modulator Baseband (scomfskmod) */
  /* Call into Simulink for MEX-version of S-function */
  ssCallAccelRunBlock(S, 1, 12, SS_CALL_MDL_OUTPUTS);

  if (ssIsSampleHit(S, 1, tid)) {       /* Sample time: [1.0416666666666667E-004, 0.0] */

    /* ComplexToRealImag: '<S14>/Complex to Real-Imag1' */
    example5_B->Complex_to_Real_Imag1_o1 =
      example5_B->M_FSK_Modulator_Baseband.re;
    example5_B->Complex_to_Real_Imag1_o2 =
      example5_B->M_FSK_Modulator_Baseband.im;

    /* DSP Blockset FIR Interpolation S-Function (sdspupfir2) - '<S16>/FIR Interpolation' */
    {
      /* Input port polyphase filtering */
      MWDSP_UpFIR_DF_DblBuf_DD(&example5_B->Complex_to_Real_Imag1_o1,
       (real_T *)&example5_DWork->FIR_Interpolati_a_OutBuff[0],
       (real_T *)&example5_DWork->FIR_Interpolati_a_TapDelayBuff[0],
       &example5_P->FIR_Interpolati_a_FILTER_COEFF[0],
       &example5_DWork->FIR_Interpolati_a_TapDelayIndex,
       &example5_DWork->FIR_Interpolati_a_wrtBufIdx,
       1,
       1,
       1,
       5,
       1);

      /* Output port buffer processing */
      MWDSP_UpFIR_CopyDataToOutPort((byte_T
        *)&example5_DWork->FIR_Interpolati_a_OutBuff[0],
       (byte_T *)&example5_B->FIR_Interpolati_a,
       &example5_DWork->FIR_Interpolati_a_ReadIdx,
       1,
       1,
       sizeof(real_T),
       1 * sizeof(real_T),
       1,
       1 * sizeof(real_T),
       0 * sizeof(real_T),
       2);
    }

    /* DSP Blockset FIR Interpolation S-Function (sdspupfir2) - '<S16>/FIR Interpolation1' */
    {
      /* Input port polyphase filtering */
      MWDSP_UpFIR_DF_DblBuf_DD(&example5_B->FIR_Interpolati_a,
       (real_T *)&example5_DWork->FIR_Interpolati_b_OutBuff[0],
       (real_T *)&example5_DWork->FIR_Interpolati_b_TapDelayBuff[0],
       &example5_P->FIR_Interpolati_b_FILTER_COEFF[0],
       &example5_DWork->FIR_Interpolati_b_TapDelayIndex,
       &example5_DWork->FIR_Interpolati_b_wrtBufIdx,
       1,
       1,
       1,
       5,
       1);

      /* Output port buffer processing */
      MWDSP_UpFIR_CopyDataToOutPort((byte_T
        *)&example5_DWork->FIR_Interpolati_b_OutBuff[0],
       (byte_T *)&example5_B->FIR_Interpolati_b,
       &example5_DWork->FIR_Interpolati_b_ReadIdx,
       1,
       1,
       sizeof(real_T),
       1 * sizeof(real_T),
       1,
       1 * sizeof(real_T),
       0 * sizeof(real_T),
       2);
    }
  }

  /* DSP Blockset FIR Interpolation S-Function (sdspupfir2) - '<S16>/FIR Interpolation2' */
  {
    /* Input port polyphase filtering */
    if (ssIsSampleHit(S, 1, tid))
    MWDSP_UpFIR_DF_DblBuf_DD(&example5_B->FIR_Interpolati_b,
     (real_T *)&example5_DWork->FIR_Interpolati_c_OutBuff[0],
     (real_T *)&example5_DWork->FIR_Interpolati_c_TapDelayBuff[0],
     &example5_P->FIR_Interpolati_c_FILTER_COEFF[0],
     &example5_DWork->FIR_Interpolati_c_TapDelayIndex,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产视频在线| 91美女在线观看| 成人理论电影网| 欧美精品久久一区二区三区| 欧美激情一区二区三区四区| 偷偷要91色婷婷| 国产精品996| 日韩一区二区三区在线| 亚洲精品国产一区二区精华液| 蜜臀va亚洲va欧美va天堂| 91久久一区二区| 亚洲国产成人在线| 国产乱码一区二区三区| 91精品国产乱码| 亚洲午夜精品17c| 色欧美片视频在线观看| 国产精品高清亚洲| 国产成人亚洲综合a∨婷婷图片| 欧美一区二区三区婷婷月色| 亚洲国产成人91porn| 色哟哟欧美精品| 综合分类小说区另类春色亚洲小说欧美| 蜜臀久久99精品久久久画质超高清| 欧美性xxxxx极品少妇| 亚洲男人的天堂网| 95精品视频在线| 亚洲日本护士毛茸茸| 成人高清视频在线| 亚洲色图欧美在线| 国产乱码一区二区三区| 久久精品网站免费观看| 久久99精品国产麻豆婷婷| 欧美一区二区在线看| 日本sm残虐另类| 91免费看视频| 91福利国产成人精品照片| 最新国产成人在线观看| 91玉足脚交白嫩脚丫在线播放| 国产女主播在线一区二区| 久久国产乱子精品免费女| 制服视频三区第一页精品| 视频精品一区二区| 777欧美精品| 极品少妇一区二区| 久久久久久免费| 成人免费观看男女羞羞视频| 综合久久久久久| 欧美高清激情brazzers| 久久精品av麻豆的观看方式| 2024国产精品视频| 9人人澡人人爽人人精品| 亚洲视频一区二区在线| 欧美日韩久久一区二区| 午夜视频在线观看一区| 欧美va亚洲va| 成人avav影音| 午夜电影一区二区| 国产亚洲一区二区在线观看| 成人h版在线观看| 亚洲欧美一区二区不卡| 欧美日韩一区小说| 国产精一品亚洲二区在线视频| 综合久久给合久久狠狠狠97色| 欧美日韩综合在线免费观看| 蜜桃视频在线观看一区| 国产精品久久久久婷婷二区次| 欧美日本在线视频| 成人av电影在线播放| 日韩二区在线观看| 中文字幕人成不卡一区| 91精品麻豆日日躁夜夜躁| 成人免费精品视频| 麻豆91精品视频| 亚洲人成精品久久久久| 日韩欧美视频一区| 91农村精品一区二区在线| 日韩黄色免费电影| 亚洲欧美一区二区三区国产精品| 日韩一级成人av| 一本大道综合伊人精品热热| 亚洲精品亚洲人成人网| 极品少妇一区二区三区精品视频| 国产免费成人在线视频| 久久精品免费观看| 国产欧美一区二区三区沐欲| 91麻豆国产在线观看| 亚洲国产精品一区二区久久| 色域天天综合网| 从欧美一区二区三区| 亚洲精品ww久久久久久p站| 韩国av一区二区| 欧美一区二区网站| 免费在线观看精品| 欧洲国产伦久久久久久久| 亚洲精品成a人| 欧美精品一二三| 日韩精品一级二级| 26uuu国产一区二区三区| 国产91丝袜在线播放| 亚洲另类中文字| 欧美日韩免费一区二区三区| 久久99国产精品免费| 欧美国产国产综合| 91国内精品野花午夜精品| 亚洲成av人片一区二区| 国产日本一区二区| 成人精品视频一区二区三区尤物| 一区二区三区.www| 欧美zozozo| 欧美性感一类影片在线播放| 久久精品国产成人一区二区三区| 精品国产在天天线2019| 欧美日韩高清不卡| 国产91精品在线观看| 91精品免费在线观看| 日韩精品欧美精品| 亚洲一区二区三区四区在线观看 | 国产亚洲欧美在线| 蜜桃91丨九色丨蝌蚪91桃色| 天堂久久久久va久久久久| 99riav久久精品riav| 欧美成人女星排行榜| 国产在线一区观看| 国产xxx精品视频大全| 国产精品一卡二卡在线观看| 一本久久a久久精品亚洲| 国产成人在线色| 欧美视频一区二区| 久久久久久电影| 成人免费视频视频| 成人一区二区三区视频| 成人精品高清在线| 97精品国产97久久久久久久久久久久| 国产91在线|亚洲| 91久久久免费一区二区| 欧美区视频在线观看| 日韩欧美一级特黄在线播放| 久久久蜜臀国产一区二区| 国产精品久久久99| 亚洲二区视频在线| 狠狠色狠狠色综合系列| 国产高清精品久久久久| 在线这里只有精品| 日韩欧美国产综合| 亚洲视频 欧洲视频| 婷婷夜色潮精品综合在线| 韩国女主播一区| 色婷婷av一区二区| 精品日韩一区二区三区| 国产精品成人免费精品自在线观看| 中文字幕中文字幕中文字幕亚洲无线| 亚洲综合激情另类小说区| 久久福利视频一区二区| 99久久亚洲一区二区三区青草 | 日韩欧美成人一区| 久久理论电影网| 一区二区免费看| 久久成人18免费观看| 91香蕉视频黄| 2022国产精品视频| 亚洲国产成人91porn| 波多野结衣中文一区| 欧美一区二区三区不卡| 中文字幕一区av| 五月婷婷综合网| 成人久久久精品乱码一区二区三区| 欧美日本在线看| 亚洲美女视频在线| 国产一区二区三区国产| 欧美日韩国产小视频| 综合自拍亚洲综合图不卡区| 经典一区二区三区| 美女视频黄久久| 欧美大度的电影原声| 日韩一级二级三级精品视频| 欧美日韩亚洲另类| 国产精品私人影院| 欧美日本在线播放| 国产精品亚洲一区二区三区妖精 | 亚洲国产成人在线| 成人欧美一区二区三区黑人麻豆| 日韩国产在线一| 久久久久久亚洲综合| 欧美手机在线视频| 久久久久久**毛片大全| 日本va欧美va欧美va精品| 在线免费观看日韩欧美| 亚洲天堂av一区| 91在线看国产| 1024亚洲合集| 99精品热视频| 亚洲视频网在线直播| 99视频一区二区| 亚洲另类春色校园小说| 99综合电影在线视频| 136国产福利精品导航| 99精品国产视频| 亚洲精品日日夜夜| 欧美丝袜自拍制服另类| 亚州成人在线电影|