Skip to content

Commit de030fa

Browse files
committed
[cru] Update the DMA channel to support links 0-15
1 parent 49b9e2e commit de030fa

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

src/Cru/CruDmaChannel.cxx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,27 @@ CruDmaChannel::CruDmaChannel(const Parameters& parameters)
8181
mLinks.reserve(linkMask.size());
8282
for (uint32_t id : linkMask) {
8383
if (id >= Cru::MAX_LINKS) {
84-
BOOST_THROW_EXCEPTION(InvalidLinkId() << ErrorInfo::Message("Each endpoint supports up to 12 links.")
84+
BOOST_THROW_EXCEPTION(InvalidLinkId() << ErrorInfo::Message("Each endpoint supports up to 16 links.")
8585
<< ErrorInfo::LinkId(id));
8686
}
87-
// If the link is not enabled, skip it
88-
if (!dwrapper.getLinkEnabled(linkMap.at(id))) {
89-
log((format("Will not push superpages to link #%1% (disabled)") % id).str(), InfoLogger::InfoLogger::Warning);
87+
88+
if (id == 15) {
89+
Cru::Link userLogicLink;
90+
userLogicLink.dwrapper = getBar()->getEndpointNumber();
91+
userLogicLink.dwrapperId = 15;
92+
if (!dwrapper.getLinkEnabled(userLogicLink)) {
93+
log((format("Will not push superpages to link #%1% (disabled)") % id).str(), InfoLogger::InfoLogger::Warning);
94+
continue;
95+
}
96+
} else if (id > 11 && id < 15) {
97+
log((format("Will not push superpages to link #%1% (unsupported)") % id).str(), InfoLogger::InfoLogger::Warning);
9098
continue;
99+
} else {
100+
// If the link is not enabled, skip it
101+
if (!dwrapper.getLinkEnabled(linkMap.at(id))) {
102+
log((format("Will not push superpages to link #%1% (disabled)") % id).str(), InfoLogger::InfoLogger::Warning);
103+
continue;
104+
}
91105
}
92106

93107
stream << id << " ";

0 commit comments

Comments
 (0)