FFT IP Core: User Guide

ID 683374
Date 11/06/2017
Public
Document Table of Contents

2.5.1. Simulating the Fixed-Transform FFT IP Core in the MATLAB Software

The FFT IP Core produces a bit-accurate MATLAB model <variation name>_model.m, which you can use to model the behavior of your custom FFT variation in the MATLAB software.

The model takes a complex vector as input and it outputs the transform-domain complex vector and corresponding block exponent values. The length and direction of the transform (FFT/IFFT) are also passed as inputs to the model. If the input vector length is an integral multiple of N, the transform length, the length of the output vector(s) is equal to the length of the input vector. However, if the input vector is not an integral multiple of N, it is zero-padded to extend the length to be so. The wizard also creates the MATLAB testbench file <variation name>_tb.m. This file creates the stimuli for the MATLAB model by reading the input complex random data from generated files. If you selected Floating point data representation, the IP core generates the input data in hexadecimal format.

  1. Run the MATLAB software.
  2. Simulate the desgn:
    1. Type help <variation name>_model at the command prompt to view the input and output vectors that are required to run the MATLAB model as a standalone M-function. Create your input vector and make a function call to <variation name>_model. For example:
       N=2048; 
      INVERSE = 0; 
      % 0 => FFT 1=> IFFT x = (2^12)*rand(1,N) + j*(2^12)*rand(1,N); 
      [y,e] = <variation name>_model(x,N,INVERSE);
    2. Alternatively, run the provided testbench by typing the name of the testbench, <variation name>_tb at the command prompt.