Skip to content
GitLab
Explore
Sign in
Register
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
c522b76f
Commit
c522b76f
authored
10 years ago
by
Kenneth Hiemstra
Browse files
Options
Downloads
Patches
Plain Diff
added the other 2 stream stat info for REG_TR_10GBE
parent
54cd9ed1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+29
-25
29 additions, 25 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
with
29 additions
and
25 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+
29
−
25
View file @
c522b76f
...
@@ -107,11 +107,11 @@ def test_BG_to_DB(tc,io,cmd):
...
@@ -107,11 +107,11 @@ def test_BG_to_DB(tc,io,cmd):
#Bg.write_block_gen_settings(samplesPerPacket=700, blocksPerSync=781250, gapSize=300, memLowAddr=0, memHighAddr=701, BSNInit=42)
#Bg.write_block_gen_settings(samplesPerPacket=700, blocksPerSync=781250, gapSize=300, memLowAddr=0, memHighAddr=701, BSNInit=42)
Db
=
pi_diag_data_buffer
.
PiDiagDataBuffer
(
tc
,
io
,
nofStreams
=
nof_streams
,
ramSizePerStream
=
blocksize
)
Db
=
pi_diag_data_buffer
.
PiDiagDataBuffer
(
tc
,
io
,
nofStreams
=
nof_streams
,
ramSizePerStream
=
blocksize
)
resetptrn
=
[
0xc1ea1ed1
]
*
blocksize
#samples_per_packet + [0]*(blocksize-samples_per_packet)
resetptrn
=
[
0xc1ea1ed1
]
*
blocksize
#samples_per_packet + [0]*(blocksize-samples_per_packet)
for
s
in
tc
.
s
pNrs
:
for
s
in
tc
.
g
pN
umbe
rs
:
Db
.
overwrite_data_buffer
(
resetptrn
,
streamNr
=
s
,
vLevel
=
9
)
Db
.
overwrite_data_buffer
(
resetptrn
,
streamNr
=
s
,
vLevel
=
9
)
# Trigger by reading databuffers:
# Trigger by reading databuffers:
for
s
in
tc
.
s
pNrs
:
for
s
in
tc
.
g
pN
umbe
rs
:
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
9
)
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
9
)
if
use_pps
==
True
:
if
use_pps
==
True
:
...
@@ -122,7 +122,7 @@ def test_BG_to_DB(tc,io,cmd):
...
@@ -122,7 +122,7 @@ def test_BG_to_DB(tc,io,cmd):
bg_ram
=
[]
bg_ram
=
[]
for
s
in
tc
.
s
pNrs
:
for
s
in
tc
.
g
pN
umbe
rs
:
ram
=
Bg
.
read_waveform_ram
(
channelNr
=
s
,
vLevel
=
5
)
ram
=
Bg
.
read_waveform_ram
(
channelNr
=
s
,
vLevel
=
5
)
rram
=
[]
rram
=
[]
for
r
in
ram
:
for
r
in
ram
:
...
@@ -133,7 +133,7 @@ def test_BG_to_DB(tc,io,cmd):
...
@@ -133,7 +133,7 @@ def test_BG_to_DB(tc,io,cmd):
bg_ram
.
append
(
rram
)
bg_ram
.
append
(
rram
)
db_ram
=
[]
db_ram
=
[]
for
s
in
tc
.
s
pNrs
:
for
s
in
tc
.
g
pN
umbe
rs
:
databuf
=
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
5
)
databuf
=
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
5
)
rram
=
[]
rram
=
[]
for
r
in
databuf
:
for
r
in
databuf
:
...
@@ -188,7 +188,7 @@ def write_BG(tc,io,buf):
...
@@ -188,7 +188,7 @@ def write_BG(tc,io,buf):
blocksize
=
get_BG_blocksize
(
tc
,
io
)
blocksize
=
get_BG_blocksize
(
tc
,
io
)
Bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
nofChannels
=
nof_streams
,
ramSizePerChannel
=
blocksize
)
Bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
nofChannels
=
nof_streams
,
ramSizePerChannel
=
blocksize
)
Bg
.
write_disable
()
Bg
.
write_disable
()
for
s
in
tc
.
s
pNrs
:
for
s
in
tc
.
g
pN
umbe
rs
:
Bg
.
write_waveform_ram
(
buf
,
channelNr
=
s
)
Bg
.
write_waveform_ram
(
buf
,
channelNr
=
s
)
def
write_BG_00100
(
tc
,
io
,
cmd
):
def
write_BG_00100
(
tc
,
io
,
cmd
):
...
@@ -254,25 +254,29 @@ def test_tr_10GbE(tc,io,cmd):
...
@@ -254,25 +254,29 @@ def test_tr_10GbE(tc,io,cmd):
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
from
pi_tr_10GbE
import
REGMAP
,
PiTr10GbE
nof_streams
=
3
tr10
=
PiTr10GbE
(
tc
,
io
,
nof_inst
=
1
)
from
pi_tr_10GbE
import
REGMAP
,
PiTr10GbE
,
ADDR_W
tr10
=
PiTr10GbE
(
tc
,
io
,
nof_inst
=
nof_streams
)
if
tc
.
verbosity
>
5
:
if
tc
.
verbosity
>
5
:
on_execute
(
class_definition
=
PiTr10GbE
,
regmap
=
REGMAP
)
# this reads/shows ALL status
on_execute
(
class_definition
=
PiTr10GbE
,
regmap
=
REGMAP
)
# this reads/shows ALL status
for
s
in
tc
.
gpNumbers
:
inst_offs
=
s
*
2
**
ADDR_W
# set rx/tr _frame_maxlength to 9000 (jumbo) as it inits at 1518 and causing frame errors:
# set rx/tr _frame_maxlength to 9000 (jumbo) as it inits at 1518 and causing frame errors:
frame_size_jumbo
=
9000
frame_size_jumbo
=
9000
tr10
.
write_reg
(
tc
.
nodeNrs
,
'
REG_TR_10GBE
'
,(
REGMAP
[
'
rx_frame_maxlength
'
][
2
][
0
]),[
frame_size_jumbo
])
tr10
.
write_reg
(
tc
.
nodeNrs
,
'
REG_TR_10GBE
'
,
inst_offs
+
(
REGMAP
[
'
rx_frame_maxlength
'
][
2
][
0
]),[
frame_size_jumbo
])
tr10
.
write_reg
(
tc
.
nodeNrs
,
'
REG_TR_10GBE
'
,(
REGMAP
[
'
tx_frame_maxlength
'
][
2
][
0
]),[
frame_size_jumbo
])
tr10
.
write_reg
(
tc
.
nodeNrs
,
'
REG_TR_10GBE
'
,
inst_offs
+
(
REGMAP
[
'
tx_frame_maxlength
'
][
2
][
0
]),[
frame_size_jumbo
])
tc
.
set_section_id
(
'
Read/verify tr_10GbE status over Nodes %s
-
'
%
tc
.
nodeNrs
)
tc
.
set_section_id
(
'
Read/verify tr_10GbE status over Nodes %s
stream=%d
'
%
(
tc
.
nodeNrs
,
s
)
)
tc
.
append_log
(
3
,
''
)
tc
.
append_log
(
3
,
''
)
status_names
=
[
'
rx_stats_framesErr
'
,
'
tx_stats_framesErr
'
,
'
rx_stats_framesCRCErr
'
,
\
status_names
=
[
'
rx_stats_framesErr
'
,
'
tx_stats_framesErr
'
,
'
rx_stats_framesCRCErr
'
,
\
'
tx_stats_framesCRCErr
'
,
'
rx_stats_etherStatsCRCErr
'
,
'
tx_stats_etherStatsCRCErr
'
]
'
tx_stats_framesCRCErr
'
,
'
rx_stats_etherStatsCRCErr
'
,
'
tx_stats_etherStatsCRCErr
'
]
for
stat_name
in
status_names
:
for
stat_name
in
status_names
:
verify_10GbE_status
(
tc
,
stat_name
,
tr10
.
read_reg
(
tc
.
nodeNrs
,
'
REG_TR_10GBE
'
,(
REGMAP
[
stat_name
][
2
][
0
]),
1
))
verify_10GbE_status
(
tc
,
stat_name
,
tr10
.
read_reg
(
tc
.
nodeNrs
,
'
REG_TR_10GBE
'
,
inst_offs
+
(
REGMAP
[
stat_name
][
2
][
0
]),
1
))
...
@@ -458,14 +462,14 @@ Cmd['PPSH'] = (test_ppsh, 'using pi_ppsh to read PPSH capture count (acces
...
@@ -458,14 +462,14 @@ Cmd['PPSH'] = (test_ppsh, 'using pi_ppsh to read PPSH capture count (acces
Cmd
[
'
ETH
'
]
=
(
test_eth
,
'
using pi_eth to read eth status
'
,
''
)
Cmd
[
'
ETH
'
]
=
(
test_eth
,
'
using pi_eth to read eth status
'
,
''
)
Cmd
[
'
REMU
'
]
=
(
test_remu
,
'
using pi_remu to load user image (access REG_REMU)
'
,
''
)
Cmd
[
'
REMU
'
]
=
(
test_remu
,
'
using pi_remu to load user image (access REG_REMU)
'
,
''
)
Cmd
[
'
WDI
'
]
=
(
test_wdi
,
'
using pi_wdi to reset to image in bank 0 (access REG_WDI)
'
,
''
)
Cmd
[
'
WDI
'
]
=
(
test_wdi
,
'
using pi_wdi to reset to image in bank 0 (access REG_WDI)
'
,
''
)
Cmd
[
'
XAUI
'
]
=
(
test_tr_xaui
,
'
using pi_tr_xaui to read xaui status (access REG_TR_XAUI)
'
,
''
)
Cmd
[
'
XAUI
'
]
=
(
test_tr_xaui
,
'
using pi_tr_xaui to read xaui status (access REG_TR_XAUI)
'
,
'
(-r for addressing streams)
'
)
Cmd
[
'
10GBE
'
]
=
(
test_tr_10GbE
,
'
using pi_tr_10GbE to read 10GbE status (access REG_TR_10GBE)
'
,
'
(-
n1
for
set maxframesize to jumbo
)
'
)
Cmd
[
'
10GBE
'
]
=
(
test_tr_10GbE
,
'
using pi_tr_10GbE to read 10GbE status (access REG_TR_10GBE)
'
,
'
(-
r
for
addressing streams
)
'
)
Cmd
[
'
BSN
'
]
=
(
test_bsn_mon
,
'
using pi_bsn_monitor to read BSN monitor (access REG_BSN_MONITOR)
'
,
''
)
Cmd
[
'
BSN
'
]
=
(
test_bsn_mon
,
'
using pi_bsn_monitor to read BSN monitor (access REG_BSN_MONITOR)
'
,
''
)
Cmd
[
'
BGDB
'
]
=
(
test_BG_to_DB
,
'
using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py)
'
,
'
(-
-sp
for addressing streams, -n1 for use pps)
'
)
Cmd
[
'
BGDB
'
]
=
(
test_BG_to_DB
,
'
using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py)
'
,
'
(-
r
for addressing streams, -n1 for use pps)
'
)
Cmd
[
'
BGs00100
'
]
=
(
write_BG_00100
,
'
set test BG pattern ...000000000010000000000...
'
,
'
(-
-sp
for addressing streams)
'
)
Cmd
[
'
BGs00100
'
]
=
(
write_BG_00100
,
'
set test BG pattern ...000000000010000000000...
'
,
'
(-
r
for addressing streams)
'
)
Cmd
[
'
BGsff7ff
'
]
=
(
write_BG_ff7ff
,
'
set test BG pattern ...ffffffffff7ffffffffff...
'
,
'
(-
-sp
for addressing streams)
'
)
Cmd
[
'
BGsff7ff
'
]
=
(
write_BG_ff7ff
,
'
set test BG pattern ...ffffffffff7ffffffffff...
'
,
'
(-
r
for addressing streams)
'
)
Cmd
[
'
BGsrand
'
]
=
(
write_BG_rand
,
'
set test BG pattern with pseudo random (seed=10)
'
,
'
(-
-sp
for addressing streams)
'
)
Cmd
[
'
BGsrand
'
]
=
(
write_BG_rand
,
'
set test BG pattern with pseudo random (seed=10)
'
,
'
(-
r
for addressing streams)
'
)
Cmd
[
'
BGscount
'
]
=
(
write_BG_count
,
'
set test BG pattern with counter data
'
,
'
(-
-sp
for addressing streams)
'
)
Cmd
[
'
BGscount
'
]
=
(
write_BG_count
,
'
set test BG pattern with counter data
'
,
'
(-
r
for addressing streams)
'
)
Cmd
[
'
sleep1
'
]
=
(
sleep
,
'
Sleep 1 second
'
,
''
)
Cmd
[
'
sleep1
'
]
=
(
sleep
,
'
Sleep 1 second
'
,
''
)
Cmd
[
'
sleep5
'
]
=
(
sleep
,
'
Sleep 5 seconds
'
,
''
)
Cmd
[
'
sleep5
'
]
=
(
sleep
,
'
Sleep 5 seconds
'
,
''
)
Cmd
[
'
example
'
]
=
(
show_help
,
'
show several example commands
'
,
''
)
Cmd
[
'
example
'
]
=
(
show_help
,
'
show several example commands
'
,
''
)
...
@@ -501,7 +505,7 @@ def help_text(tc,io,cmd):
...
@@ -501,7 +505,7 @@ def help_text(tc,io,cmd):
tc
.
append_log
(
0
,
'
[reset to factory] sequence: --seq WDI,REGMAP
'
)
tc
.
append_log
(
0
,
'
[reset to factory] sequence: --seq WDI,REGMAP
'
)
tc
.
append_log
(
0
,
'
[program user image] sequence: --seq FLASH -s file.rbf
'
)
tc
.
append_log
(
0
,
'
[program user image] sequence: --seq FLASH -s file.rbf
'
)
tc
.
append_log
(
0
,
'
[load user image] sequence: --seq REMU,REGMAP
'
)
tc
.
append_log
(
0
,
'
[load user image] sequence: --seq REMU,REGMAP
'
)
tc
.
append_log
(
0
,
'
[modelsim BG-DB test] arguments: --unb 0 --fn 0 --seq BGDB --sim -
-sp
0:2
'
)
tc
.
append_log
(
0
,
'
[modelsim BG-DB test] arguments: --unb 0 --fn 0 --seq BGDB --sim -
r
0:2
'
)
tc
.
append_log
(
0
,
'
\n
'
)
tc
.
append_log
(
0
,
'
\n
'
)
else
:
else
:
str
=
Cmd
[
cmd
][
1
]
str
=
Cmd
[
cmd
][
1
]
...
...
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