Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cmsos
worksuite
Commits
0cb7a5be
Commit
0cb7a5be
authored
Mar 22, 2021
by
Luciano Orsini
Browse files
references #239: change of scatter gather parameters
parent
9355d96a
Changes
5
Hide whitespace changes
Inline
Side-by-side
gevb2g/include/gevb2g/BU.h
View file @
0cb7a5be
...
...
@@ -138,9 +138,9 @@ namespace gevb2g
void
clear
();
bool
stopped_
;
// indicates when the BU has to halt
xdata
::
UnsignedLong
availableFrameSize_
;
size_t
availableFrameSize_
;
//xdata::UnsignedLong samples_;
size_t
maxResourcesPerFrame_
;
xdata
::
UnsignedLong
maxResourcesPerFrame_
;
// use to calculate availableFrameSize_
xdata
::
UnsignedLong
maxResources_
;
xdata
::
UnsignedLong
maxDataFrameSize_
;
size_t
maxFragments_
;
...
...
gevb2g/include/gevb2g/EVM.h
View file @
0cb7a5be
...
...
@@ -62,8 +62,8 @@ namespace gevb2g
toolbox
::
rlist
<
unsigned
long
>
*
triggerQueue_
;
toolbox
::
rlist
<
BUResourceDescriptor
>
*
resourceQueue_
;
u
nsigned
l
ong
maxGatherRequests_
;
//
derived from
shipFrameSize_
xdata
::
U
nsigned
L
ong
shipFrameSize_
;
// in bytes
xdata
::
U
nsigned
L
ong
maxGatherRequests_
;
//
use to calculate
shipFrameSize_
u
nsigned
l
ong
shipFrameSize_
;
xdata
::
UnsignedLong
resourceQueueSize_
;
xdata
::
UnsignedLong
triggerQueueSize_
;
unsigned
long
consumedTriggers_
;
...
...
gevb2g/include/gevb2g/version.h
View file @
0cb7a5be
...
...
@@ -19,9 +19,9 @@
#include "config/PackageInfo.h"
// !!! Edit this line to reflect the latest package version !!!
#define WORKSUITE_GEVB2G_VERSION_MAJOR
2
#define WORKSUITE_GEVB2G_VERSION_MINOR
1
#define WORKSUITE_GEVB2G_VERSION_PATCH
3
#define WORKSUITE_GEVB2G_VERSION_MAJOR
3
#define WORKSUITE_GEVB2G_VERSION_MINOR
0
#define WORKSUITE_GEVB2G_VERSION_PATCH
0
// If any previous versions available E.g. #define GEVB2GPREVIOUS_VERSIONS "3.8.0,3.8.1"
#undef WORKSUITE_GEVB2G_PREVIOUS_VERSIONS
...
...
gevb2g/src/common/BU.cc
View file @
0cb7a5be
...
...
@@ -44,7 +44,8 @@ gevb2g::BU::BU (xdaq::ApplicationStub* c)
index_
=
0
;
maxResources_
=
256
;
availableFrameSize_
=
1024
;
availableFrameSize_
=
0
;
maxResourcesPerFrame_
=
1
;
maxDataFrameSize_
=
4096
;
filterDisable_
=
true
;
...
...
@@ -68,7 +69,7 @@ gevb2g::BU::BU (xdaq::ApplicationStub* c)
// export variables to control client
//getApplicationInfoSpace()->fireItemAvailable ("samples", &samples_);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"maxResources"
,
&
maxResources_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"
availableFrameSize"
,
&
availableFrameSiz
e_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"
maxResourcesPerFrame"
,
&
maxResourcesPerFram
e_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"maxDataFrameSize"
,
&
maxDataFrameSize_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"filterDisable"
,
&
filterDisable_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"frameRecvCounter"
,
&
frameRecvCounter_
);
...
...
@@ -602,13 +603,16 @@ xoap::MessageReference gevb2g::BU::Configure (xoap::MessageReference message)
{
this
->
state_
=
"Configuring"
;
eventRate_
=
0
;
maxResourcesPerFrame_
=
(
availableFrameSize_
-
(
sizeof
(
I2O_AVAILABLE_MESSAGE_FRAME
)
+
sizeof
(
ShipRequest
)))
/
sizeof
(
ShipRequest
);
//
maxResourcesPerFrame_ = (availableFrameSize_ - (sizeof(I2O_AVAILABLE_MESSAGE_FRAME) + sizeof(ShipRequest))) / sizeof(ShipRequest);
if
(
maxResourcesPerFrame_
>
maxResources_
)
{
LOG4CPLUS_WARN
(
this
->
getApplicationLogger
(),
"optimized configuration: number of resources "
<<
maxResources_
<<
" was not sufficient to fill 'available' frame, set to max resources "
<<
maxResourcesPerFrame_
);
maxResourcesPerFrame_
=
maxResources_
;
}
availableFrameSize_
=
(
maxResourcesPerFrame_
*
sizeof
(
ShipRequest
))
+
(
sizeof
(
I2O_AVAILABLE_MESSAGE_FRAME
)
-
sizeof
(
ShipRequest
));
availableRef_
=
0
;
frameRecvCounter_
=
0
;
...
...
gevb2g/src/common/EVM.cc
View file @
0cb7a5be
...
...
@@ -37,10 +37,9 @@ gevb2g::EVM::EVM (xdaq::ApplicationStub* c)
xoap
::
bind
(
this
,
&
gevb2g
::
EVM
::
Halt
,
"Halt"
,
XDAQ_NS_URI
);
triggerQueue_
=
toolbox
::
rlist
<
unsigned
long
>::
create
(
"EVM/triggerQueue_"
);
resourceQueue_
=
toolbox
::
rlist
<
BUResourceDescriptor
>::
create
(
"EVM/resourceQueue_"
);
resourceQueue_
=
toolbox
::
rlist
<
BUResourceDescriptor
>::
create
(
"EVM/resourceQueue_"
);
bxCounter_
=
0
;
shipFrameSize_
=
0
;
resourceQueueSize_
=
0
;
triggerQueueSize_
=
0
;
triggerDisable_
=
1
;
...
...
@@ -50,11 +49,15 @@ gevb2g::EVM::EVM (xdaq::ApplicationStub* c)
triggerClassInstance_
=
0
;
triggerClassName_
=
"unknown"
;
this
->
state_
=
"uninitialized"
;
maxGatherRequests_
=
1
;
shipFrameSize_
=
0
;
createPool_
=
true
;
poolName_
=
"evmPool"
;
getApplicationInfoSpace
()
->
fireItemAvailable
(
"
shipFrameSize"
,
&
shipFrameSize
_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"
maxGatherRequests"
,
&
maxGatherRequests
_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"resourceQueueSize"
,
&
resourceQueueSize_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"triggerQueueSize"
,
&
triggerQueueSize_
);
getApplicationInfoSpace
()
->
fireItemAvailable
(
"triggerDisable"
,
&
triggerDisable_
);
...
...
@@ -140,7 +143,9 @@ xoap::MessageReference gevb2g::EVM::Configure (xoap::MessageReference message)
triggerQueue_
->
resize
(
triggerQueueSize_
);
resourceQueue_
->
resize
(
resourceQueueSize_
);
maxGatherRequests_
=
(
shipFrameSize_
-
(
sizeof
(
I2O_SHIP_FRAGMENTS_MESSAGE_FRAME
)
+
sizeof
(
ShipRequest
)))
/
sizeof
(
ShipRequest
);
//maxGatherRequests_ = (shipFrameSize_ - (sizeof(I2O_SHIP_FRAGMENTS_MESSAGE_FRAME) + sizeof(ShipRequest))) / sizeof(ShipRequest);
shipFrameSize_
=
(
maxGatherRequests_
*
sizeof
(
ShipRequest
))
+
(
sizeof
(
I2O_SHIP_FRAGMENTS_MESSAGE_FRAME
)
-
sizeof
(
ShipRequest
));
if
(
triggerDisable_
)
{
...
...
@@ -426,7 +431,7 @@ void gevb2g::EVM::multiCast (toolbox::mem::Reference * ref)
framePtr
->
PvtMessageFrame
.
StdMessageFrame
.
VersionOffset
=
0
;
// xdaq::frameSend(copyRef);
r
ef
->
setDataSize
(
shipFrameSize_
);
copyR
ef
->
setDataSize
(
shipFrameSize_
);
LOG4CPLUS_DEBUG
(
this
->
getApplicationLogger
(),
toolbox
::
toString
(
"send to RU tid: %d requests: %d"
,
ruTid_
[
i
],
framePtr
->
fragments
));
try
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment