OpenCores
URL https://opencores.org/ocsvn/ethmac/ethmac/trunk

Subversion Repositories ethmac

[/] [ethmac/] [trunk/] [bench/] [verilog/] [eth_phy.v] - Diff between revs 209 and 223

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 209 Rev 223
Line 39... Line 39...
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//
//
// CVS Revision History
// CVS Revision History
//
//
// $Log: not supported by cvs2svn $
// $Log: not supported by cvs2svn $
 
// Revision 1.6  2002/10/09 13:16:51  tadejm
 
// Just back-up; not completed testbench and some testcases are not
 
// wotking properly yet.
 
//
// Revision 1.5  2002/09/18 17:55:08  tadej
// Revision 1.5  2002/09/18 17:55:08  tadej
// Bug repaired in eth_phy device
// Bug repaired in eth_phy device
//
//
// Revision 1.3  2002/09/13 14:50:15  mohor
// Revision 1.3  2002/09/13 14:50:15  mohor
// Bug in MIIM fixed.
// Bug in MIIM fixed.
Line 948... Line 952...
reg            tx_sfd_ok;
reg            tx_sfd_ok;
// if there is a drible nibble, then tx packet is not byte aligned!
// if there is a drible nibble, then tx packet is not byte aligned!
reg            tx_byte_aligned_ok;
reg            tx_byte_aligned_ok;
// complete length of TX packet (Bytes) received (without preamble and SFD)
// complete length of TX packet (Bytes) received (without preamble and SFD)
reg    [31:0]  tx_len;
reg    [31:0]  tx_len;
 
// complete length of TX packet (Bytes) received (without preamble and SFD) untill MTxErr signal was set first
 
reg    [31:0]  tx_len_err;
 
 
// TX control
// TX control
always@(posedge mtx_clk_o)
always@(posedge mtx_clk_o)
begin
begin
  // storing data and basic checking of frame
  // storing data and basic checking of frame
Line 959... Line 965...
  begin
  begin
    tx_cnt <= 0;
    tx_cnt <= 0;
    tx_preamble_ok <= 0;
    tx_preamble_ok <= 0;
    tx_sfd_ok <= 0;
    tx_sfd_ok <= 0;
    tx_len <= 0;
    tx_len <= 0;
 
    tx_len_err <= 0;
  end
  end
  else
  else
  begin
  begin
    if (!mtxen_i)
    if (!mtxen_i)
    begin
    begin
Line 983... Line 990...
        else
        else
          tx_preamble_ok <= 0;
          tx_preamble_ok <= 0;
        tx_sfd_ok <= 0;
        tx_sfd_ok <= 0;
        tx_byte_aligned_ok <= 0;
        tx_byte_aligned_ok <= 0;
        tx_len <= 0;
        tx_len <= 0;
 
        tx_len_err <= 0;
//        tx_mem_addr_in <= 0;
//        tx_mem_addr_in <= 0;
      end
      end
 
 
      // check preamble
      // check preamble
      if ((tx_cnt > 0) && (tx_cnt <= 13))
      if ((tx_cnt > 0) && (tx_cnt <= 13))
Line 1037... Line 1045...
          tx_mem[tx_mem_addr_in[21:0]] <= {mtxd_i, tx_mem_data_in[3:0]}; // storing data into tx memory
          tx_mem[tx_mem_addr_in[21:0]] <= {mtxd_i, tx_mem_data_in[3:0]}; // storing data into tx memory
          tx_len <= tx_len + 1; // enlarge byte length counter
          tx_len <= tx_len + 1; // enlarge byte length counter
          tx_byte_aligned_ok <= 1; // if transfer will stop after this, then transfer is byte alligned
          tx_byte_aligned_ok <= 1; // if transfer will stop after this, then transfer is byte alligned
          tx_mem_addr_in <= tx_mem_addr_in + 1'b1;
          tx_mem_addr_in <= tx_mem_addr_in + 1'b1;
        end
        end
 
 
 
        if (mtxerr_i)
 
          tx_len_err <= tx_len;
      end
      end
    end
    end
  end
  end
 
 
  // generating CARRIER SENSE for TX with or without delay
  // generating CARRIER SENSE for TX with or without delay

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.