Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
RTSD
HDL
Commits
b852669b
Commit
b852669b
authored
6 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Added verify ID marker = 65 and ID version = 2.
parent
db4b369e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/apertif/commissioning/tests/verify_correlator_db_output.py
+30
-7
30 additions, 7 deletions
...pertif/commissioning/tests/verify_correlator_db_output.py
with
30 additions
and
7 deletions
applications/apertif/commissioning/tests/verify_correlator_db_output.py
+
30
−
7
View file @
b852669b
...
@@ -69,6 +69,7 @@ c_dbSize = 1024
...
@@ -69,6 +69,7 @@ c_dbSize = 1024
c_dbPattern
=
[
13
]
*
c_dbSize
c_dbPattern
=
[
13
]
*
c_dbSize
c_baseSrcMac
=
0x002286080000
c_baseSrcMac
=
0x002286080000
c_wcudata
=
1
# is 1 if Data Write is 'wcudata1', else is 2 if DataWriter is 'wcudata2', as defined in central_commands.sh
c_wcudata
=
1
# is 1 if Data Write is 'wcudata1', else is 2 if DataWriter is 'wcudata2', as defined in central_commands.sh
if
c_wcudata
==
1
:
if
c_wcudata
==
1
:
c_baseDstMacEth01
=
0xe41d2de42690
c_baseDstMacEth01
=
0xe41d2de42690
...
@@ -77,6 +78,9 @@ else:
...
@@ -77,6 +78,9 @@ else:
c_baseDstMacEth01
=
0xe41d2dbc3dc0
c_baseDstMacEth01
=
0xe41d2dbc3dc0
c_baseDstMacEth23
=
0xe41d2de40d30
c_baseDstMacEth23
=
0xe41d2de40d30
c_expIdMarker
=
65
c_expIdVersion
=
2
wsrtTelescopes
=
[
'
2
'
,
'
3
'
,
'
4
'
,
'
5
'
,
'
6
'
,
'
7
'
,
'
8
'
,
'
9
'
,
'
a
'
,
'
b
'
,
'
c
'
,
'
d
'
]
wsrtTelescopes
=
[
'
2
'
,
'
3
'
,
'
4
'
,
'
5
'
,
'
6
'
,
'
7
'
,
'
8
'
,
'
9
'
,
'
a
'
,
'
b
'
,
'
c
'
,
'
d
'
]
###############################################################################
###############################################################################
...
@@ -156,6 +160,15 @@ for bui in beamlets:
...
@@ -156,6 +160,15 @@ for bui in beamlets:
###############################################################################
###############################################################################
# Verification per PN
# Verification per PN
for
ni
,
nr
in
enumerate
(
tc
.
nodeNrs
):
# loop PN
for
ni
,
nr
in
enumerate
(
tc
.
nodeNrs
):
# loop PN
# Get read packet data
reportStr
=
'
unb = %2d, pn = %d, bui = %3d, ch = %2d :
'
%
(
unb
,
pn
,
bui
,
ch
)
rdData
=
dbOutputReadData
[
ni
]
###################################################################
# Verify header fields
unb
=
nr
/
nof_pn
# = range(N_band) = 0:15 = [0:127] / 8
pn
=
nr
%
nof_pn
# = range(nof_pn) = 0:7 = [0:127] % 8
# Beamlet mapping as specified in SP-062 table 6 (SC1), 9 (SC4):
# Beamlet mapping as specified in SP-062 table 6 (SC1), 9 (SC4):
#
#
# u bi dest bu_i
# u bi dest bu_i
...
@@ -179,16 +192,13 @@ for bui in beamlets:
...
@@ -179,16 +192,13 @@ for bui in beamlets:
# 1 1 5 BN1 513 515 ...
# 1 1 5 BN1 513 515 ...
# 2 1 6 BN2 768 770 ...
# 2 1 6 BN2 768 770 ...
# 3 1 7 BN3 769 771 ...
# 3 1 7 BN3 769 771 ...
unb
=
nr
/
nof_pn
# = range(N_band) = 0:15 = [0:127] / 8
pn
=
nr
%
nof_pn
# = range(nof_pn) = 0:7 = [0:127] % 8
expBeamlet
=
N_slot
*
unb
# offset for UniBoard band
expBeamlet
=
N_slot
*
unb
# offset for UniBoard band
expBeamlet
=
expBeamlet
+
N_clk
*
(
pn
/
Q_interleave
)
+
(
pn
%
Q_interleave
)
# offset for Local PN
expBeamlet
=
expBeamlet
+
N_clk
*
(
pn
/
Q_interleave
)
+
(
pn
%
Q_interleave
)
# offset for Local PN
expBeamlet
=
expBeamlet
+
bui
*
Q_interleave
# offset serial beamlets
expBeamlet
=
expBeamlet
+
bui
*
Q_interleave
# offset serial beamlets
expChannel
=
cm
.
reverse_bits
(
ch
,
N_chan_x_w
)
expChannel
=
cm
.
reverse_bits
(
ch
,
N_chan_x_w
)
expChannel
=
cm
.
invert_msbit
(
expChannel
,
N_chan_x_w
)
expChannel
=
cm
.
invert_msbit
(
expChannel
,
N_chan_x_w
)
#
Verify h
eader fields
#
H
eader fields
# 0 gap(16) + ETH dst mac hi(16)
# 0 gap(16) + ETH dst mac hi(16)
# 1 ETH dst mac lo
# 1 ETH dst mac lo
# 2 ETH src mac hi
# 2 ETH src mac hi
...
@@ -211,9 +221,6 @@ for bui in beamlets:
...
@@ -211,9 +221,6 @@ for bui in beamlets:
# 19 FLAG
# 19 FLAG
# 20 FLAG
# 20 FLAG
rdData
=
dbOutputReadData
[
ni
]
reportStr
=
'
unb = %2d, pn = %d, bui = %3d, ch = %2d :
'
%
(
unb
,
pn
,
bui
,
ch
)
# . dst mac as defined in central_commands.sh
# . dst mac as defined in central_commands.sh
if
unb
<
4
:
expDstMac
=
c_baseDstMacEth01
if
unb
<
4
:
expDstMac
=
c_baseDstMacEth01
elif
unb
<
8
:
expDstMac
=
c_baseDstMacEth01
+
1
elif
unb
<
8
:
expDstMac
=
c_baseDstMacEth01
+
1
...
@@ -238,6 +245,22 @@ for bui in beamlets:
...
@@ -238,6 +245,22 @@ for bui in beamlets:
tc
.
append_log
(
tc
.
V_ERRORS
,
reportStr
+
'
read source MAC is wrong (read 0x%012X != 0x%012X expected)
'
%
(
rdSrcMac
,
expSrcMac
))
tc
.
append_log
(
tc
.
V_ERRORS
,
reportStr
+
'
read source MAC is wrong (read 0x%012X != 0x%012X expected)
'
%
(
rdSrcMac
,
expSrcMac
))
tc
.
set_result
(
'
FAILED
'
)
tc
.
set_result
(
'
FAILED
'
)
# . ID marker
rdIdMarker
=
cm
.
to_unsigned
(
rdData
[
11
],
32
)
>>
24
if
rdIdMarker
==
c_expIdMarker
:
tc
.
append_log
(
tc
.
V_INFO_DETAILS
,
reportStr
+
'
ID marker = %d is OK
'
%
rdIdMarker
)
else
:
tc
.
append_log
(
tc
.
V_ERRORS
,
reportStr
+
'
read ID marker is wrong (read %d != %d expected)
'
%
(
rdIdMarker
,
c_expIdMarker
))
tc
.
set_result
(
'
FAILED
'
)
# . ID version
rdIdVersion
=
cm
.
to_unsigned
(
rdData
[
11
],
24
)
>>
16
if
rdIdVersion
==
c_expIdVersion
:
tc
.
append_log
(
tc
.
V_INFO_DETAILS
,
reportStr
+
'
ID version = %d is OK
'
%
rdIdVersion
)
else
:
tc
.
append_log
(
tc
.
V_ERRORS
,
reportStr
+
'
read ID version is wrong (read %d != %d expected)
'
%
(
rdIdVersion
,
c_expIdVersion
))
tc
.
set_result
(
'
FAILED
'
)
# . beamlet
# . beamlet
rdBeamlet
=
cm
.
to_unsigned
(
rdData
[
11
],
16
)
rdBeamlet
=
cm
.
to_unsigned
(
rdData
[
11
],
16
)
if
rdBeamlet
==
expBeamlet
:
if
rdBeamlet
==
expBeamlet
:
...
...
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