This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux: DP83867IRRGZ

Other Parts Discussed in Thread: DP83867IR

Tool/software: Linux

Gents!

I am looking to implement a solution for:

- Built-in Self Test (BIST) circuit to accommodate in-circuit testing or diagnostics.

- Active Link Cable Diagnostic (ALCD) to provide a passive method to estimate the cable length during active link.

- Time Domain Reflectometry (TDR) to determine the quality of the cables, connectors, and terminations in addition to estimating the cable length.

on an embedded linux device where the DP83867IR is used. I am planning to use e.g. "phytool" for register read/write.

Instead of re-inventing the wheel; if perhaps someone out there have already done this and have bash shell script(s) (or C/C++) to share that would be highly appreciated.

Thanks.

  • Hi,

    You can use register configuration provided in datasheet to implement BIST and TDR. We are not aware of readily available Linux implementation.

    Regards,
    Geet
  • Thanks.

    I made a simple test running Digital Loopback Mode as follows (the register write/read are all shown, together with some decoded info.).

    The following test run 7-8 loops doing the same:

    # ./fmcPhyBIST -p eth0 -v
    Write eth0/0xf/0x0000 0x0140
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x00fe
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0xe720
    Write eth0/0xf/0x001F 0x4000
    Write eth0/0xf/0x0016 0xd004
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0x0a62
    Byte Count: 2658
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0xed45
    Byte Count: 60741
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0x085e
    Byte Count: 2142
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0x23d9
    Byte Count: 9177
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0x5e8c
    Byte Count: 24204
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0x3171
    Byte Count: 12657
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0x8654
    Byte Count: 34388
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x0016 0x0000
    Write eth0/0xf/0x0000 0x1140
    *****************************************
    PRBS Built-In-Self-Test for eth0 : OK
    *****************************************

    If I then run similar test, but then using Analog Loopback Mode I can rarely seem to get a "PRBS Lock" during the test.

    Am I missing something?

    # ./fmcPhyBIST -p eth0 -v
    Write eth0/0xf/0x0000 0x0140
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x00fe
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0xe720
    Write eth0/0xf/0x001F 0x4000
    Write eth0/0xf/0x0016 0xd008
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0a40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : NO
    PRBS Lock Status : LOCKED
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0071
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 1, Address 0x0071 : 0x5187
    Byte Count: 20871
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    BIST Control and Status Register 2, Address 0x0072 : 0x0200
    PRBS Error Counter : 0
    PRBS Byte Count Overflow : YES
    PRBS Checker Packet Count Overflow: NO
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x000d 0x001f
    Write eth0/0xf/0x000e 0x0072
    Write eth0/0xf/0x000d 0x401f
    Write eth0/0xf/0x000e 0x0002
    Status Register 2 (STS2), Address 0x0017 : 0x0e40
    Core Power Mode : NORMAL
    Slave Scramble Mode : NORMAL
    Master Scramble Mode : NORMAL
    Packet Generator Busy: YES
    PRBS Lock Lost : YES
    PRBS Lock Status : LOCKED
    Missing lock to PBIST stream - retry in 1 sec ...
    Write eth0/0xf/0x0016 0x0000
    Write eth0/0xf/0x0000 0x1140
    *****************************************
    PRBS Built-In-Self-Test for eth0 : ERROR
    *****************************************

  • Let me know if you are looking for further assitance on this topic.

    Regards,
    Geet
  • Hi,

    I am closing this thread. Incase you still have further questions, please open new thread and provide reference to this thread.

    Regards,
    Geet