From 2ca53be1132f5e1ae788b2363fa8ae1d5c343d94 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 28 Mar 2010 17:05:39 +0000 Subject: [PATCH] - added reset register bit for RX/TX 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@838 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/emac/src/emac_top_jb.vhd | 8 +++++++- lib/emac/src/emac_types.vhd | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/emac/src/emac_top_jb.vhd b/lib/emac/src/emac_top_jb.vhd index ce8e308..79bb358 100644 --- a/lib/emac/src/emac_top_jb.vhd +++ b/lib/emac/src/emac_top_jb.vhd @@ -76,8 +76,10 @@ registers_write: tx_din_vld <= '0'; tx_ctrl_in.pkt_alloc_en <= '0'; tx_ctrl_in.pkt_commit_en <= '0'; + tx_ctrl_in.reset <= '0'; rx_ctrl_in.pkt_free_en <= '0'; rx_ctrl_in.pkt_req_en <= '0'; + rx_ctrl_in.reset <= '0'; if RST_I = '1' then rx_int_en <= '0'; tx_int_en <= '0'; @@ -88,8 +90,10 @@ registers_write: when "0000" => tx_ctrl_in.tx_er <= DAT_I(31); + tx_ctrl_in.reset <= DAT_I(27); tx_ctrl_in.pkt_alloc_en <= DAT_I(25); tx_ctrl_in.pkt_commit_en <= DAT_I(24); + rx_ctrl_in.reset <= DAT_I(23); rx_ctrl_in.pkt_free_en <= DAT_I(17); rx_ctrl_in.pkt_req_en <= DAT_I(16); tx_int_en <= DAT_I(5); @@ -125,9 +129,11 @@ registers_read: DAT_O(30) <= mii_rx_er; DAT_O(29) <= mii_col; DAT_O(28) <= mii_crs; + DAT_O(27) <= tx_ctrl_out.reset_busy; DAT_O(25) <= tx_ctrl_out.pkt_alloc_req; DAT_O(24) <= tx_ctrl_out.pkt_done; - DAT_O(23) <= rx_ctrl_out.pkt_lost; + DAT_O(23) <= rx_ctrl_out.reset_busy; + DAT_O(17) <= rx_ctrl_out.pkt_lost; DAT_O(16) <= rx_ctrl_out.pkt_avail; DAT_O(5) <= tx_int_en; DAT_O(4) <= rx_int_en; diff --git a/lib/emac/src/emac_types.vhd b/lib/emac/src/emac_types.vhd index 33e1c53..0286c9d 100644 --- a/lib/emac/src/emac_types.vhd +++ b/lib/emac/src/emac_types.vhd @@ -19,15 +19,18 @@ package emac_types is tx_size : unsigned(15 downto 0); pkt_commit_en : std_logic; pkt_alloc_en : std_logic; + reset : std_logic; end record; type tx_ctrl_out_t is record tx_size : unsigned(15 downto 0); pkt_done : std_logic; pkt_alloc_req : std_logic; + reset_busy : std_logic; end record; type rx_ctrl_in_t is record + reset : std_logic; pkt_read_en : std_logic; pkt_req_en : std_logic; pkt_free_en : std_logic; @@ -38,6 +41,7 @@ package emac_types is pkt_avail : std_logic; pkt_lost : std_logic; rx_size : unsigned(15 downto 0); + reset_busy : std_logic; end record; -- Functions