Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correlator: support for running barrel TM18 #1187

Conversation

gpetruc
Copy link

@gpetruc gpetruc commented Dec 11, 2023

This PR extends the emulators of the correlator layer 1 to support running the barrel at tmux 18 (albeit for now only on serenity boards)

There are no changes in the default correlator layer 1 configuration that is used in the L1 menu, which runs an idealized version of the barrel at tmux6.

Having the tmux18 version in CMSSW is however useful to do studies of this possible architecture and prepare pattern files for single and multi board tests at b904.

If this looks ok to you, I'll make the corresponding PR to CMSSW master this week

@cerminar

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

Attempts to compile this PR succeeded!

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -j 8

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

I found no issues with the code checks!

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 code-checks && scram b -k -j 8 code-checks

I found no issues with the headers!

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 check-headers

@triggerDoctor
Copy link

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

I found 1 files that did not meet formatting requirements:

  • L1Trigger/L1TTrackMatch/plugins/L1TrackJetClustering.h

Please run scram b code-format to auto-apply code formatting

Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 code-format-all

@gpetruc
Copy link
Author

gpetruc commented Dec 12, 2023

Hello triggerDoctor,

I can fix it but it's not in my package so it must have entered in another PR.

Giovanni

Hello, I'm triggerDoctor. @aloeliger is testing this script for L1T offline software validation.

I found 1 files that did not meet formatting requirements:

* L1Trigger/L1TTrackMatch/plugins/L1TrackJetClustering.h

Please run scram b code-format to auto-apply code formatting
Info Value
return code 0
command eval scramv1 runtime -sh && scram b -k -j 8 code-format-all

@aloeliger aloeliger added Phase-2 Pertains to phase-2 development Emulator Development Emulator development PR labels Jan 11, 2024
Comment on lines +272 to +276
} else {
// uncommenting the message below may be useful for debugging
//dbgCout() << "WARNING: sector buffer is full for " << typeid(T).name() << ", pt = " << t.intPt()
// << ", eta = " << t.intEta() << ", phi = " << t.intPhi() << "\n";
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this debug still necessary? If so could you remove the commented stuff and put in LogDebug instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dbgCout() gets compiled to the CMS MessageLogger when compiled within CMSSW, and to cout when compiled standalone (this emulator is also used from within Vitis HLS testbenches, where the MessageLogger is not avaiable).

I'd prefer to keep it as is; this code was already in CMSSW ( https://github.com/cms-sw/cmssw/blob/master/L1Trigger/Phase2L1ParticleFlow/interface/regionizer/buffered_folded_multififo_regionizer_ref.h#L128-L130 ), I just refactored to a different place.

bool isGood =
(nfifos == 1 || nfifos == 2 || nfifos == 3 || nfifos == 4 || nfifos == 6 || nfifos == 8 || nfifos == 12);
if (!isGood) {
dbgCerr() << "Error, created regionizer for nfifos == " << nfifos << ", not supported." << std::endl;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this isn't one of the usual CMSSW Logging streams, could this be removed in favor of LogError?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +147 to +149
assert(!init_);
init_ = true;
assert(out.size() == nregions_post_);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the amount of asserts here is relatively low, it would be probably better to throw cms::Exceptions which can have some more information, than just an assert, which will only mention the line number of the failed assertion on failure.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't use cms::Exception's since this code is also compiled outside of CMSSW in Vitis HLS testbenches.
I could use std exceptions, but eventually these asserts are not supposed to ever trigger when the code is running, they're there just to catch mistakes during development and to inform the reader of the assumptions that this piece of code is doing, so there's not much gain in making them more verbose.

@aloeliger
Copy link

Alright, I think I'm good here. @epalencia Anything from your side? If not, @gpetruc Could you go ahead and open a PR for this to the main CMSSW if there isn't one already?

@epalencia
Copy link

Nothing from my side. @gpetruc , please go ahead and open the PR in master.

@gpetruc
Copy link
Author

gpetruc commented Jan 17, 2024

Hi,

I noticed that when removing the debug printout I had introduced a formatting issue, so now I've re-run code-format and updated the last commit.

L1Trigger/L1TTrackMatch/plugins/L1TrackJetClustering.h also have formatting issues, I could add the fixes to it in this PR but I think it would be better if it's done in any of the other open GTT PRs (also to avoid potential conflicts).

@aloeliger
Copy link

@gpetruc There's a number of accumulated formatting issues that I will likely fix by hand when your PR is merged. Don't worry about it for now. The IB is sort of a rough draft/best effort sort of thing after we've changed up how we use it.

@gpetruc
Copy link
Author

gpetruc commented Jan 22, 2024

Hi,
Now the central CMSSW PR is signed, so maybe this can be merged.

@epalencia
Copy link

@gpetruc , ORPs signature is still not there yet, would you mind to wait a bit for it or you need it already in the IB?

@gpetruc
Copy link
Author

gpetruc commented Jan 22, 2024

I can wait a few dayxs, but eventually I'd like to have it in the IB since there's a large firmware PR that I can't merge until this one is merged.

@epalencia
Copy link

Ok, if main PR is not merged in master tomorrow afternoon, I'll merge it here.

@epalencia epalencia merged commit 4bbec07 into cms-l1t-offline:phase2-l1t-integration-13_3_0_pre3 Jan 22, 2024
@epalencia
Copy link

Tagged as phase2-l1t-1330pre3_v12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emulator Development Emulator development PR Phase-2 Pertains to phase-2 development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants