From 330b7e019e075035a6584e7648bf7bbf5bf28731 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 9 Apr 2010 08:59:44 +0000 Subject: [PATCH] - added FCS generation enable 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@894 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/emac/src/emac_tx.vhd | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/emac/src/emac_tx.vhd b/lib/emac/src/emac_tx.vhd index f67fa30..f559b12 100644 --- a/lib/emac/src/emac_tx.vhd +++ b/lib/emac/src/emac_tx.vhd @@ -102,6 +102,7 @@ ARCHITECTURE behavior OF emac_tx IS signal reset_pipe : unsigned(31 downto 0); signal Gbps_en : std_logic; + signal fcs_gen_en : std_logic; signal fcs_inject_en : std_logic; signal fcs_rst : std_logic; @@ -377,6 +378,7 @@ host2xfer_sync_register: begin if rising_edge(mii_tx_clk) then Gbps_en <= ctrl_in.Gbps_en; + fcs_gen_en <= ctrl_in.fcs_gen_en; end if; end process; @@ -492,7 +494,7 @@ xfer_state_next: end process; xfer_state: - process(xfer_s, ifg_idle, cmd_fifo_empty, piso32_din_rdy, piso32_dout_vld, xfer_bsy) + process(xfer_s, ifg_idle, cmd_fifo_empty, piso32_din_rdy, piso32_dout_vld, xfer_bsy, fcs_gen_en) begin piso32_din_vld <= '0'; @@ -550,7 +552,10 @@ xfer_state: when xfer_stop => if piso32_dout_vld = '0' then - xfer_sn <= xfer_crc; + xfer_sn <= xfer_finish; + if fcs_gen_en = '1' then + xfer_sn <= xfer_crc; + end if; end if; when xfer_crc => @@ -651,6 +656,10 @@ fcs_enable_gen: fcs_din_vld <= fcs_en(fcs_en'left) and piso32_dout_vld and piso32_dout_en; inst_fcs: entity work.crc32 + GENERIC MAP + ( + crc32_init => X"00000000" + ) PORT MAP ( rst => fcs_rst,