Skip to content

Commit

Permalink
Minor cleanup and adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
bryates committed Feb 15, 2022
1 parent 0ea64a0 commit 3d512e3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/GitLab_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Mirror and run GitLab CI
on: # Controls when the action will run.
workflow_dispatch:
push: # Please add your branch down here if wanted. A build will be triggerd for each push.
branches: [HDLTopSim, MP_Ryd_Test, MP_Ryd_Test_rebase, MP_Ryd_Test_rebase_sync]
branches: [HDLTopSim]
pull_request:
branches: [master, HDLTopSim]

Expand Down
34 changes: 1 addition & 33 deletions TrackletAlgorithm/MatchCalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,6 @@ void MatchCalculator(BXType bx,
read[i] = false;
}

// MC_L3PHIC mask {1: on, 0: off}
//static const uint16_t FML1L2 = 1 << shift_L1L2;
//static const uint16_t FML2L3 = 0 << shift_L2L3;
//static const uint16_t FML3L4 = 0 << shift_L3L4;
//static const uint16_t FML5L6 = 1 << shift_L5L6;
//static const uint16_t FMD1D2 = 0 << shift_D1D2;
//static const uint16_t FMD3D4 = 0 << shift_D3D4;
//static const uint16_t FML1D1 = 0 << shift_L1D1;
//static const uint16_t FML2D1 = 0 << shift_L2D1;

// Variables for the merger
// layer 1 variables
bool read_L1_1 = false;
Expand Down Expand Up @@ -464,10 +454,6 @@ void MatchCalculator(BXType bx,
MC_LOOP: for (ap_uint<kNBits_MemAddr> istep = 0; istep < kMaxProc - kMaxProcOffset(module::MC); istep++)
{

//if (istep>105) {
// std::cout << "istep: " << istep << std::endl;
//}

#pragma HLS PIPELINE II=1

// Pick up number of candidate matches for each CM memory
Expand Down Expand Up @@ -791,8 +777,6 @@ void MatchCalculator(BXType bx,
typename AllProjection<APTYPE>::AProjRZDER proj_zd = proj.getRZDer();


//std::cout << "istep proj_seed inc_fm: "<<istep<<" "<<proj_seed<<" "<<inc_fm<<std::endl;

// Calculate residuals
// Get phi and z correction
ap_int<22> full_phi_corr = stub_r * proj_phid; // full corr has enough bits for full multiplication
Expand Down Expand Up @@ -849,40 +833,24 @@ void MatchCalculator(BXType bx,
goodmatch_next = true;
projseed_next = proj_seed;
}
//else if (newtracklet){ // if is a new tracklet, do not make a match because it didn't pass the cuts
// bestmatch_next = FullMatch<FMTYPE>();
// goodmatch_next = false;
// projseed_next = -1;
//}
//else { // if current match did not pass, but it is not a new tracklet, keep the previous best match for that tracklet
// bestmatch_next = bestmatch;
// goodmatch_next = goodmatch;
// projseed_next = projseed;
// }

//if(newtracklet && goodmatch==true) { // Write out only the best match, based on the seeding
if(goodmatch_next&&valid_L3) {

//std::cout << "Adding full match valid_L3 : "<<istep<<" "<<projseed_next<<" "<<valid_L3<<std::endl;
if(goodmatch_next&&valid_L3) {

switch (projseed_next) {
case 0:
if(FMMask<LAYER, PHISEC, TF::L1L2>()) {
//std::cout << "Writing L1L2 match to address: "<<nmcout1+inc_fm-1<<std::endl;
fullmatch[FMCount<LAYER, PHISEC, TF::L1L2>()].write_mem(bx,bestmatch_next,nmcout1+inc_fm-1); // L1L2 seed
nmcout1+=inc_fm;
}
break;
case 1:
if(FMMask<LAYER, PHISEC, TF::L2L3>()) {
//std::cout << "Writing L2L3 match to address: "<<nmcout2+inc_fm-1<<std::endl;
fullmatch[FMCount<LAYER, PHISEC, TF::L2L3>()].write_mem(bx,bestmatch_next,nmcout2+inc_fm-1); // L2L3 seed
nmcout2+=inc_fm;
}
break;
case 2:
if(FMMask<LAYER, PHISEC, TF::L3L4>()) {
//std::cout << "Writing L3L4 match to address: "<<nmcout3+inc_fm-1<<std::endl;
fullmatch[FMCount<LAYER, PHISEC, TF::L3L4>()].write_mem(bx,bestmatch_next,nmcout3+inc_fm-1); // L3L4 seed
nmcout3+=inc_fm;
}
Expand Down
2 changes: 1 addition & 1 deletion project/script_MC.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set modules_to_test {
}
# module_to_export must correspond to the default macros set at the top of the
# test bench; otherwise, the C/RTL cosimulation will fail
set module_to_export MC_L7PHIC
set module_to_export MC_L3PHIC

# create new project (deleting any existing one of same name)
open_project -reset match_calc
Expand Down
6 changes: 3 additions & 3 deletions project/script_MP.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set modules_to_test {
}
# module_to_export must correspond to the default macros set at the top of the
# test bench; otherwise, the C/RTL cosimulation will fail
set module_to_export MP_L6PHIC
set module_to_export MP_L3PHIC

# create new project (deleting any existing one of same name)
open_project -reset match_processor
Expand Down Expand Up @@ -53,9 +53,9 @@ foreach i $modules_to_test {
if { $i == $module_to_export } {
csynth_design
cosim_design
export_design -format ip_catalog
#export_design -format ip_catalog
# Adding "-flow impl" runs full Vivado implementation, providing accurate resource use numbers (very slow).
#export_design -format ip_catalog -flow impl
export_design -format ip_catalog -flow impl
}
}

Expand Down

0 comments on commit 3d512e3

Please sign in to comment.