- added gigabit--mode

Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@860 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2010-04-06 18:30:31 +00:00
parent d7b6040c38
commit d1e30cfa5c
7 changed files with 151 additions and 102 deletions
+35 -7
View File
@@ -32,7 +32,7 @@ END tb_emac_top_jb;
ARCHITECTURE behavior OF tb_emac_top_jb IS
constant CLK_PERIOD : time := 10 ns;
constant MII_CLK_PERIOD : time := 40.7 ns;
constant MII_CLK_PERIOD : time := 7.7 ns;
signal CLK : std_logic := '1';
signal RST : std_logic := '1';
@@ -206,7 +206,14 @@ STIMULUS: process
-- set alloc request
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0200_0000";
WE_I <= '0';
STB_I <= '1';
ADDR_I <= X"0000_0000";
wait until rising_edge(CLK) and SRDY_O = '1';
STB_I <= '0';
wait until rising_edge(CLK) and ACK_O = '1';
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0200_0000" or (not X"0103_0000" and DAT_O_reg);
STB_I <= '1';
WE_I <= '1';
ADDR_I <= X"0000_0000";
@@ -244,7 +251,14 @@ STIMULUS: process
-- set free request
CYC_I <= '1';
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0100_0000";
WE_I <= '0';
STB_I <= '1';
ADDR_I <= X"0000_0000";
wait until rising_edge(CLK) and SRDY_O = '1';
STB_I <= '0';
wait until rising_edge(CLK) and ACK_O = '1';
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0100_0000" or (not X"0203_0000" and DAT_O_reg);
STB_I <= '1';
WE_I <= '1';
ADDR_I <= X"0000_0000";
@@ -315,7 +329,7 @@ STIMULUS: process
STB_I <= '0';
wait until rising_edge(CLK) and ACK_O = '1';
wait until rising_edge(CLK);
if DAT_O_reg(16) = '1' then
if DAT_O_reg(17) = '1' and DAT_O_reg(16) = '1' then
exit check_data_avail;
end if;
end loop;
@@ -335,7 +349,14 @@ STIMULUS: process
-- set packet request
CYC_I <= '1';
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0001_0000";
WE_I <= '0';
STB_I <= '1';
ADDR_I <= X"0000_0000";
wait until rising_edge(CLK) and SRDY_O = '1';
STB_I <= '0';
wait until rising_edge(CLK) and ACK_O = '1';
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0002_0000" or (not X"0301_0000" and DAT_O_reg);
STB_I <= '1';
WE_I <= '1';
ADDR_I <= X"0000_0000";
@@ -383,7 +404,14 @@ STIMULUS: process
-- set free request
CYC_I <= '1';
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0002_0000";
WE_I <= '0';
STB_I <= '1';
ADDR_I <= X"0000_0000";
wait until rising_edge(CLK) and SRDY_O = '1';
STB_I <= '0';
wait until rising_edge(CLK) and ACK_O = '1';
wait until rising_edge(CLK) and SRDY_O = '1';
DAT_I <= X"0001_0000" or (not X"0302_0000" and DAT_O_reg);
STB_I <= '1';
WE_I <= '1';
ADDR_I <= X"0000_0000";
@@ -529,7 +557,7 @@ STIMULUS: process
pktgen_rst <= '0';
pkt_count <= 0;
for i in 1 to 500 loop
wait for 10 us;
wait for 1 us;
emac_read (0);
emac_free;
pkt_count <= pkt_count + 1;