MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Podręcznik Użytkownika Strona 91

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 130
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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 *
Przeglądanie stron 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 129 130

Komentarze do niniejszej Instrukcji

Brak uwag