MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Betriebsanweisung Seite 91

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 130
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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 *
Seitenansicht 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 129 130

Kommentare zu diesen Handbüchern

Keine Kommentare