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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
ec1d10b5
Commit
ec1d10b5
authored
10 years ago
by
Kenneth Hiemstra
Browse files
Options
Downloads
Patches
Plain Diff
extra
parent
081ccb5f
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
+28
-21
28 additions, 21 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
with
28 additions
and
21 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+
28
−
21
View file @
ec1d10b5
...
...
@@ -102,7 +102,7 @@ def test_BG_to_DB(tc,io,cmd,use_pps=False):
db_ram
=
[]
for
s
in
tc
.
spNrs
:
db_ram
.
append
(
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
5
))
db_ram
.
append
(
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
9
))
if
use_pps
==
True
:
Bg
.
write_enable_pps
()
...
...
@@ -190,11 +190,7 @@ def test_info(tc,io,cmd):
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
3
,
'
>>>
'
)
#with node_io.NodeIO(tc.nodeImages, tc.base_ip) as temp_io:
info
=
pi_system_info
.
PiSystemInfo
(
tc
,
io
)
tc
.
append_log
(
1
,
'
>>> reading REGMAPs
'
)
info
.
make_register_info
()
tc
.
append_log
(
3
,
''
)
info
.
read_system_info
()
tc
.
append_log
(
3
,
''
)
info
.
read_use_phy
()
...
...
@@ -207,13 +203,23 @@ def test_info(tc,io,cmd):
info
.
read_design_note
()
expected_design_name
=
tc
.
gpString
if
cmd
==
3
and
expected_design_name
!=
''
:
tc
.
set_section_id
(
'
Verify System Info -
'
)
tc
.
append_log
(
1
,
'
>>> Verifying design_name == %s
'
%
expected_design_name
)
for
name
in
design_name
:
if
(
name
!=
expected_design_name
):
tc
.
set_result
(
'
FAILED
'
)
tc
.
append_log
(
2
,
'
>>> design_name mismatch!! (%s != %s)
'
%
(
name
,
expected_design_name
))
if
expected_design_name
!=
''
:
tc
.
set_section_id
(
'
Verify System Info -
'
)
tc
.
append_log
(
1
,
'
>>> Verifying design_name == %s
'
%
expected_design_name
)
for
name
in
design_name
:
if
(
name
!=
expected_design_name
):
tc
.
set_result
(
'
FAILED
'
)
tc
.
append_log
(
2
,
'
>>> design_name mismatch!! (%s != %s)
'
%
(
name
,
expected_design_name
))
def
read_regmap
(
tc
,
io
,
cmd
):
tc
.
set_section_id
(
'
Update REGMAP -
'
)
info
=
pi_system_info
.
PiSystemInfo
(
tc
,
io
)
tc
.
append_log
(
1
,
'
>>> reading REGMAPs
'
)
info
.
make_register_info
()
tc
.
append_log
(
1
,
'
>>> reload NodeIO class
'
)
return
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
...
...
@@ -270,15 +276,14 @@ def test_remu(tc,io,cmd):
dummy_tc
=
test_case
.
Testcase
(
'
Dummy TB -
'
,
''
)
dummy_tc
.
set_result
(
'
PASSED
'
)
#with pi_remu.PiRemu(dummy_tc, io) as Remu:
Remu
=
pi_remu
.
PiRemu
(
dummy_tc
,
io
)
try
:
Remu
.
write_user_reconfigure
()
Remu
.
write_user_reconfigure
()
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
(
1
,
'
Result=%s but ignoring this
'
%
dummy_tc
.
get_result
())
tc
.
append_log
(
3
,
''
)
...
...
@@ -339,8 +344,8 @@ def show_example(tc,io,cmd):
Cmd
=
{
0
:
(
'
SLEEP1
'
,
sleep
,
'
Sleep 1 second
'
,
''
),
1
:
(
'
SLEEP5
'
,
sleep
,
'
Sleep 5 seconds
'
,
''
),
2
:
(
'
INFO
'
,
test_info
,
'
using pi_system_info to read
sy
ste
m
info (access PIO_SYSTEM_INFO)
'
,
''
),
3
:
(
'
INFO
+
'
,
test_info
,
'
using pi_system_info to read system info (access PIO_SYSTEM_INFO)
'
,
'
(-s for expected design_name)
'
),
2
:
(
'
REGMAP
'
,
read_regmap
,
'
using pi_system_info to read
regi
ste
r
info (access PIO_SYSTEM_INFO)
and store REGMAPs
'
,
''
),
3
:
(
'
INFO
'
,
test_info
,
'
using pi_system_info to read system info (access PIO_SYSTEM_INFO)
'
,
'
(-s for expected design_name)
'
),
4
:
(
'
FLASH
'
,
test_flash
,
'
using pi_epcs to program/verify flash
'
,
'
(-s for .rbf file)
'
),
5
:
(
'
SENSORS
'
,
test_sensors
,
'
using pi_unb_sens to readout sensors (access REG_UNB_SENS)
'
,
''
),
6
:
(
'
PPSH
'
,
test_ppsh
,
'
using pi_ppsh to read PPSH capture count (access PIO_PPS)
'
,
''
),
...
...
@@ -395,7 +400,7 @@ tc.append_log(3, '>>>')
# Create access object for nodes
#
io = node_io.NodeIO(tc.nodeImages, tc.base_ip)
io
=
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
...
...
@@ -411,8 +416,10 @@ while rep < tc.repeat:
if
cmd
>
len
(
Cmd
):
cmd
=
100
# default to help_text
tc
.
append_log
(
3
,
'
Next command: %d : %s: %s
'
%
(
cmd
,
Cmd
[
cmd
][
0
],
Cmd
[
cmd
][
2
]))
with
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
as
temp_io
:
Cmd
[
cmd
][
1
](
tc
,
temp_io
,
cmd
)
if
cmd
==
2
:
# reload node_io:
io
=
Cmd
[
cmd
][
1
](
tc
,
io
,
cmd
)
else
:
Cmd
[
cmd
][
1
](
tc
,
io
,
cmd
)
...
...
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