Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Need help with a basic VHDL test bench.

I am currently working on a stopwatch in VHDL, and made a counter module. Now I need to make a test bench for this module, and I am simply lost.

[code]library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.std_logic_unsigned.all;

entity countermodule is
Port ( reset : in STD_LOGIC_VECTOR (1 downto 0);
startstop : in STD_LOGIC_VECTOR (1 downto 0);
clk : in STD_LOGIC;
Qout1 : out std_logic_vector (3 downto 0);
Qout2 : out std_logic_vector (3 downto 0);
Qout3 : out std_logic_vector (3 downto 0);
Qout4 : out std_logic_vector (3 downto 0));
end countermodule;

architecture Behavioral of countermodule is

component Counter1 is
Port ( res1 : in std_logic_vector (3 downto 0);
en1 : in STD_LOGIC_VECTOR (1 downto 0);
clk : in std_logic;
countout1 : out std_logic_vector (3 downto 0));
end component;

component counter2 is
Port ( res2 : in std_logic_vector (3 downto 0);
en2 : in STD_LOGIC_VECTOR (1 downto 0);
clk : in STD_LOGIC;
countout2 : out std_logic_vector (3 downto 0));
end component;

component counter3 is
Port ( res3 : in std_logic_vector (3 downto 0);
en3 : in STD_LOGIC_VECTOR (1 downto 0);
clk : in STD_LOGIC;
countout3 : out std_logic_vector (3 downto 0));
end component;

component counter4 is
Port ( res4 : in std_logic_vector (3 downto 0);
en4 : in STD_LOGIC_VECTOR (1 downto 0);
clk : in STD_LOGIC;
countout4 : out std_logic_vector (3 downto 0));
end component;

component Counter is
Port ( clk : in STD_LOGIC;
en : in std_logic;
countout : out STD_LOGIC);
end component;
begin


end Behavioral;[/code]

This is the code for my counter module, help will be appreciated.

Best regards

Fupson
Sign In or Register to comment.