From 9991abfebf15ca0fd6afe3f50369a78254a517be Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 9 Apr 2010 08:59:06 +0000 Subject: [PATCH] - added FCS generation enable for TX - added FCS check enable for RX 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@893 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/emac/src/emac_top_jb.vhd | 6 ++++++ lib/emac/src/emac_types.vhd | 2 ++ 2 files changed, 8 insertions(+) diff --git a/lib/emac/src/emac_top_jb.vhd b/lib/emac/src/emac_top_jb.vhd index 5456b48..17b3bff 100644 --- a/lib/emac/src/emac_top_jb.vhd +++ b/lib/emac/src/emac_top_jb.vhd @@ -91,6 +91,8 @@ registers_write: rx_ctrl_in.promiscious <= '0'; tx_ctrl_in.Gbps_en <= '0'; rx_ctrl_in.Gbps_en <= '0'; + tx_ctrl_in.fcs_gen_en <= '0'; + rx_ctrl_in.fcs_chk_en <= '0'; elsif (STB_I and CYC_I and WE_I) = '1' then case ADDR_I(5 downto 2) is @@ -98,6 +100,7 @@ registers_write: when "0000" => rx_ctrl_in.reset <= DAT_I(31); rx_ctrl_in.Gbps_en <= DAT_I(30); + rx_ctrl_in.fcs_chk_en <= DAT_I(29); rx_ctrl_in.promiscious <= DAT_I(23); rx_ctrl_in.pkt_req_en <= DAT_I(17); rx_ctrl_in.pkt_free_en <= DAT_I(16); @@ -110,6 +113,7 @@ registers_write: when "0010" => tx_ctrl_in.reset <= DAT_I(31); tx_ctrl_in.Gbps_en <= DAT_I(30); + tx_ctrl_in.fcs_gen_en <= DAT_I(29); tx_ctrl_in.pkt_alloc_en <= DAT_I(17); tx_ctrl_in.pkt_commit_en <= DAT_I(16); tx_int_en <= DAT_I(4); @@ -160,6 +164,7 @@ registers_read: DAT_O <= (others => '0'); DAT_O(31) <= rx_ctrl_out.reset_busy; DAT_O(30) <= rx_ctrl_in.Gbps_en; + DAT_O(29) <= rx_ctrl_in.fcs_chk_en; DAT_O(23) <= rx_ctrl_in.promiscious; DAT_O(19) <= rx_ctrl_out.pkt_bcast; DAT_O(18) <= rx_ctrl_out.pkt_mac_match; @@ -178,6 +183,7 @@ registers_read: DAT_O <= (others => '0'); DAT_O(31) <= tx_ctrl_out.reset_busy; DAT_O(30) <= tx_ctrl_in.Gbps_en; + DAT_O(29) <= tx_ctrl_in.fcs_gen_en; DAT_O(24) <= tx_ctrl_out.pkt_done; DAT_O(17) <= tx_ctrl_out.pkt_alloc_req; DAT_O(16) <= tx_ctrl_out.pkt_armed; diff --git a/lib/emac/src/emac_types.vhd b/lib/emac/src/emac_types.vhd index 54555a5..450d5be 100644 --- a/lib/emac/src/emac_types.vhd +++ b/lib/emac/src/emac_types.vhd @@ -18,6 +18,7 @@ package emac_types is type tx_ctrl_in_t is record Gbps_en : std_logic; reset : std_logic; + fcs_gen_en : std_logic; tx_size : unsigned(15 downto 0); pkt_commit_en : std_logic; pkt_alloc_en : std_logic; @@ -34,6 +35,7 @@ package emac_types is type rx_ctrl_in_t is record Gbps_en : std_logic; reset : std_logic; + fcs_chk_en : std_logic; pkt_read_en : std_logic; pkt_req_en : std_logic; pkt_free_en : std_logic;