MATLAB DESIGN HDL CODER RELEASE NOTES Guide de l'utilisateur Page 55

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 410
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 54
System Generator for DSP User Guide www.xilinx.com 55
UG640 (v 12.2) July 23, 2010
Compiling MATLAB into an FPGA
M-functions using Xilinx data types and functions can be tested in the MATLAB command
window. For example, if you type: [z1, z2, z3, z4] = xlSimpleArith(2, 3) in
the MATLAB command window, you'll get the following lines:
UFix(9, 3): 3.500000
Fix(12, 4): -8.687500
Fix(12, 8): 7.996094
Bool: true
Notice that the two integer arguments (2 and 3) are converted to fixed-point numbers
automatically. If you have a floating-point number as an argument, an xfix call is
required.
Complex Multiplier with Latency
This example shows how to create a complex number multiplier. The following shows the
xlcpxmult.m file which specifies the xlcpxmult function.
function [xr, xi] = xlcpxmult(ar, ai, br, bi)
xr = ar * br - ai * bi;
xi = ar * bi + ai * br;
The following diagram shows the sub-system:
Two delay blocks are added after the MCode block. By selecting the option Implement
using behavioral HDL on the Delay blocks, the downstream logic synthesis tool is able to
perform the appropriate optimizations to achieve higher performance.
Vue de la page 54
1 2 ... 50 51 52 53 54 55 56 57 58 59 60 ... 409 410

Commentaires sur ces manuels

Pas de commentaire