Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: aa3b89fcd4a9
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5570c947ef5a
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 21, 2020

  1. PCIe logical: Fixed handling of "scrambler desynced" payloads if we h…

    …ave other control characters before the first K28.5. See #35.
    azonenberg committed Nov 21, 2020
    Copy the full SHA
    5570c94 View commit details
Showing with 10 additions and 6 deletions.
  1. +10 −6 scopeprotocols/PCIeGen2LogicalDecoder.cpp
16 changes: 10 additions & 6 deletions scopeprotocols/PCIeGen2LogicalDecoder.cpp
Original file line number Diff line number Diff line change
@@ -122,10 +122,12 @@ void PCIeGen2LogicalDecoder::Refresh()
size_t ilast = outlen - 1;
bool last_was_skip = false;
bool last_was_idle = false;
bool last_was_no_scramble = false;
if(outlen)
{
last_was_skip = (cap->m_samples[ilast].m_type == PCIeLogicalSymbol::TYPE_SKIP);
last_was_idle = (cap->m_samples[ilast].m_type == PCIeLogicalSymbol::TYPE_LOGICAL_IDLE);
last_was_no_scramble = (cap->m_samples[ilast].m_type == PCIeLogicalSymbol::TYPE_NO_SCRAMBLER);
}

//Update the scrambler UNLESS we have a SKP character K28.0 (k.1c)
@@ -225,7 +227,7 @@ void PCIeGen2LogicalDecoder::Refresh()
{
//Prefer to extend an existing symbol
if(last_was_idle)
cap->m_durations[outlen-1] = end - cap->m_offsets[outlen-1];
cap->m_durations[ilast] = end - cap->m_offsets[ilast];

//Nope, need to make a new symbol
else
@@ -248,14 +250,16 @@ void PCIeGen2LogicalDecoder::Refresh()
//If we get a Dx.x character and aren't synced, create a "no scrambler" symbol on the output
else
{
if(cap->m_samples.empty())
//Prefer to extend an existing symbol
if(last_was_no_scramble)
cap->m_durations[ilast] = end - cap->m_offsets[ilast];

else
{
cap->m_offsets.push_back(0);
cap->m_durations.push_back(end);
cap->m_offsets.push_back(off);
cap->m_durations.push_back(end - off);
cap->m_samples.push_back(PCIeLogicalSymbol(PCIeLogicalSymbol::TYPE_NO_SCRAMBLER));
}
else
cap->m_durations[0] = end;
}
}