Skip to content
Snippets Groups Projects
Commit 959f4d94 authored by Steffen Maeland's avatar Steffen Maeland Committed by Graeme Stewart
Browse files

Fixes to trailer/hit word link numbers in encoder (PixelRawDataByteStreamCnv-00-02-28)

parent b34180d3
No related branches found
No related tags found
No related merge requests found
......@@ -86,8 +86,8 @@ static const uint32_t PRB_COLUMNmask_IBL = 0x7F; // column not-condensed hit
static const uint32_t PRB_TOTskip_IBL = 16; // TOT not-condensed hit word skip => need to skip the Row and the Column
static const uint32_t PRB_TOTmask_IBL = 0xFF; // TOT non-condensed hit word mask
static const uint32_t PRB_LINKNUMHITskip_IBL = 24;
//static const uint32_t PRB_LINKNUMHITmask_IBL = 0x1F; // link number for the IBl, containing the SLink (2 MSB) and the FE w.r.t. the SLink (3 LSB)
static const uint32_t PRB_LINKNUMHITmask_IBL = 0x7; // link number for the IBL (= number of the FE w.r.t. the SLink)
static const uint32_t PRB_LINKNUMHITmask_IBL = 0x1F; // link number for the IBl, containing the SLink (2 MSB) and the FE w.r.t. the SLink (3 LSB)
//static const uint32_t PRB_LINKNUMHITmask_IBL = 0x7; // link number for the IBL (= number of the FE w.r.t. the SLink)
// Pixel module trailer word
static const uint32_t PRB_TRAILERERRORSmask = 0x7; // trailer errors trailer word mask
......@@ -101,14 +101,14 @@ static const uint32_t PRB_SKIPPEDTRIGGERTRAILERmask_IBL = 0x3FF; // IBL L1IDskip
static const uint32_t PRB_TRAILERERRORSskip_IBL = 15; // IBL skipped trigger counter skip in the trailer word. In the data format, they're called z,h and v.
static const uint32_t PRB_TRAILERERRORSmask_IBL = 0x1FF; // IBL skipped trigger counter mask in the trailer word
static const uint32_t PRB_LINKNUMTRAILERskip_IBL = 24; // IBL link number (= number of the FE chip linked to the S-Link that is sending the stream, and corresponding SLink) in the trailer word
//static const uint32_t PRB_LINKNUMTRAILERmask_IBL = 0x1F; // IBL link number (= number of the FE chip linked to the S-Link that is sending the stream) in the trailer word
static const uint32_t PRB_LINKNUMTRAILERmask_IBL = 0x7; // IBL link number (= number of the FE chip linked to the S-Link that is sending the stream) in the trailer word
static const uint32_t PRB_LINKNUMTRAILERmask_IBL = 0x1F; // IBL link number (= number of the FE chip linked to the S-Link that is sending the stream) in the trailer word
//static const uint32_t PRB_LINKNUMTRAILERmask_IBL = 0x7; // IBL link number (= number of the FE chip linked to the S-Link that is sending the stream) in the trailer word
static const uint32_t PRB_BITFLIPSTRAILERskip_IBL = 0; // IBL bitflips skip in the trailer word
static const uint32_t PRB_BITFLIPSTRAILERmask_IBL = 0x1F; // IBL bitflips mask in the trailer word
// the following words at the moment are used for the encoder, but not for the decoder.
//In the decoder, no separate classification of the errors has been done yet.
static const uint32_t PRB_BCIDSKIPTRAILERskip_IBL = 18; // IBL BCIDskip in trailer word skip
static const uint32_t PRB_BCIDSKIPTRAILERmask_IBL = 0x1; // IBL BCIDskip in trailer word mask
static const uint32_t PRB_BCIDSKIPTRAILERskip_IBL = 0x0; // IBL BCIDskip in trailer word skip
static const uint32_t PRB_BCIDSKIPTRAILERmask_IBL = 0x1F; // IBL BCIDskip in trailer word mask
static const uint32_t PRB_L1IDSKIPTRAILERskip_IBL = 19; // IBL L1IDskip in trailer word skip
static const uint32_t PRB_L1IDSKIPTRAILERmask_IBL = 0x1; // IBL L1IDskip in trailer word mask
static const uint32_t PRB_PREAMBLEERRORTRAILERskip_IBL = 20; // IBL L1IDskip in trailer word skip
......
......@@ -69,7 +69,7 @@ public:
////// decode IBL-only module (not-condensed) hit word
// uint32_t decodeLinkNumHit_IBL(const uint32_t word); // decode Link Number in the IBL not-condensed Hit word // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
uint32_t decodeLinkNumHit_IBL(const uint32_t word); // decode Link Number in the IBL not-condensed Hit word // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
// uint32_t decodeHitBitflips_IBL(const uint32_t word); // search for bitflips in wordparts supposed to be empty
......@@ -82,7 +82,7 @@ public:
////// decode IBL module trailer word
uint32_t decodeSkippedTrigTrailer_IBL(const uint32_t word); // decode the skipped trigger counter in the IBL trailer
uint32_t decodeTrailerErrors_IBL (const uint32_t word); // decode IBL trailer errors, all together
// uint32_t decodeLinkNumTrailer_IBL(const uint32_t word); // decode the link number in the IBL trailer // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
uint32_t decodeLinkNumTrailer_IBL(const uint32_t word); // decode the link number in the IBL trailer // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
// uint32_t decodeTimeOutErrorBit_IBL(const uint32_t word); // decode the Time out error bit in the IBL trailer
uint32_t decodeCondensedModeBit_IBL(const uint32_t word); // decode the Condensed mode bit in the IBL trailer
// uint32_t decodeTrailerBitflips_IBL(const uint32_t word); // decode IBL bitflips in the trailer word // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
......@@ -91,6 +91,7 @@ public:
////// decode Pixel module trailer word
uint32_t decodeTrailerErrors(const uint32_t word); // decode trailer errors from trailer word
uint32_t decodeTrailerBitflips(const uint32_t word); // search for bitflips in wordparts supposed to be empty
uint32_t decodeBcidTrailer_IBL(const uint32_t word);
////// decode Pixel module FE flags
......@@ -104,7 +105,7 @@ public:
////// decode IBL module FE flags
uint32_t decodeServiceCodeCounter_IBL(const uint32_t word); // decode the Service Code Counter from the "non-short" IBL FE flag word
uint32_t decodeServiceCode_IBL(const uint32_t word); // decode the Service code from the "non-short" IBL FE Flag word
// uint32_t decodeLinkNumFEFlag_IBL(const uint32_t word); // decode the Link Number present in the IBL FE Flag word // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
uint32_t decodeLinkNumFEFlag_IBL(const uint32_t word); // decode the Link Number present in the IBL FE Flag word // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
// uint32_t decodeFEFlagBitFlips_IBL(const uint32_t word); // search for bitflips in word partes supposed to be empty // At least temporarily not used, because IBL data format is not clear (Franconi, 17.06.2014)
......
......@@ -297,7 +297,7 @@ void PixelRodEncoder::fillROD(std::vector<uint32_t>& v32rod, MsgStream& log, int
}
if (prev_offlineId != 0x0) {
v32rod.push_back(packLinkTrailer_IBL(prev_FE, timing_error, condensedMode, linkMasked)); // Trailer for IBL
v32rod.push_back(packLinkTrailer_IBL(prev_n5, timing_error, condensedMode, linkMasked)); // Trailer for IBL
condensedMode = false;
#ifdef PIXEL_DEBUG
log << MSG::DEBUG << "IBL Module trailer (because prev_offlineId != 0x0)" << endreq;
......@@ -312,7 +312,7 @@ void PixelRodEncoder::fillROD(std::vector<uint32_t>& v32rod, MsgStream& log, int
while ((fake_BCID < max_BCID) && !timing_error) {
fake_BCID++;
v32rod.push_back(packLinkHeader_IBL(n5, fake_BCID, LVL1ID, 0x0)); // Header for IBL
v32rod.push_back(packLinkTrailer_IBL(FE, timing_error, condensedMode, linkMasked)); // Trailer for IBL
v32rod.push_back(packLinkTrailer_IBL(n5, timing_error, condensedMode, linkMasked)); // Trailer for IBL
#ifdef PIXEL_DEBUG
log << MSG::DEBUG << "(after) empty IBL Module header/trailer pair written for BCID " << fake_BCID << endreq;
......@@ -327,7 +327,7 @@ void PixelRodEncoder::fillROD(std::vector<uint32_t>& v32rod, MsgStream& log, int
while ((fake_BCID < BCID) && !timing_error) {
v32rod.push_back(packLinkHeader_IBL(n5, fake_BCID, LVL1ID, 0x0)); // Header for IBL
v32rod.push_back(packLinkTrailer_IBL(FE, timing_error, condensedMode, linkMasked)); // Trailer for IBL
v32rod.push_back(packLinkTrailer_IBL(n5, timing_error, condensedMode, linkMasked)); // Trailer for IBL
#ifdef PIXEL_DEBUG
log << MSG::DEBUG << "(before) empty IBL Module header/trailer pair written for BCID " << fake_BCID << endreq;
#endif
......@@ -559,7 +559,7 @@ void PixelRodEncoder::fillROD(std::vector<uint32_t>& v32rod, MsgStream& log, int
if (vRows.size() != 0) { // packing remaining non-condensed IBL hit words
// int cycleCounter(0);
for (; vRows.size() != 0; ) {
v32rod.push_back(packRawDataWord_IBL(vRows.at(0), vCols.at(0), vTots.at(0), FE));
v32rod.push_back(packRawDataWord_IBL(vRows.at(0), vCols.at(0), vTots.at(0), n5));
vRows.erase(vRows.begin());
vCols.erase(vCols.begin());
vTots.erase(vTots.begin());
......@@ -579,7 +579,7 @@ void PixelRodEncoder::fillROD(std::vector<uint32_t>& v32rod, MsgStream& log, int
} // end WHILE cycle " while (rdo_it!=rdo_it_end) "
if (m_is_ibl_module || m_is_dbm_module) {
v32rod.push_back(packLinkTrailer_IBL(FE, timing_error, condensedMode, linkMasked));
v32rod.push_back(packLinkTrailer_IBL(n5, timing_error, condensedMode, linkMasked));
condensedMode = false;
#ifdef PIXEL_DEBUG
log << MSG::DEBUG << "Module IBL/DBM trailer (at end of the loop)" << endreq;
......
......@@ -114,13 +114,18 @@ class OrderRdos {
OrderRdos(Identifier offlineId, ServiceHandle<IPixelCablingSvc> pixelCabling):
m_pixelCabling("dummy","dummy") , m_offlineId(offlineId)
{ m_pixelCabling = pixelCabling; };
{ m_pixelCabling = pixelCabling; }
OrderRdos(const OrderRdos & orderFunct): // copy constructor
m_pixelCabling("dummy","dummy") , m_offlineId(orderFunct.m_offlineId)
{ m_pixelCabling = orderFunct.m_pixelCabling; };
{ m_pixelCabling = orderFunct.m_pixelCabling; }
bool operator () (const PixelRDORawData* rdo0, const PixelRDORawData* rdo1);
OrderRdos& operator= (const OrderRdos &other) { // assignment operator
m_pixelCabling = other.m_pixelCabling;
return *this;
}
bool operator () (const PixelRDORawData* rdo0, const PixelRDORawData* rdo1);
};
......@@ -138,12 +143,17 @@ class OrderInitialRdos {
// m_pixelCabling("dummy","dummy") , m_offlineId(offlineId) , m_PixelID(pixelID)
OrderInitialRdos(ServiceHandle<IPixelCablingSvc> pixelCabling, const PixelID * pixelID):
m_pixelCabling("dummy","dummy") , m_PixelID(pixelID)
{ m_pixelCabling = pixelCabling; };
{ m_pixelCabling = pixelCabling; }
OrderInitialRdos(const OrderInitialRdos & orderFunct): // copy constructor
// m_pixelCabling("dummy","dummy") , m_offlineId(orderFunct.m_offlineId) , m_PixelID()
m_pixelCabling("dummy","dummy") , m_PixelID(orderFunct.m_PixelID)
{ m_pixelCabling = orderFunct.m_pixelCabling; };
{ m_pixelCabling = orderFunct.m_pixelCabling; }
OrderInitialRdos& operator= (const OrderInitialRdos &other) { // assignment operator
m_pixelCabling = other.m_pixelCabling;
return *this;
}
bool operator () (const PixelRDORawData* rdo0, const PixelRDORawData* rdo1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment