Puedes probar ghdl, que está disponible para Windows, OS X, Linux y probablemente Free BSD. (Y puedes comentar el - USE ieee.std_logic_arith.all;
)
library ieee;
use ieee.std_logic_1164.all;
entity dff_tb is
end entity dff_tb;
architecture behaviour of dff_tb is
-- component instantion leaves the possibility of a configuration specification
component dff
port (
d: in std_logic;
clk: in std_logic;
-- rst: in std_logic;
q: out std_logic
);
end component dff;
signal d: std_logic := '0';
signal clk: std_logic := '0';
-- signal rst: std_logic := '1';
signal q: std_logic;
begin
DUT: work
port map (
d => d,
clk => clk,
-- rst => rst,
q => q
);
-- Stimulus:
CLOCK:
process
begin
wait for 20 ns;
clk <= not clk;
if Now > 400 ns then -- stop clock after stmulus expires
wait;
end if;
end process CLOCK;
-- RESET:
-- process
-- begin
-- wait for 60 ns;
-- rst <= '0';
-- wait; -- done with reset
-- end process RESET;
--
DATA:
process
begin
wait for 80 ns;
d <= '1';
wait for 40 ns;
d <= '0';
wait for 80 ns;
d <= '1';
wait for 120 ns;
d <= '0';
wait for 40 ns;
wait;
end process DATA;
end behaviour;
Tomé prestado esto de un esfuerzo casi idéntico con un reinicio.
ghdl -a dff.vhdl # incluye el código del banco de pruebas adjunto arriba
ghd -e dff_tb
ghdl -r dff_tb --wave = dff_tb.ghw
gtkwave dff_tb.ghw
(pantalla de señal de configuración), rendimientos:
No hay nada malo con tu flip flop D.