Altera Nios II C2H Compiler Manuel d'utilisateur Page 90

  • 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 89
3–50 9.1 Altera Corporation
Nios II C2H Compiler User Guide November 2009
Scheduling
Example 3–38. Pipelined Subfunction
int MAX(int a, int b)
{
return ((a > b)? a : b);
}
#pragma altera_accelerate connect_variable MAX_loop/a to sdram
#pragma altera_accelerate connect_variable MAX_loop/b to
onchip_ram_64_kbytes
int MAX_loop(int * __restrict__ a, int * __restrict__ b)
{
int i, c = 0;
for (i = 0; i < 1024; i++)
{
c += MAX(a[i], b[i]);
}
return c;
}
If the subfunction performs a memory access that stalls, then the outer
state machine also stalls.
Pipelined subfunctions provide a useful option for controlling shared
resources. For further information, see “Resource Sharing”.
Vue de la page 89
1 2 ... 85 86 87 88 89 90 91 92 93 94 95 ... 137 138

Commentaires sur ces manuels

Pas de commentaire