diff --git a/TrackletAlgorithm/MatchEngineUnit.h b/TrackletAlgorithm/MatchEngineUnit.h index 4b6e8c975d1..ca69d9c80b5 100644 --- a/TrackletAlgorithm/MatchEngineUnit.h +++ b/TrackletAlgorithm/MatchEngineUnit.h @@ -284,7 +284,7 @@ inline void step(const VMStubMECM stubmem[4][1<<(kNbitsrzbinMP+kNbits #endif inline void set_empty() { - empty_ = emptyUnit::kNBitsBuffer>()[(readindex_,writeindex_)]; + empty_ = emptyUnitBool::kNBitsBuffer>(readindex_,writeindex_); } inline bool empty() const { @@ -293,7 +293,7 @@ inline void step(const VMStubMECM stubmem[4][1<<(kNbitsrzbinMP+kNbits } inline bool nearFull() { - return nearFull3Unit::kNBitsBuffer>()[(readindex_,writeindex_)]; + return nearFull3UnitBool::kNBitsBuffer>(readindex_,writeindex_); } inline bool idle() { diff --git a/TrackletAlgorithm/MatchEngineUnit_parameters.h b/TrackletAlgorithm/MatchEngineUnit_parameters.h index 477ea892846..a50ad44b789 100644 --- a/TrackletAlgorithm/MatchEngineUnit_parameters.h +++ b/TrackletAlgorithm/MatchEngineUnit_parameters.h @@ -5,6 +5,7 @@ // each MEU and that come directly from the wiring. // +/* REPLACED BY bool version template static const ap_uint<(1 << (2 * kNBitsBuffer))> nearFullUnit() { ap_uint<(1 << (2 * kNBitsBuffer))> lut; @@ -20,6 +21,7 @@ static const ap_uint<(1 << (2 * kNBitsBuffer))> nearFullUnit() { } return lut; } +*/ template static bool nearFullUnitBool(ap_uint rptr, ap_uint wptr) { @@ -28,6 +30,7 @@ static bool nearFullUnitBool(ap_uint rptr, ap_uint w return wptr1==rptr || wptr2==rptr; } +/* REPLACED BY bool version template static const ap_uint<(1 << (2 * kNBitsBuffer))> nearFull3Unit() { ap_uint<(1 << (2 * kNBitsBuffer))> lut; @@ -44,6 +47,7 @@ static const ap_uint<(1 << (2 * kNBitsBuffer))> nearFull3Unit() { } return lut; } +*/ template static bool nearFull3UnitBool(ap_uint rptr, ap_uint wptr) { @@ -53,6 +57,7 @@ static bool nearFull3UnitBool(ap_uint rptr, ap_uint return wptr1==rptr || wptr2==rptr || wptr3==rptr; } +/* REPLACED BY bool version template static const ap_uint<(1 << (2 * kNBitsBuffer))> nearFull4Unit() { ap_uint<(1 << (2 * kNBitsBuffer))> lut; @@ -70,6 +75,7 @@ static const ap_uint<(1 << (2 * kNBitsBuffer))> nearFull4Unit() { } return lut; } +*/ template static bool nearFull4UnitBool(ap_uint rptr, ap_uint wptr) { @@ -80,6 +86,7 @@ static bool nearFull4UnitBool(ap_uint rptr, ap_uint return wptr1==rptr || wptr2==rptr || wptr3==rptr || wptr4==rptr; } +/* REPLACED BY bool version template static const ap_uint<(1 << (2 * kNBitsBuffer))> emptyUnit() { ap_uint<(1 << (2 * kNBitsBuffer))> lut; @@ -93,6 +100,7 @@ static const ap_uint<(1 << (2 * kNBitsBuffer))> emptyUnit() { } return lut; } +*/ template static bool emptyUnitBool(ap_uint wptr, ap_uint rptr) { @@ -144,6 +152,7 @@ static const ap_uint<1 << nbits> isLessThanSize() { return tab; } +/* REPLACED BY bool version template static const ap_uint<1 << 2*nbits> isLessThanSize() { ap_uint<1 << 2*nbits> tab(0); @@ -165,6 +174,7 @@ static const ap_uint<1 << 2*nbits> isLessThanSize() { } return tab; } +*/ template static bool isLessThanSizeBool(ap_uint projphi, ap_uint stubphi) { diff --git a/TrackletAlgorithm/MatchProcessor.h b/TrackletAlgorithm/MatchProcessor.h index e2823a21c85..9402f3ec6e7 100644 --- a/TrackletAlgorithm/MatchProcessor.h +++ b/TrackletAlgorithm/MatchProcessor.h @@ -1302,9 +1302,8 @@ void MatchProcessor(BXType bx, auto readptr = projbufferarray.getReadPtr(); auto writeptr = projbufferarray.getWritePtr(); - bool empty = emptyUnit()[(readptr,writeptr)]; - bool projBuffNearFull = nearFull3Unit()[(readptr,writeptr)]; - bool projBuffNearFullB = nearFull3UnitBool(readptr,writeptr); + bool empty = emptyUnitBool(readptr,writeptr); + bool projBuffNearFull = nearFull3UnitBool(readptr,writeptr); ap_uint<3> iphi = 0; diff --git a/TrackletAlgorithm/ProjectionRouterBufferArray.h b/TrackletAlgorithm/ProjectionRouterBufferArray.h index d36fb2b609b..433fed72524 100644 --- a/TrackletAlgorithm/ProjectionRouterBufferArray.h +++ b/TrackletAlgorithm/ProjectionRouterBufferArray.h @@ -67,8 +67,6 @@ template class Projecti ap_uint readptr_ = 0; ap_uint writeptr_ = 0; ProjectionRouterBuffer projbuffer_[1< nearFullLUT = nearFullUnit(); - ap_uint<(1 << (2 * kNBitsBuffer))> emptyLUT = emptyUnit(); };