Altera Nios II C2H Compiler Manuel d'utilisateur Page 52

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 138
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 51
3–12 9.1 Altera Corporation
Nios II C2H Compiler User Guide November 2009
One-to-One C-to-Hardware Mapping
Table 3–5 shows an example of a subfunction called by two different
functions. In this case, functions foo() and bar() both call a
subfunction foobar_sub().
Figure 3–8 shows the hardware structure of the accelerators resulting
from the code in Table 35. Logic for the function foobar_sub() exists
within both accelerators.
Figure 3–8. Shared Subfunction Logic
The C2H Compiler does not support external subfunctions. You must
locate the subfunction in the same source file as the accelerated function.
This is because, unlike the #include construct, a C external function
reference requires the presence of a linker. The C2H Compiler has no
linker.
Table 3–5. Shared Subfunction foobar_sub()
Top-Level Accelerated Function: foo() Top-Level Accelerated Function: bar()
void foo(int *data_in,
int *data_out)
{
...
foobar_sub();
...
}
void bar(int *data_in,
int *data_out)
{
...
foobar_sub();
...
foobar_sub();
...
}
Vue de la page 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 137 138

Commentaires sur ces manuels

Pas de commentaire