- 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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user