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

Subversion Repositories turbo8051

[/] [turbo8051/] [trunk/] [rtl/] [gmac/] [mac/] [g_tx_fsm.v] - Diff between revs 76 and 77

Show entire file | Details | Blame | View Log

Rev 76 Rev 77
Line 157... Line 157...
  output [7:0] tx2mi_byte;            //data to RMII and MII interface
  output [7:0] tx2mi_byte;            //data to RMII and MII interface
  output       tx2mi_end_transmit;    //frame transfer done
  output       tx2mi_end_transmit;    //frame transfer done
  output       tx_sts_vld;            //tx status is valid
  output       tx_sts_vld;            //tx status is valid
  output [15:0] tx_sts_byte_cntr;
  output [15:0] tx_sts_byte_cntr;
  output        tx_sts_fifo_underrun;
  output        tx_sts_fifo_underrun;
  output        tx_ch_en;   // MANDAR
  output        tx_ch_en;
 
 
  input         phy_tx_en;   // mfilardo ofn auth fix.
  input         phy_tx_en;
 
 
  input         app_clk;
  input         app_clk;
  output    set_fifo_undrn; // Description: At GMII Interface ,
  output    set_fifo_undrn;
                            // abug after a transmit fifo underun was found.
 
                            // The packet after a packet that 
 
                            // underran has 1 too few bytes .
 
 
 
 
 
  parameter     mn_idle_st = 3'd0;
  parameter     mn_idle_st = 3'd0;
  parameter     mn_snd_full_dup_frm_st = 3'd1;
  parameter     mn_snd_full_dup_frm_st = 3'd1;
 
 
Line 213... Line 210...
  reg           frm_padded;               //current frame is padded
  reg           frm_padded;               //current frame is padded
 
 
 
 
  reg           set_pad_byte;             //send zero filled bytes
  reg           set_pad_byte;             //send zero filled bytes
  reg           e_tx_sts_vld;             //current packet is transferred
  reg           e_tx_sts_vld;             //current packet is transferred
  reg           tx_sts_vld;               //02999
  reg           tx_sts_vld;
  reg           strt_preamble;
  reg           strt_preamble;
  reg [7:0]      tx_byte;
  reg [7:0]      tx_byte;
  reg [7:0]      tx_fsm_dt_reg;
  reg [7:0]      tx_fsm_dt_reg;
  reg           tx_end_frame_reg;
  reg           tx_end_frame_reg;
  reg           tx_lst_xfr_dt, tx_lst_xfr_fcs;
  reg           tx_lst_xfr_dt, tx_lst_xfr_fcs;
Line 569... Line 566...
  end // always
  end // always
 
 
  wire strt_preamble_prog;
  wire strt_preamble_prog;
  assign strt_preamble_pls = strt_preamble || s_p_d1 || s_p_d2 || s_p_d3;
  assign strt_preamble_pls = strt_preamble || s_p_d1 || s_p_d2 || s_p_d3;
  assign strt_preamble_prog = strt_preamble;
  assign strt_preamble_prog = strt_preamble;
//ECO fix, part1 end
 
 
 
  //fsm to transmit the FCS
  //fsm to transmit the FCS
  //synchronous process
  //synchronous process
  always @(posedge tx_clk or negedge tx_reset_n)
  always @(posedge tx_clk or negedge tx_reset_n)
    begin
    begin
Line 620... Line 616...
    begin
    begin
      if (!tx_reset_n)
      if (!tx_reset_n)
        begin
        begin
          strt_fcs_reg <= 0;
          strt_fcs_reg <= 0;
          tx_fcs_dn_reg <= 0;
          tx_fcs_dn_reg <= 0;
          tx_lst_xfr_fcs_reg <= 0; //naveen 052799  
          tx_lst_xfr_fcs_reg <= 0;
        end // if (!tx_reset_n)
        end // if (!tx_reset_n)
      else
      else
        begin
        begin
          tx_fcs_dn_reg <= tx_fcs_dn;
          tx_fcs_dn_reg <= tx_fcs_dn;
          strt_fcs_reg <= strt_fcs;
          strt_fcs_reg <= strt_fcs;
          tx_lst_xfr_fcs_reg <= tx_lst_xfr_fcs; //naveen 052799   
          tx_lst_xfr_fcs_reg <= tx_lst_xfr_fcs;
        end // else: !if(!tx_reset_n)
        end // else: !if(!tx_reset_n)
    end // always @ (posedge tx_clk or negedge tx_reset_n)
    end // always @ (posedge tx_clk or negedge tx_reset_n)
 
 
  //combinatorial process
  //combinatorial process
  //bad fcs or good fcs could have been requested, in either case
  //bad fcs or good fcs could have been requested, in either case
Line 683... Line 679...
          else if (mi2tx_byte_ack)
          else if (mi2tx_byte_ack)
            fcs_mux_select <= fcs_mux_select  + 1 ;
            fcs_mux_select <= fcs_mux_select  + 1 ;
        end // else: !if(!tx_reset_n)
        end // else: !if(!tx_reset_n)
    end // always @ (posedge tx_clk or negedge tx_reset_n)
    end // always @ (posedge tx_clk or negedge tx_reset_n)
 
 
  //remmember if frame is padded
  //if frame is padded
  always @(posedge tx_clk or negedge tx_reset_n)
  always @(posedge tx_clk or negedge tx_reset_n)
    begin
    begin
      if (!tx_reset_n)
      if (!tx_reset_n)
        frm_padded <= 0;
        frm_padded <= 0;
      else
      else

powered by: WebSVN 2.1.0

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