Altera Nios II C2H Compiler Manual do Utilizador Página 85

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 138
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 84
Altera Corporation 9.1 3–45
November 2009 Nios II C2H Compiler User Guide
C-to-Hardware Mapping Reference
Figure 3–22 shows the dependency graph for the do loop in
Example 3–36, which has loop-carried dependencies.
Example 3–36. Loop-Carried Dependency
int simple_hash(int *data, int len)
{
int hash = 0;
do
{
int data_word = *data++;
hash = hash + data_word;
hash = hash ^ data_word;
} while (len--);
return hash;
}
Figure 3–22. Loop-Carried Dependency
Variables data and hash have loop-carried dependencies, illustrated by
the cyclic arrows in Figure 3–22. The arrow for hash indicates that the
calculation on State 1 in iteration N is dependent on the result of the
calculation from State 2 in iteration (N-1). The arrow for data in State 0
illustrates the ideal case in which a state depends only on its own output.
The ideal case does not restrict the scheduling of successive iterations.
Vista de página 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 137 138

Comentários a estes Manuais

Sem comentários