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

Subversion Repositories ethmac

[/] [ethmac/] [trunk/] [rtl/] [verilog/] [eth_txcounters.v] - Diff between revs 352 and 353

Show entire file | Details | Blame | View Log

Rev 352 Rev 353
Line 155... Line 155...
    begin
    begin
      if(ResetNibCnt)
      if(ResetNibCnt)
        NibCnt <=  16'h0;
        NibCnt <=  16'h0;
      else
      else
      if(IncrementNibCnt)
      if(IncrementNibCnt)
        NibCnt <=  NibCnt + 1'b1;
        NibCnt <=  NibCnt + 16'd1;
     end
     end
end
end
 
 
 
 
assign NibCntEq7   = &NibCnt[2:0];
assign NibCntEq7   = &NibCnt[2:0];
assign NibCntEq15  = &NibCnt[3:0];
assign NibCntEq15  = &NibCnt[3:0];
 
 
assign NibbleMinFl = NibCnt >= (((MinFL-3'h4)<<1) -1);  // FCS should not be included in NibbleMinFl
assign NibbleMinFl = NibCnt >= (((MinFL-16'd4)<<1) -1);  // FCS should not be included in NibbleMinFl
 
 
assign ExcessiveDeferCnt = NibCnt[13:0] == 16'h17b7;
assign ExcessiveDeferCnt = NibCnt[13:0] == 14'h17b7;
 
 
assign ExcessiveDefer  = NibCnt[13:0] == 16'h17b7 & ~ExDfrEn;   // 6071 nibbles
assign ExcessiveDefer  = NibCnt[13:0] == 14'h17b7 & ~ExDfrEn;   // 6071 nibbles
 
 
assign IncrementByteCnt = StateData[1] & ~ByteCntMax
assign IncrementByteCnt = StateData[1] & ~ByteCntMax
                        | StateBackOff & (&NibCnt[6:0])
                        | StateBackOff & (&NibCnt[6:0])
                        | (StatePAD | StateFCS) & NibCnt[0] & ~ByteCntMax;
                        | (StatePAD | StateFCS) & NibCnt[0] & ~ByteCntMax;
 
 
Line 187... Line 187...
    begin
    begin
      if(ResetByteCnt)
      if(ResetByteCnt)
        ByteCnt[15:0] <=  16'h0;
        ByteCnt[15:0] <=  16'h0;
      else
      else
      if(IncrementByteCnt)
      if(IncrementByteCnt)
        ByteCnt[15:0] <=  ByteCnt[15:0] + 1'b1;
        ByteCnt[15:0] <=  ByteCnt[15:0] + 16'd1;
    end
    end
end
end
 
 
 
 
assign MaxFrame = ByteCnt[15:0] == MaxFL[15:0] & ~HugEn;
assign MaxFrame = ByteCnt[15:0] == MaxFL[15:0] & ~HugEn;
Line 208... Line 208...
    begin
    begin
      if(StateData[1] & DlyCrcCnt == 3'h4 | StartJam | PacketFinished_q)
      if(StateData[1] & DlyCrcCnt == 3'h4 | StartJam | PacketFinished_q)
        DlyCrcCnt <=  3'h0;
        DlyCrcCnt <=  3'h0;
      else
      else
      if(DlyCrcEn & (StateSFD | StateData[1] & (|DlyCrcCnt[2:0])))
      if(DlyCrcEn & (StateSFD | StateData[1] & (|DlyCrcCnt[2:0])))
        DlyCrcCnt <=  DlyCrcCnt + 1'b1;
        DlyCrcCnt <=  DlyCrcCnt + 3'd1;
    end
    end
end
end
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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