Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ezekiel Dohmen
advLigoRTS
Commits
d82e7cb3
Commit
d82e7cb3
authored
Oct 06, 2022
by
Ezekiel Dohmen
Browse files
Adding ability to change the dolphin segment ids used by differing legs of the IFO
parent
d33174e1
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/epics/util/feCodeGen.pl
View file @
d82e7cb3
...
...
@@ -1241,6 +1241,31 @@ $totalCardCount = $adcCnt + $dacCnt + $boCnt;
print
OUTH
"
extern CDS_CARDS cards_used[
"
.
$totalCardCount
.
"
];
\n\n
";
print
OUTH
"
#include
\"
commData3.h
\"\n
";
print
OUTH
"
#define DOLPHIN_PCIE_SEGMENT_ID 0
\n
";
if
(
defined
(
$
::
dolphin_network
))
{
$
::
dolphin_network
=~
s/^\s+|\s+$//g
;
#Trimmed
if
(
$
::
dolphin_network
eq
"
EY
")
{
$
::
dolphin_rfm_segment_id
=
3
;
}
elsif
(
$
::
dolphin_network
eq
"
EX
"
)
{
$
::
dolphin_rfm_segment_id
=
2
;
}
elsif
(
$
::
dolphin_network
eq
"
CS
"
){
$
::
dolphin_rfm_segment_id
=
1
;
}
else
{
die
("
ERROR the 'dolphin_network=' CDS parameter was passed but did not have a valid value. Valid options: CS, EX, EY
")
}
print
OUTH
"
#define DOLPHIN_RFM_SEGMENT_ID $::dolphin_rfm_segment_id
\n
";
}
else
{
#If nothing was passed we default to legacy of always using 1 for the RFM segment ID
print
OUTH
"
#define DOLPHIN_RFM_SEGMENT_ID 1
\n
";
}
print
OUTH
"
#define MODEL_NUM_IPCS_USED $::ipcxCnt
\n
";
if
(
$
::
ipcxCnt
==
0
)
{
...
...
src/epics/util/lib/Parameters.pm
View file @
d82e7cb3
...
...
@@ -216,6 +216,10 @@ sub parseParams {
{
$
::
rfmDelay
=
1
;
}
case
"
dolphin_network
"
{
$
::
dolphin_network
=
$spp
[
1
];
}
case
"
flip_signals
"
{
$
::
flipSignals
=
$spp
[
1
];
...
...
src/fe/dolphin.h
View file @
d82e7cb3
...
...
@@ -5,7 +5,7 @@
extern
"C"
{
#endif
int
init_dolphin
(
int
modules
);
int
init_dolphin
(
int
modules
,
int
segment_ids
[]
);
void
finish_dolphin
(
void
);
...
...
src/fe/dolphin_netlink.c
View file @
d82e7cb3
...
...
@@ -111,7 +111,7 @@ static void netlink_recv_resp(struct sk_buff *skb)
}
int
init_dolphin
(
int
num_segments
)
int
init_dolphin
(
int
num_segments
,
int
segment_ids
[]
)
{
struct
sk_buff
*
skb_out
;
struct
nlmsghdr
*
nlh
;
...
...
@@ -153,7 +153,7 @@ int init_dolphin( int num_segments )
{
//This loop is inline with lagacy functionality, instead of passing
//segment ids it requests a number, and segment IDs are requested < that number
alloc_req
->
segments
[
i
].
segment_id
=
i
;
alloc_req
->
segments
[
i
].
segment_id
=
segment_ids
[
i
]
;
alloc_req
->
segments
[
i
].
adapter_num
=
0
;
alloc_req
->
segments
[
i
].
segment_sz_bytes
=
IPC_TOTAL_ALLOC_SIZE
;
}
...
...
src/fe/moduleLoad.c
View file @
d82e7cb3
...
...
@@ -109,7 +109,8 @@ static int __init rt_fe_init( void )
#ifdef DOLPHIN_TEST
{
/// Initialize the Dolphin interface
int
status
=
init_dolphin
(
2
);
int
segment_ids
[]
=
{
DOLPHIN_PCIE_SEGMENT_ID
,
DOLPHIN_RFM_SEGMENT_ID
};
int
status
=
init_dolphin
(
2
,
segment_ids
);
if
(
status
!=
0
)
{
RTSLOG_ERROR
(
"Dolphin Network initialization failed; status = %d
\n
"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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