Forum: FPGA, VHDL & Co. N-bit Vor- Rückwärtszähler in VHDL notieren?


von Dirk (Gast)


Lesenswert?

Kann mir jemand ein Beispiel für einen n-bit Vor- Rückwärtszähler
schicken?

von Rick Dangerus (Gast)


Lesenswert?

Google: vhdl n bit counter down up

von franz (Gast)


Lesenswert?

Xilinx ISE Software -> Edit -> Language Templates -> VHDL -> Synthesis 
Constructs -> Coding Examples -> Counters -> Binary -> Up/Down Counters

process (<clock>)
begin
   if <clock>='1' and <clock>'event then
      if <count_direction>='1' then
         <count> <= <count> + 1;
      else
         <count> <= <count> - 1;
      end if;
   end if;
end process;

Ich würde dir auch das "xst.pdf" Dokument von Xilinx empfehlen.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.