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
997fcbf0
Commit
997fcbf0
authored
10 years ago
by
Kenneth Hiemstra
Browse files
Options
Downloads
Patches
Plain Diff
fix for FAILED return status of REMU; added tests for tr_10GbE and
tr_xaui
parent
c94849b1
No related branches found
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
+52
-4
52 additions, 4 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
with
52 additions
and
4 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+
52
−
4
View file @
997fcbf0
...
@@ -57,13 +57,45 @@ import pi_wdi
...
@@ -57,13 +57,45 @@ import pi_wdi
import
pi_epcs
import
pi_epcs
import
pi_remu
import
pi_remu
import
pi_eth
import
pi_eth
import
pi_bsn_monitor
from
tools
import
*
from
tools
import
*
from
common
import
*
from
common
import
*
from
pi_common
import
*
def
test_tr_xaui
(
tc
,
io
):
tc
.
set_section_id
(
'
Read tr xaui status -
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> Access the REG_TR_XAUI peripheral (pi_tr_xaui.py)
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
''
)
from
pi_tr_xaui
import
*
on_execute
(
class_definition
=
PiTrXaui
,
regmap
=
REGMAP
)
def
test_tr_10GbE
(
tc
,
io
):
tc
.
set_section_id
(
'
Read tr 10GbE status -
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> Access the REG_TR_10GBE peripheral (pi_tr_10GbE.py)
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
''
)
from
pi_tr_10GbE
import
*
on_execute
(
class_definition
=
PiTr10GbE
,
regmap
=
REGMAP
)
def
test_bsn_mon
(
tc
,
io
):
tc
.
set_section_id
(
'
Read BSN monitor status -
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> Access the REG_BSN_MONITOR peripheral (pi_bsn_monitor.py)
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
Bsn
=
pi_bsn_monitor
.
PiBsnMonitor
(
tc
,
io
)
Bsn
.
read_bsn_monitor
()
tc
.
append_log
(
3
,
''
)
def
test_info
(
tc
,
io
):
def
test_info
(
tc
,
io
):
tc
.
set_section_id
(
'
Read System Info -
'
)
tc
.
set_section_id
(
'
Read System Info -
'
)
...
@@ -133,12 +165,19 @@ def test_remu(tc,io):
...
@@ -133,12 +165,19 @@ def test_remu(tc,io):
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> REMU (pi_remu.py)
'
)
tc
.
append_log
(
1
,
'
>>> REMU (pi_remu.py)
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
dummy_tc
=
test_case
.
Testcase
(
'
Dummy TB -
'
,
''
)
dummy_tc
.
set_result
(
'
PASSED
'
)
Remu
=
pi_remu
.
PiRemu
(
tc
,
io
)
Remu
=
pi_remu
.
PiRemu
(
dummy_
tc
,
io
)
try
:
try
:
Remu
.
write_user_reconfigure
()
Remu
.
write_user_reconfigure
()
except
:
except
:
pass
# ignoring FAILED
pass
# ignoring FAILED
if
dummy_tc
.
get_result
()
==
'
FAILED
'
:
tc
.
append_log
(
1
,
'
Result=%s but ignoring this
'
%
dummy_tc
.
get_result
())
tc
.
append_log
(
3
,
''
)
tc
.
append_log
(
3
,
''
)
...
@@ -176,6 +215,7 @@ def test_flash(tc,io):
...
@@ -176,6 +215,7 @@ def test_flash(tc,io):
def
sleep
(
tc
,
io
):
def
sleep
(
tc
,
io
):
tc
.
set_section_id
(
'
SLEEP -
'
)
tc
.
append_log
(
3
,
'
sleeping 1 second
'
)
tc
.
append_log
(
3
,
'
sleeping 1 second
'
)
tc
.
sleep
(
1.0
)
tc
.
sleep
(
1.0
)
...
@@ -194,17 +234,25 @@ Cmd = {
...
@@ -194,17 +234,25 @@ Cmd = {
5
:
(
'
FLASH
'
,
test_flash
,
'
using pi_epcs to program/verify flash
'
),
5
:
(
'
FLASH
'
,
test_flash
,
'
using pi_epcs to program/verify flash
'
),
6
:
(
'
REMU
'
,
test_remu
,
'
using pi_remu to load user image
'
),
6
:
(
'
REMU
'
,
test_remu
,
'
using pi_remu to load user image
'
),
7
:
(
'
ETH
'
,
test_eth
,
'
using pi_eth to read eth status
'
),
7
:
(
'
ETH
'
,
test_eth
,
'
using pi_eth to read eth 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
'
),
10
:
(
'
BSN
'
,
test_bsn_mon
,
'
using pi_bsn_monitor to read BSN monitor
'
),
100
:
(
'
HELP
'
,
show_help
,
'
show help on commands
'
)
100
:
(
'
HELP
'
,
show_help
,
'
show help on commands
'
)
}
}
def
help_text
(
tc
,
io
):
def
help_text
(
tc
,
io
):
tc
.
append_log
(
0
,
'
>>> Usage [--cmd <command number or series of numbers>]:
'
)
tc
.
append_log
(
0
,
'
>>> Usage [--cmd <command number or series of numbers>]:
'
)
for
cmd
in
sorted
(
Cmd
):
for
cmd
in
sorted
(
Cmd
):
tc
.
append_log
(
0
,
'
. %d : %s: %s
'
%
(
cmd
,
Cmd
[
cmd
][
0
],
Cmd
[
cmd
][
2
]))
tc
.
append_log
(
0
,
'
. %d : %s: %s
'
%
(
cmd
,
Cmd
[
cmd
][
0
],
Cmd
[
cmd
][
2
]))
tc
.
append_log
(
0
,
''
)
tc
.
append_log
(
0
,
''
)
tc
.
append_log
(
0
,
'
[full test] sequence: --cmd 1,4,0,0,0,0,1,5,6,0,0,0,1,2,3 -s file.rbf
'
)
tc
.
append_log
(
0
,
'
[full test] sequence: --cmd 1,4,0,0,0,0,1,0,5,6,0,0,0,0,1,2,3 -s file.rbf
'
)
tc
.
append_log
(
0
,
'
[image start and test] sequence: --cmd 1,4,0,0,0,0,1,6,0,0,0,1,2,3
'
)
tc
.
append_log
(
0
,
'
[image start and test] sequence: --cmd 1,4,0,0,0,0,1,6,0,0,0,0,1,2,3
'
)
tc
.
append_log
(
0
,
'
[read info,sensors] sequence: --cmd 1,2,3 --rep 10
'
)
tc
.
append_log
(
0
,
'
[re-read info,sensors] sequence: --cmd 1,2,3 --rep 10
'
)
tc
.
append_log
(
0
,
'
[reset to factory] sequence: --cmd 1,4,0,0,0,0,1
'
)
tc
.
append_log
(
0
,
'
[program user image] sequence: --cmd 5 -s file.rbf
'
)
tc
.
append_log
(
0
,
'
[load user image] sequence: --cmd 6,0,0,0,0,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