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

Subversion Repositories usbhostslave

[/] [usbhostslave/] [trunk/] [RTL/] [serialInterfaceEngine/] [processTxByte.v] - Diff between revs 9 and 12

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

Rev 9 Rev 12
Line 153... Line 153...
      begin
      begin
        NextState_prcTxB <= `PTBY_WAIT_GNT;
        NextState_prcTxB <= `PTBY_WAIT_GNT;
        next_processTxByteRdy <= 1'b0;
        next_processTxByteRdy <= 1'b0;
        next_TxByte <= TxByteIn;
        next_TxByte <= TxByteIn;
        next_TxByteCtrl <= TxByteCtrlIn;
        next_TxByteCtrl <= TxByteCtrlIn;
        next_TXOneCount <= 1;
        next_TXOneCount <= 4'h0;
        next_TXLineState <= JBit;
        next_TXLineState <= JBit;
        next_USBWireReq <= 1'b1;
        next_USBWireReq <= 1'b1;
      end
      end
      else if (processTxByteWEn == 1'b1)
      else if (processTxByteWEn == 1'b1)
      begin
      begin
Line 203... Line 203...
      if (TxByte[0] == 1'b1)                      //If this bit is 1, then
      if (TxByte[0] == 1'b1)                      //If this bit is 1, then
      next_TXOneCount <= TXOneCount + 1'b1;
      next_TXOneCount <= TXOneCount + 1'b1;
      //increment 'TXOneCount'
      //increment 'TXOneCount'
      else                                        //else this is a zero bit
      else                                        //else this is a zero bit
      begin
      begin
      next_TXOneCount <= 4'h1;
      next_TXOneCount <= 4'h0;
      //reset 'TXOneCount'
      //reset 'TXOneCount'
      if (TXLineState == JBit)
      if (TXLineState == JBit)
      next_TXLineState <= KBit;
      next_TXLineState <= KBit;
      //toggle the line state
      //toggle the line state
      else
      else
Line 226... Line 226...
      end
      end
    end
    end
    `SEND_BYTE_CHK:
    `SEND_BYTE_CHK:
    begin
    begin
      next_USBWireWEn <= 1'b0;
      next_USBWireWEn <= 1'b0;
      if (TXOneCount == 4'h6)
      if (TXOneCount == `MAX_CONSEC_SAME_BITS)
      begin
      begin
        NextState_prcTxB <= `SEND_BYTE_BIT_STUFF;
        NextState_prcTxB <= `SEND_BYTE_BIT_STUFF;
      end
      end
      else if (i != 4'h8)
      else if (i != 4'h8)
      begin
      begin
Line 241... Line 241...
        NextState_prcTxB <= `STOP_CHK;
        NextState_prcTxB <= `STOP_CHK;
      end
      end
    end
    end
    `SEND_BYTE_BIT_STUFF:
    `SEND_BYTE_BIT_STUFF:
    begin
    begin
      next_TXOneCount <= 4'h1;
      next_TXOneCount <= 4'h0;
      //reset 'TXOneCount'
      //reset 'TXOneCount'
      if (TXLineState == JBit)
      if (TXLineState == JBit)
      next_TXLineState <= KBit;
      next_TXLineState <= KBit;
      //toggle the line state
      //toggle the line state
      else
      else

powered by: WebSVN 2.1.0

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