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

  • 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 90
Quick Start Tutorials
3-35
You will observe the effects of expression folding later in this tutorial. Not
performing expression folding allows you to see the effects of the block
output optimizations.
3 Click Apply to apply the new settings.
4 Click Generate Code, or type Ctrl+B in the model window to generate
code again.
As before, Real-Time Workshop generates code in the
example_grt_rtw
directory. Note that the previously generated code is overwritten.
5 Edit example_grt_rtw/example.c and examine the function
example_output.
With buffer optimizations enabled, the code in
example_output reuses
temporary buffers with local scope,
rtb_sin_out and rtb_gain_out, rather
than assigning global buffers to each input and output.
static void example_output(int_T tid)
{
real_T rtb_sin_out;
real_T rtb_gain_out;
rtb_sin_out = example_P.SineWave_Amp *
Vue de la page 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 129 130

Commentaires sur ces manuels

Pas de commentaire