Microsoft AGB-00001 Spécifications Page 124

  • 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 123
VHDL for the ABEL-HDL Designer
C-12 VHDL Reference Manual
end if;
end process;
process (Clk,OE,Count) -- Counter
begin
if rising_edge(Clk) then -- Edge triggered
if Clr = '1' then
Count <= 0;
elsif Count = 15 then
Count <= 0;
else
Count <= Count + 1;
end if;
end if;
if OE = '1' then
Q <= "ZZZZ"; -- Make Q high Z
else
Q <= To_Vector(4,Count);
end if;
end process;
end example;
Design I/O
In this design, the I/O ports are assigned to pins as described earlier in
this chapter. (This design is intended for implementation in a 20-pin
PLD such as an Altera E0320.) Std_logic_vectors A and B represent
two bidirectional buffers controlled by the Dir input. The convention for
defining an output enable function in VHDL is to specify an assignment
to 'Z' for the disabled state. In this design, A, B and Q all have output
enable functions defined using 'Z'.
Combinational Logic
The combinational logic for A and B is defined in a process statement,
but could just as easily have been defined using concurrent
statements. (Whether to use concurrent statements or sequential
statements for combinational logic is largely a matter of personal
taste.) When a process statement is used to define a combinational
logic function, all of the inputs to that logic function must be entered in
the sensitivity list. In this case, the three inputs are Dir, A and B.
Registered Logic
The counter portion of this design is described in the second process
statement. This process statement includes both Clk and OE in its
sensitivity list because the output enable control for Q is not
dependent on the clock. The sensitivity lists for a process must contain
all inputs that are to be processed asynchronously. To provide a
clocking function for the counter, the counter logic is contained in an if
statement that describes the clock input using the previously described
convention for edge triggered flip-flop behavior.
Vue de la page 123
1 2 ... 119 120 121 122 123 124 125 126 127 128 129 ... 143 144

Commentaires sur ces manuels

Pas de commentaire