Skip to content

Commit

Permalink
sample and error counts added to txt file apollo-lhc#3
Browse files Browse the repository at this point in the history
  • Loading branch information
alux committed Jun 24, 2021
1 parent e06f740 commit 40aac1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ApolloSM/ApolloSM_eyescan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,11 @@ std::vector<eyescanCoords> ApolloSM::EyeScan(std::string baseNode, std::string l
//Get BER for this point
esCoords[coordsIndex].BER = SingleEyeScan(baseNode, lpmNode, maxPrescale);
//sample count and error count for this point
sampleCount = RegReadRegister(baseNode + "SAMPLE_COUNT");
prescale = RegReadRegister(baseNode + "PRESCALE");
uint32_t const regDataWidth = RegReadRegister(baseNode + "RX_DATA_WIDTH");
int const regDataWidthInt = (int)regDataWidth;
int const actualDataWidth = busWidthMap.find(regDataWidthInt)->second;
int sampleCount = RegReadRegister(baseNode + "SAMPLE_COUNT");
int prescale = RegReadRegister(baseNode + "PRESCALE");
int es_sample_count=((1 << (1+prescale))*sampleCount*(float)actualDataWidth)
esCoords[coordsIndex].sample = es_sample_count;
esCoords[coordsIndex].error = RegReadRegister(baseNode + "ERROR_COUNT");
Expand Down

0 comments on commit 40aac1e

Please sign in to comment.