MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guide de l'utilisateur Page 92

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 130
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 91
3 Working with Real-Time Workshop
3-36
sin(example_P.SineWave_Freq * example_M->Timing.t[0] +
example_P.SineWave_Phase) + example_P.SineWave_Bias;
rtb_gain_out = rtb_sin_out * example_P.Gain_Gain;
example_Y.Out1 = rtb_gain_out;
}
This code is more efficient in terms of memory usage. The efficiency
improvement gained by enabling
Enable local block outputs and Reuse
block outputs
would be more significant in a large model with many signals.
A Further Optimization: Expression Folding
As a final optimization, you turn on expression folding, a code optimization
technique that minimizes the computation of intermediate results and the
use of temporary buffers or variables.
Enable expression folding and regenerate the code as follows:
1 On the Optimization pane of the Configuration Parameters dialog,
select the
Eliminate superfluous temporary variables (Expression
folding)
option.
2 Make sure that Signal storage reuse is still selected, as shown above.
3 Click Apply.
Vue de la page 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 129 130

Commentaires sur ces manuels

Pas de commentaire