Skip to content

Commit

Permalink
Fixes for checking valid_L3
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Ryd committed Feb 15, 2022
1 parent 298540e commit 0ea64a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions TrackletAlgorithm/MatchCalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,12 @@ void MatchCalculator(BXType bx,
ap_uint<kNBits_MemAddr> nmcout6 = 0;
ap_uint<kNBits_MemAddr> nmcout7 = 0;
ap_uint<kNBits_MemAddr> nmcout8 = 0;
MC_LOOP: for (ap_uint<kNBits_MemAddr> istep = 0; istep < kMaxProc - kMaxProcOffset(module::MC) - 2; istep++)
MC_LOOP: for (ap_uint<kNBits_MemAddr> istep = 0; istep < kMaxProc - kMaxProcOffset(module::MC); istep++)
{

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

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

#pragma HLS PIPELINE II=1

Expand Down Expand Up @@ -758,6 +760,7 @@ void MatchCalculator(BXType bx,
auto projid = datastream.getProjIndex();
auto stubid = datastream.getStubIndex();
// Use the stub and projection indices to pick up the stub and projection
//std::cout << "readproj istep projid : "<<istep<<" "<<projid<<std::endl;
AllProjection<APTYPE> proj = allproj->read_mem(bx,projid);
AllStub<ASTYPE> stub = allstub->read_mem(bx,stubid);

Expand Down Expand Up @@ -858,7 +861,10 @@ void MatchCalculator(BXType bx,
// }

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

//std::cout << "Adding full match valid_L3 : "<<istep<<" "<<projseed_next<<" "<<valid_L3<<std::endl;

switch (projseed_next) {
case 0:
if(FMMask<LAYER, PHISEC, TF::L1L2>()) {
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_L3PHIC
set module_to_export MC_L7PHIC

# create new project (deleting any existing one of same name)
open_project -reset match_calc
Expand Down

0 comments on commit 0ea64a0

Please sign in to comment.