Skip to content

Commit

Permalink
Removed unused variables, other minor cleanup (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryates authored Oct 30, 2023
1 parent f48fa20 commit 68be3c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
3 changes: 0 additions & 3 deletions TrackletAlgorithm/MatchEngineUnit.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ inline void step(const VMStubMECM<VMSMEType> stubmem[4][1<<(kNbitsrzbinMP+kNbits
auto secondSave = second_;

VMProjection<VMProjType> data(projbuffer_.getProjection());
bool useSecond = data.getZBin().range(0,0)==1;
constexpr bool isDisk = LAYER > TF::L6;
constexpr int nbins = isDisk ? (1 << kNbitsrzbin)*2 : (1 << kNbitsrzbin); //twice as many bins in disks (since there are two disks)
constexpr regionType APTYPE = TF::layerDiskRegion[LAYER];
int sign = isDisk ? (projbuffer_.getPhiDer() < 0 ? -1 : 1) : 0;

if(istub_ == 0) {

Expand Down
22 changes: 6 additions & 16 deletions TrackletAlgorithm/MatchProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,6 @@ void MatchCalculator(BXType bx,
const auto kr_corr_shift = (LAYER < TF::D1)? 0 : 7; // shifttmp2 in emulation

const auto LUT_matchcut_alpha_width = (LAYER < TF::D3) ? 9 : 10;
const auto LUT_matchcut_phi_width = 17;
const auto LUT_matchcut_phi_depth = 12;
const auto LUT_matchcut_z_width = 13;
const auto LUT_matchcut_z_depth = 12;

// Setup look up tables for match cuts
ap_uint<MC::LUT_matchcut_phi_width> LUT_matchcut_phi[MC::LUT_matchcut_phi_depth];
Expand Down Expand Up @@ -1000,7 +996,6 @@ void MatchCalculator(BXType bx,
typename AllProjection<APTYPE>::AProjRZ proj_z = proj.getRZ();
typename AllProjection<APTYPE>::AProjPHIDER proj_phid = proj.getPhiDer();
typename AllProjection<APTYPE>::AProjRZDER proj_zd = proj.getRZDer();
bool isProjDisk = proj_seed >= TF::D1;

// Calculate residuals
// Get phi and z correction
Expand Down Expand Up @@ -1218,8 +1213,6 @@ void MatchProcessor(BXType bx,
// declare index of input memory to be read
ap_uint<kNBits_MemAddr> mem_read_addr = 0;

constexpr unsigned int kNBitsBuffer=3;

// declare counters for each of the 8 different seeds.
//FIXME should have propoer seven bit type
int nmcout1 = 0;
Expand Down Expand Up @@ -1274,7 +1267,6 @@ void MatchProcessor(BXType bx,
#pragma HLS ARRAY_PARTITION variable=zbinLUT complete
zbinLUTinit(zbinLUT, zbins_adjust_PSseed, zbins_adjust_2Sseed);
constexpr int nRbinBits = VMProjection<VMPTYPE>::kVMProjFineZSize + VMProjectionBase<VMPTYPE>::kVMProjZBinSize;
constexpr int nRbin = 1<<TrackletProjection<PROJTYPE>::kTProjRZSize;
static ap_uint<nRbinBits> rbinLUT[256];//1<<TrackletProjection<PROJTYPE>::kTProjRZSize];
#pragma HLS ARRAY_PARTITION variable=rbinLUT complete
readRbin_LUT<LAYER,nRbinBits,256>(rbinLUT);
Expand All @@ -1295,19 +1287,18 @@ void MatchProcessor(BXType bx,

// constants used in reading VMSME memories
constexpr int NUM_PHI_BINS = 1 << kNbitsphibin;
constexpr int NUM_RZ_BINS = 1 << kNbitsrzbin;
constexpr int PAGE_LENGTH_CM = 1024;
constexpr int BIN_ADDR_WIDTH = 4;
PROC_LOOP: for (ap_uint<kNBits_MemAddr> istep = 0; istep < kMaxProc - kMaxProcOffset(module::MP); istep++) {
#pragma HLS PIPELINE II=1 rewind

if (hasMatch)
if (hasMatch) {
matchengine[bestiMEU].advance();
}

if (increase) {
projbufferarray.incProjection();
increase = false;
}
if (increase) {
projbufferarray.incProjection();
increase = false;
}

auto readptr = projbufferarray.getReadPtr();
auto writeptr = projbufferarray.getWritePtr();
Expand Down Expand Up @@ -1512,7 +1503,6 @@ void MatchProcessor(BXType bx,
// number of bits used to distinguish between VMs within a module
constexpr auto nbits_vmme = nbits_vmmeall[LAYER];
constexpr auto nvmbits_ = nbits_vmme + nbitsallstubs[LAYER];
constexpr auto nbins_vmme = 1 << nbits_vmme;

// bits used for routing
iphi = iphiproj.range(iphiproj.length()-nbits_all-1,iphiproj.length()-nbits_all-nbits_vmme);
Expand Down

0 comments on commit 68be3c1

Please sign in to comment.