Mod 5
Mod 5
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_unsigned.ALL;
--use IEEE.NUMERIC_STD.ALL;
--library UNISIM;
--use UNISIM.VComponents.all;
entity modncount is
clr : in STD_LOGIC;
end modncount;
begin
process(clk)
begin
if (count="100")
else
count<=count+ 1;
end if;
end if;
end process;
q<=count;
end Behavioral;
Testbench
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
--USE ieee.numeric_std.ALL;
ENTITY hhh IS
END hhh;
ARCHITECTURE behavior OF hhh IS
COMPONENT modncount
PORT(
clk : IN std_logic;
clr : IN std_logic;
);
END COMPONENT;
--Inputs
--BiDirs
BEGIN
-- Instantiate the Unit Under Test (UUT)
q => q
);
clk_process :process
begin
end process;
-- Stimulus process
stim_proc: process
begin
clr<='1';
clr<='0';
--
wait;
end process;
END;