Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FofbTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
FOFB
FofbTool
Commits
f403c3a5
Commit
f403c3a5
authored
9 months ago
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
feat(comlbp): Add operation and configuration of comlbp blocks
parent
0e0a0ee1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
FofbTool/Configuration.py
+22
-0
22 additions, 0 deletions
FofbTool/Configuration.py
FofbTool/Operation.py
+107
-1
107 additions, 1 deletion
FofbTool/Operation.py
FofbTool/Utils.py
+1
-1
1 addition, 1 deletion
FofbTool/Utils.py
with
130 additions
and
2 deletions
FofbTool/Configuration.py
+
22
−
0
View file @
f403c3a5
...
...
@@ -158,6 +158,28 @@ def cellnode_configure_combpm(cellnodename, bpmallowed=None):
logger
.
info
(
"
Configuration of ComBpm done on {}.
"
.
format
(
p
))
return
True
###################################################################################################
# CONFIGURE COM LBP
###################################################################################################
def
cellnode_configure_comlbp
(
cellnodename
,
bpmallowed
=
None
):
"""
Configure the comlbp block of a CellNode.
For now, nothing done
PARAMETERS
----------
cellnodename: str
The target cellnode, ie
'
cellnode-c09
'
RETURN
------
success: boolean
True if configuration is a success
"""
logger
.
info
(
"
Configuration of ComLBP done on {}.
"
.
format
(
p
))
return
True
###################################################################################################
# CONFIGURE CCN: COM CELLNODES
...
...
This diff is collapsed.
Click to expand it.
FofbTool/Operation.py
+
107
−
1
View file @
f403c3a5
...
...
@@ -21,6 +21,44 @@ logger = logging.getLogger("FofbTool")
# OPERATIONS ON CCN
###################################################################################################
def
align_ccn
(
nodename
):
"""
Align FA sequence number on a cellnode
PARAMETERS
----------
nodename: str
The target fofbnode, ie
'
cellnode-c09
'
or
'
centralnode
'
"""
prx
=
FofbTool
.
Utils
.
get_prx_from_nodename
(
nodename
)
if
prx
is
None
:
logger
.
error
(
"
Failed to align CCN on {}
"
.
format
(
nodename
))
return
logger
.
debug
(
"
Latch two sequence numbers without offset
"
)
for
n
in
range
(
4
):
prx
[
"
comlbp{}_seqoffset
"
.
format
(
n
)]
=
0
prx
.
ccnpack0_control
=
0
time
.
sleep
(
2
)
prx
.
ccnpack0_control
=
2
time
.
sleep
(
1
)
N
=
prx
.
ccnpack0_latchedseq2
-
prx
.
ccnpack0_latchedseq1
logger
.
debug
(
"
seq ({}, {}, {})
"
.
format
(
prx
.
ccnpack0_latchedseq2
,
prx
.
ccnpack0_latchedseq1
,
N
))
if
N
in
(
-
1
,
0
,
1
):
logger
.
warning
(
"
Sequence offset measured = {}, something might be wrong
"
.
format
(
N
))
# handle rollover
if
N
<
0
:
N
+=
65536
if
N
>
0x7FFF
:
N
=
0xFFFF
-
N
logger
.
info
(
"
Program sequence offset {} in {}
"
.
format
(
N
,
nodename
))
for
n
in
range
(
4
):
prx
[
"
comlbp{}_seqoffset
"
.
format
(
n
)]
=-
N
def
stop_ccn
(
nodename
):
"""
Stop the communication with cellnode on the specified fofbnode.
...
...
@@ -130,7 +168,7 @@ def ack_ccn(nodename):
prx
[
"
ccnunpack{}_reset_error
"
.
format
(
n
)]
=
False
###################################################################################################
# OPERATIONS ON C
CN
# OPERATIONS ON C
OMBPM
###################################################################################################
def
stop_combpm
(
cellnodename
):
...
...
@@ -194,6 +232,74 @@ def ack_combpm(cellnodename):
time
.
sleep
(
1
)
prx
[
"
combpm_reset_error
"
]
=
False
###################################################################################################
# OPERATIONS ON COMLBP
###################################################################################################
def
stop_comlbp
(
cellnodename
):
"""
Stop the communication with LBP on the specified cellnode.
PARAMETERS
----------
cellnodename: str
The target fofbnode, ie
'
cellnode-c09
'
"""
prx
=
FofbTool
.
Utils
.
get_prx_from_nodename
(
cellnodename
)
if
prx
is
None
:
logger
.
error
(
"
Failed to stop ComLBP on {}
"
.
format
(
p
))
return
logger
.
info
(
"
Stopping ComLBP on {}
"
.
format
(
cellnodename
))
for
n
in
range
(
4
):
prx
[
"
comlbp{}_control
"
.
format
(
n
)]
=
0
def
start_comlbp
(
cellnodename
):
"""
Start the communication with LBP on the specified cellnode.
PARAMETERS
----------
cellnodename: str
The target fofbnode, ie
'
cellnode-c09
'
"""
prx
=
FofbTool
.
Utils
.
get_prx_from_nodename
(
cellnodename
)
if
prx
is
None
:
logger
.
error
(
"
Failed to start ComLBP on {}
"
.
format
(
p
))
return
logger
.
info
(
"
Starting ComLBP on {}
"
.
format
(
cellnodename
))
for
n
in
range
(
4
):
prx
[
"
comlbp{}_control
"
.
format
(
n
)]
=
0x10
def
reset_comlbp
(
cellnodename
):
"""
Reset the communication with LBP on the specified cellnode.
PARAMETERS
----------
cellnodename: str
The target fofbnode, ie
'
cellnode-c09
'
"""
prx
=
FofbTool
.
Utils
.
get_prx_from_nodename
(
cellnodename
)
if
prx
is
None
:
logger
.
error
(
"
Failed to reset ComLBP on {}
"
.
format
(
p
))
return
logger
.
info
(
"
Reset ComLBP on {}
"
.
format
(
cellnodename
))
for
n
in
range
(
4
):
prx
[
"
comlbp{}_control
"
.
format
(
n
)]
=
0x3
time
.
sleep
(
1
)
for
n
in
range
(
4
):
prx
[
"
comlbp{}_control
"
.
format
(
n
)]
=
0x0
###################################################################################################
# OPERATIONS ON BPM ELECTRONICS
###################################################################################################
...
...
This diff is collapsed.
Click to expand it.
FofbTool/Utils.py
+
1
−
1
View file @
f403c3a5
...
...
@@ -272,7 +272,7 @@ def start_all_combpm():
def
start_all_ccn
():
"""
Apply st
op and rese
t commands on all fofbnodes.
Apply st
ar
t commands on all fofbnodes.
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment