LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Usb > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: bknpk@h...<bknpk@h...>
    Date: Sat Feb 19 08:10:24 CET 2005
    Subject: [usb] next_RXSameBitCount code bug
    Top
    I thinkd that the file processRxBit.v contains a logical error at 424.

    In the case of CurrState_prRxBit during `DATA_RX_CHK_SE0: the
    counter next_RXSameBitCount should be cleared and not loaded with
    one.
    My suggested fix is under //by PK bknpk@h...

    `DATA_RX_CHK_SE0:
    begin
    next_bitStuffError <= 1'b0;
    if (RxBits == `SE0)
    begin
    NextState_prRxBit <= `DATA_RX_WAIT_PRB_RDY;
    end //RxBits == `SE0
    else
    begin
    NextState_prRxBit <= `DATA_RX_DATA_DESTUFF;
    if (RxBits == oldRXBits) //NRZI no change 1 /change 0
    //if the current 'RxBits' are the same as the old 'RxBits', then
    begin
    next_RXSameBitCount <= RXSameBitCount + 1'b1;
    //inc 'RXSameBitCount'
    if (RXSameBitCount == `MAX_CONSEC_SAME_BITS)
    //if 'RXSameBitCount' == 7 there has been a bit stuff error
    next_bitStuffError <= 1'b1;
    //flag 'bitStuffError'
    else //else no bit stuffing error
    begin
    next_RXBitCount <= RXBitCount + 1'b1;
    if (RXBitCount != 4'h7) begin
    next_processRxBitRdy <= 1'b1;
    //early indication of ready
    end
    next_RXByte <= { 1'b1, RXByte[7:1]};
    //RZ bit <= 1 (ie no change in 'RxBits')
    end
    end
    else //else current 'RxBits' are
    different from old 'RxBits'
    begin
    if (RXSameBitCount != `MAX_CONSEC_SAME_BITS)
    //if this is not the RZ 0 bit after 6 consecutive RZ 1s, then
    begin
    next_RXBitCount <= RXBitCount + 1'b1;
    if (RXBitCount != 4'h7) begin
    next_processRxBitRdy <= 1'b1;
    //early indication of ready
    end
    next_RXByte <= {1'b0, RXByte[7:1]};
    //RZ bit <= 0 (ie current'RxBits' is different than old 'RxBits')
    end
    //by PK bknpk@h...
    //next_RXSameBitCount <= 4'h1;
    next_RXSameBitCount <= 4'h0;
    //reset 'RXSameBitCount'
    end
    next_oldRXBits <= RxBits;
    end
    end

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.