thanks vipinlal
the blog is very useful! I'm now still finding the problem.
i changed my program below, but it generated some error... i uploaled the image below.. Thanks again...
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
use IEEE.std_logic_unsigned.all;
use IEEE.numeric_std.all;
entity TB_ADDER IS
end TB_ADDER;
architecture TEST of TB_ADDER is
component SRAM1 is
Port( clk, cen,wen : in std_logic;
addr: in unsigned(6 downto 0);
din : in unsigned(31 downto 0);
dout: out unsigned(31 downto 0) );
End component;
signal clk_i, cen_i,wen_i : std_logic;
signal addr_i : unsigned(6 downto 0);
signal din_i,dout_i : unsigned(31 downto 0);
begin
DUT: SRAM1 port map (clk=>clk_i,
cen=>cen_i,
wen=>wen_i,
addr=>addr_i,
din=>din_i,
dout=>dout_i);
process begin
clk_i<='0';
wait for 5 ns;
clk_i<='1';
wait for 5 ns;
end process;
STIMULUS: process
begin
cen_i<='1';
wen_i<='0';
For i in 0 to 127 loop
din_i<=to_unsigned(i,32);
addr_i<=to_unsigned(i,32);
addr_i <= i; din_i<= i;
wait until(clk'event and clk='1');
End loop;
Wen_i<='1';
For i in 0 to 127 loop
addr_i<=to_unsigned(i,32);
addr_i <= i;
wait until(clk'event and clk='1');
End loop;
end process STIMULUS;
end TEST;