Gast
#1482340
Hallo, will in VHDL eine Uhr realisieren. Die Sekunden und Minuten zählen richtig, aber bei den Stunden ist noch der Wurm drin. Der Einer zählt bis 2 und dann gibt es einen Übertrag. Der Zehner zählt dann bis 1. Aber der Einer muss ja normal bis 9 zählen und dann nur noch bis 2, wie kann ich das denn realisieren? Der aktuelle Quelltext ist: --minzr_int ist der Übertrag der Minuten counter_std_e: process (CLOCK, RESET, c_minzr_int) begin if RESET='1' then STD_E_INT <=X"0"; elsif CLOCK='1' and CLOCK'event then if c_minzr_int='1' then if STD_E_INT=2 then STD_E_INT<=X"0"; else STD_E_INT <= STD_E_INT + 1; end if; end if; end if; end process counter_std_e; counter_std_z: process (CLOCK, RESET, c_stde_int) begin if RESET='1' then STD_Z_INT <=X"0"; elsif CLOCK='1' and CLOCK'event then if c_stde_int='1' then if STD_Z_INT=1 then STD_Z_INT<=X"0"; else STD_Z_INT <=STD_Z_INT + 1; end if; end if; end if; end process counter_std_z;