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
615926ad
Commit
615926ad
authored
10 years ago
by
Kenneth Hiemstra
Browse files
Options
Downloads
Patches
Plain Diff
added BG overwrite functions
parent
5875926d
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
+25
-6
25 additions, 6 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
with
25 additions
and
6 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+
25
−
6
View file @
615926ad
...
...
@@ -49,6 +49,7 @@ Description:
# System imports
import
sys
import
signal
import
random
import
test_case
import
node_io
import
pi_system_info
...
...
@@ -190,8 +191,7 @@ def write_BG(tc,io,buf):
for
s
in
tc
.
spNrs
:
Bg
.
write_waveform_ram
(
buf
,
channelNr
=
s
)
def
write_BG_0
(
tc
,
io
,
cmd
):
def
write_BG_00100
(
tc
,
io
,
cmd
):
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
3
,
'
>>>
'
)
...
...
@@ -200,8 +200,7 @@ def write_BG_0(tc,io,cmd):
ptrn
[
blocksize
/
2
]
=
1
write_BG
(
tc
,
io
,
ptrn
)
def
write_BG_f
(
tc
,
io
,
cmd
):
def
write_BG_ff7ff
(
tc
,
io
,
cmd
):
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
3
,
'
>>>
'
)
...
...
@@ -210,6 +209,22 @@ def write_BG_f(tc,io,cmd):
ptrn
[
blocksize
/
2
]
=
0xffff7fff
write_BG
(
tc
,
io
,
ptrn
)
def
write_BG_rand
(
tc
,
io
,
cmd
):
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
3
,
'
>>>
'
)
blocksize
=
get_BG_blocksize
(
tc
,
io
)
random
.
seed
(
10
)
ptrn
=
[
random
.
randint
(
0
,
0xffffffff
)
for
r
in
range
(
blocksize
)]
write_BG
(
tc
,
io
,
ptrn
)
def
write_BG_count
(
tc
,
io
,
cmd
):
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
3
,
'
>>>
'
)
blocksize
=
get_BG_blocksize
(
tc
,
io
)
ptrn
=
range
(
blocksize
)
write_BG
(
tc
,
io
,
ptrn
)
def
test_tr_xaui
(
tc
,
io
,
cmd
):
...
...
@@ -447,8 +462,10 @@ Cmd['XAUI'] = (test_tr_xaui, 'using pi_tr_xaui to read xaui status (access RE
Cmd
[
'
10GBE
'
]
=
(
test_tr_10GbE
,
'
using pi_tr_10GbE to read 10GbE status (access REG_TR_10GBE)
'
,
'
(-n1 for set maxframesize to jumbo)
'
)
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
[
'
BG0
'
]
=
(
write_BG_0
,
'
write test BG pattern ...000000000010000000000...
'
,
'
(--sp for addressing streams)
'
)
Cmd
[
'
BGf
'
]
=
(
write_BG_f
,
'
write test BG pattern ...ffffffffff7ffffffffff...
'
,
'
(--sp for addressing streams)
'
)
Cmd
[
'
BGs00100
'
]
=
(
write_BG_00100
,
'
set test BG pattern ...000000000010000000000...
'
,
'
(--sp for addressing streams)
'
)
Cmd
[
'
BGsff7ff
'
]
=
(
write_BG_ff7ff
,
'
set test BG pattern ...ffffffffff7ffffffffff...
'
,
'
(--sp for addressing streams)
'
)
Cmd
[
'
BGsrand
'
]
=
(
write_BG_rand
,
'
set test BG pattern with pseudo random (seed=10)
'
,
'
(--sp for addressing streams)
'
)
Cmd
[
'
BGscount
'
]
=
(
write_BG_count
,
'
set test BG pattern with counter data
'
,
'
(--sp for addressing streams)
'
)
Cmd
[
'
sleep1
'
]
=
(
sleep
,
'
Sleep 1 second
'
,
''
)
Cmd
[
'
sleep5
'
]
=
(
sleep
,
'
Sleep 5 seconds
'
,
''
)
Cmd
[
'
example
'
]
=
(
show_help
,
'
show several example commands
'
,
''
)
...
...
@@ -465,8 +482,10 @@ def help_text(tc,io,cmd):
tc
.
append_log
(
0
,
'
<nodes>: use: --unb N --fn N --bn N (N is a number or vector) or:
'
)
tc
.
append_log
(
0
,
'
<nodes>: use: --gn N (N is a number or vector)
'
)
tc
.
append_log
(
0
,
'
<command sequence>: use: --seq <command(s) separated by
"
,
"
>:
'
)
tc
.
append_log
(
0
,
''
)
for
cmd
in
sorted
(
Cmd
):
tc
.
append_log
(
0
,
'
. %s
\t
%s %s
'
%
(
cmd
,
Cmd
[
cmd
][
1
],
Cmd
[
cmd
][
2
]))
tc
.
append_log
(
0
,
''
)
tc
.
append_log
(
0
,
'
[-vN]: verbose level N (default=5): %s
'
%
tc
.
verbose_levels
())
tc
.
append_log
(
0
,
'
[--rep N]: N=number of repeats, where -1 is forever, non-stop
'
)
help_text
(
tc
,
io
,
'
example
'
)
...
...
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