- 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 reset_pipe : unsigned(31 downto 0);
|
||||||
signal Gbps_en : std_logic;
|
signal Gbps_en : std_logic;
|
||||||
|
signal fcs_gen_en : std_logic;
|
||||||
|
|
||||||
signal fcs_inject_en : std_logic;
|
signal fcs_inject_en : std_logic;
|
||||||
signal fcs_rst : std_logic;
|
signal fcs_rst : std_logic;
|
||||||
@@ -377,6 +378,7 @@ host2xfer_sync_register:
|
|||||||
begin
|
begin
|
||||||
if rising_edge(mii_tx_clk) then
|
if rising_edge(mii_tx_clk) then
|
||||||
Gbps_en <= ctrl_in.Gbps_en;
|
Gbps_en <= ctrl_in.Gbps_en;
|
||||||
|
fcs_gen_en <= ctrl_in.fcs_gen_en;
|
||||||
end if;
|
end if;
|
||||||
end process;
|
end process;
|
||||||
|
|
||||||
@@ -492,7 +494,7 @@ xfer_state_next:
|
|||||||
end process;
|
end process;
|
||||||
|
|
||||||
xfer_state:
|
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
|
begin
|
||||||
|
|
||||||
piso32_din_vld <= '0';
|
piso32_din_vld <= '0';
|
||||||
@@ -550,8 +552,11 @@ xfer_state:
|
|||||||
|
|
||||||
when xfer_stop =>
|
when xfer_stop =>
|
||||||
if piso32_dout_vld = '0' then
|
if piso32_dout_vld = '0' then
|
||||||
|
xfer_sn <= xfer_finish;
|
||||||
|
if fcs_gen_en = '1' then
|
||||||
xfer_sn <= xfer_crc;
|
xfer_sn <= xfer_crc;
|
||||||
end if;
|
end if;
|
||||||
|
end if;
|
||||||
|
|
||||||
when xfer_crc =>
|
when xfer_crc =>
|
||||||
fcs_inject_en <= piso32_din_rdy;
|
fcs_inject_en <= piso32_din_rdy;
|
||||||
@@ -651,6 +656,10 @@ fcs_enable_gen:
|
|||||||
fcs_din_vld <= fcs_en(fcs_en'left) and piso32_dout_vld and piso32_dout_en;
|
fcs_din_vld <= fcs_en(fcs_en'left) and piso32_dout_vld and piso32_dout_en;
|
||||||
|
|
||||||
inst_fcs: entity work.crc32
|
inst_fcs: entity work.crc32
|
||||||
|
GENERIC MAP
|
||||||
|
(
|
||||||
|
crc32_init => X"00000000"
|
||||||
|
)
|
||||||
PORT MAP
|
PORT MAP
|
||||||
(
|
(
|
||||||
rst => fcs_rst,
|
rst => fcs_rst,
|
||||||
|
|||||||
Reference in New Issue
Block a user