new in vhdl - a little question
hey, i am new to vhdl, and i wrote a code for a register (the inpute size should be generic).
the register should have datain, enable, reset, and data out
my question is, how can i know if what i wrote works? i mean i compiled it and did not got errors, but how can i know if its functually works?
i uses modelsim.
here is my code:
entity register is
generic(DATA_WIDTH : integer := 8 );
port(clk, reset, load : in std_logic;
data_in : in std_logic_vector(DATA_WIDTH-1 downto 0);
data_out : out std_logic_vector(DATA_WIDTH-1 downto 0));
architecture arc_register of register is
if (reset='1') then
elsif(clk'event and clk='1')then
if(load = '1') then
configuration cfg_register of register is
Google, "vhdl testbench" and read about it.
|All times are GMT. The time now is 02:53 PM.|
SEO by vBSEO ©2010, Crawlability, Inc.