-- G. Kemnitz: Technische Informatik -- Band 2: Entwurf digitaler Schaltungen -- 4.3.6 Taktversorgung -- -- Simulation Taktteiler ---------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; library Tuc; use Tuc.Numeric_Sim.all; entity Taktteiler is end entity; architecture Test of Taktteiler is signal ct: tUnsigned(1 downto 0); signal I, T, Q: std_logic; begin process(T, I) begin if I='1' then Q<='0'; ct<="00"; elsif rising_edge(T) then if ct="10" then ct <= "00"; Q <= not Q; else ct<=ct+"1"; end if; end if; end process; Takterzeugung: process begin for idx in 0 to 30 loop T <= '0'; wait for 10 ns; T <= '1'; wait for 10 ns; end loop; wait; end process; -- das Initialisierungssignal wir genau mit der zweiter -- aktiven Taktflanke deaktiviert I <= '1', '0' after 40 ns; end architecture;