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
0fd04fdf
Commit
0fd04fdf
authored
10 years ago
by
Kenneth Hiemstra
Browse files
Options
Downloads
Patches
Plain Diff
added bg - db tests on loopback
parent
cae849ac
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+38
-2
38 additions, 2 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
with
38 additions
and
2 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+
38
−
2
View file @
0fd04fdf
...
@@ -48,6 +48,7 @@ Description:
...
@@ -48,6 +48,7 @@ Description:
###############################################################################
###############################################################################
# System imports
# System imports
import
sys
import
sys
import
numpy
as
np
import
test_case
import
test_case
import
node_io
import
node_io
import
pi_system_info
import
pi_system_info
...
@@ -58,6 +59,8 @@ import pi_epcs
...
@@ -58,6 +59,8 @@ import pi_epcs
import
pi_remu
import
pi_remu
import
pi_eth
import
pi_eth
import
pi_bsn_monitor
import
pi_bsn_monitor
import
pi_diag_block_gen
import
pi_diag_data_buffer
from
tools
import
*
from
tools
import
*
from
common
import
*
from
common
import
*
...
@@ -66,6 +69,38 @@ from pi_common import *
...
@@ -66,6 +69,38 @@ from pi_common import *
def
test_bg
(
tc
,
io
):
tc
.
set_section_id
(
'
Read BG -
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> Access the peripheral (pi_diag_block_gen.py)
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
ppsh
=
pi_ppsh
.
PiPpsh
(
tc
,
io
)
nof_streams
=
3
Bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
nofChannels
=
nof_streams
,
ramSizePerChannel
=
1000
)
#Bg.write_disable()
settings
=
Bg
.
read_block_gen_settings
()
samples_per_packet
=
settings
[
0
][
1
]
Bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
nofChannels
=
nof_streams
,
ramSizePerChannel
=
samples_per_packet
)
#Bg.write_enable() # or Bg.write_enable_pps()
ppsh
.
wait_until_pps
(
vLevel
=
6
)
bg_ram
=
[]
for
s
in
range
(
nof_streams
):
bg_ram
.
append
(
Bg
.
read_waveform_ram
(
channelNr
=
s
,
vLevel
=
5
))
print
'
bg_ram=
'
,
np
.
asarray
(
bg_ram
)
Db
=
pi_diag_data_buffer
.
PiDiagDataBuffer
(
tc
,
io
,
nofStreams
=
nof_streams
,
ramSizePerStream
=
samples_per_packet
)
db_ram
=
[]
for
s
in
range
(
nof_streams
):
db_ram
.
append
(
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
5
))
print
'
db_ram=
'
,
np
.
asarray
(
db_ram
)
print
'
compare=
'
,
not
False
in
(
np
.
asarray
(
bg_ram
)
==
np
.
asarray
(
db_ram
))
tc
.
append_log
(
3
,
''
)
def
test_tr_xaui
(
tc
,
io
):
def
test_tr_xaui
(
tc
,
io
):
tc
.
set_section_id
(
'
Read tr xaui status -
'
)
tc
.
set_section_id
(
'
Read tr xaui status -
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
...
@@ -73,7 +108,7 @@ def test_tr_xaui(tc, io):
...
@@ -73,7 +108,7 @@ def test_tr_xaui(tc, io):
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
''
)
tc
.
append_log
(
3
,
''
)
from
pi_tr_xaui
import
*
from
pi_tr_xaui
import
REGMAP
,
PiTrXaui
on_execute
(
class_definition
=
PiTrXaui
,
regmap
=
REGMAP
)
on_execute
(
class_definition
=
PiTrXaui
,
regmap
=
REGMAP
)
def
test_tr_10GbE
(
tc
,
io
):
def
test_tr_10GbE
(
tc
,
io
):
...
@@ -83,7 +118,7 @@ def test_tr_10GbE(tc, io):
...
@@ -83,7 +118,7 @@ def test_tr_10GbE(tc, io):
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
''
)
tc
.
append_log
(
3
,
''
)
from
pi_tr_10GbE
import
*
from
pi_tr_10GbE
import
REGMAP
,
PiTr10GbE
on_execute
(
class_definition
=
PiTr10GbE
,
regmap
=
REGMAP
)
on_execute
(
class_definition
=
PiTr10GbE
,
regmap
=
REGMAP
)
def
test_bsn_mon
(
tc
,
io
):
def
test_bsn_mon
(
tc
,
io
):
...
@@ -237,6 +272,7 @@ Cmd = {
...
@@ -237,6 +272,7 @@ Cmd = {
8
:
(
'
XAUI
'
,
test_tr_xaui
,
'
using pi_tr_xaui to read xaui status
'
),
8
:
(
'
XAUI
'
,
test_tr_xaui
,
'
using pi_tr_xaui to read xaui status
'
),
9
:
(
'
10GBE
'
,
test_tr_10GbE
,
'
using pi_tr_10GbE to read 10GbE status
'
),
9
:
(
'
10GBE
'
,
test_tr_10GbE
,
'
using pi_tr_10GbE to read 10GbE status
'
),
10
:
(
'
BSN
'
,
test_bsn_mon
,
'
using pi_bsn_monitor to read BSN monitor
'
),
10
:
(
'
BSN
'
,
test_bsn_mon
,
'
using pi_bsn_monitor to read BSN monitor
'
),
11
:
(
'
BG
'
,
test_bg
,
'
using pi_diag_block_gen.py to read BG
'
),
100
:
(
'
HELP
'
,
show_help
,
'
show help on commands
'
)
100
:
(
'
HELP
'
,
show_help
,
'
show help on commands
'
)
}
}
...
...
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