function [x, y] = hdlcoder_serial_fft_butterfly(u, v, twiddle)
% FFT2 butterfly block
% This function is used in hdlcoder_ofdm_fft_eml demo model.
%#codegen

%   Copyright 2008-2010 The MathWorks, Inc.

nt = numerictype(u);
fm = fimath(u);

% multiply twiddle and butterfly.
twv = fi(v * twiddle, nt, fm);
  
x = fi(u + twv, nt, fm);
y = fi(u - twv, nt, fm);

