Microsoft AGB-00001 Spécifications Page 61

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 144
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 60
How to Control the Implementation of VHDL
VHDL Reference Manual 4-3
An example of a state machine design that uses enum_encoding to
specify a particular (non-sequential) encoding of state values is
presented in the tutorials chapter of the VHDL Entry manual. The
prep4 (complex state machine) example presented in that chapter
uses enum_encoding to specify an encoding that is optimized for a
complex PLD implementation, as well as using explicit assignments to
the ’-’ value to include don’t-care information about the circuit’s
outputs.
An example of resolving multi-valued logic can be found in the
definition for the std_ulogic data type (upon which the type
std_logic is based). As described above, the std_ulogic data type is
defined in the package std_logic_1164 (which is located in the file
ieee.vhd) to have nine possible values: ’U’, ’X’, ’0’, ’1’, ’Z’, ’W’, ’L’, ’H’
and ’-’. If these nine values were given the default binary
enumerations, then any signal of type std_ulogic (or the derived type
std_logic) would require four wires when synthesized, rather than the
intended single wire. To solve this dilemma, the following
enum_encoding attribute specification (which is provided in
ieee.vhd) results in a single-bit (and non-unique) encoding for each
value of the std_ulogic data type:
attribute enum_encoding: string;
attribute enum_encoding of std_ulogic: type is
"- - 0 1 Z - - - -"
Enum_encoding is a custom attribute recognized by the VHDL
synthesizer (and ignored by other tools, such as simulators) that maps
the elements of an enumerated type into an actual encoding, using 1
of 4 possible enumeration values. The enumerations for each type are
listed in the attribute string (with entries separated by a space
character) and may consist of one or more of the characters shown in
Table 4-1.
Table 4-1: Logical values for enumeration characters
Enumeration
character
Logic Value
0 0
1 1
- Don’t care (for logic optimization)
Z High impedance (implies an output enable)
Vue de la page 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 143 144

Commentaires sur ces manuels

Pas de commentaire