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
f7a59e4d
Commit
f7a59e4d
authored
Nov 12, 2014
by
Kenneth Hiemstra
Browse files
Options
Downloads
Patches
Plain Diff
extra
parent
747d3790
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
+44
-40
44 additions, 40 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
with
44 additions
and
40 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+
44
−
40
View file @
f7a59e4d
...
...
@@ -94,9 +94,11 @@ def test_BG_to_DB(tc,io,cmd,use_pps=False):
blocksize
=
pow
(
2
,
ceil_log2
(
samples_per_packet
+
gapsize
))
Bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
nofChannels
=
nof_streams
,
ramSizePerChannel
=
blocksize
)
#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
)
resetptrn
=
[
7
]
*
samples_per_packet
+
[
0
]
*
(
blocksize
-
samples_per_packet
)
Db
.
overwrite_all_data_buffers
(
resetptrn
,
vLevel
=
9
)
resetptrn
=
[
0xffffffff
]
*
samples_per_packet
+
[
0
]
*
(
blocksize
-
samples_per_packet
)
for
s
in
tc
.
spNrs
:
Db
.
overwrite_data_buffer
(
resetptrn
,
streamNr
=
s
,
vLevel
=
9
)
if
use_pps
==
True
:
Bg
.
write_enable_pps
()
...
...
@@ -104,15 +106,16 @@ def test_BG_to_DB(tc,io,cmd,use_pps=False):
else
:
Bg
.
write_enable
()
bg_ram
=
[]
for
s
in
range
(
nof_streams
)
:
for
s
in
tc
.
spNrs
:
ram
=
Bg
.
read_waveform_ram
(
channelNr
=
s
,
vLevel
=
5
)
rram
=
[]
for
r
in
ram
:
rram
.
append
(
list
(
r
))
# () -> []
bg_ram
.
append
(
rram
)
db_ram
=
[]
for
s
in
range
(
nof_streams
)
:
for
s
in
tc
.
spNrs
:
db_ram
.
append
(
Db
.
read_data_buffer
(
streamNr
=
s
,
vLevel
=
5
))
tc
.
set_section_id
(
'
Compare (BG==DB) -
'
)
...
...
@@ -122,6 +125,7 @@ def test_BG_to_DB(tc,io,cmd,use_pps=False):
tc
.
append_log
(
3
,
''
)
if
compared
==
False
:
tc
.
set_result
(
'
FAILED
'
)
show_compare_arrays
(
tc
,
bg_ram
,
db_ram
)
Bg
.
write_disable
()
def
test_BG_to_DB_pps
(
tc
,
io
,
cmd
):
return
test_BG_to_DB
(
tc
,
io
,
cmd
,
use_pps
=
True
)
...
...
@@ -170,13 +174,11 @@ def test_info(tc,io,cmd):
tc
.
append_log
(
1
,
'
>>> %s
'
%
help_text
(
tc
,
io
,
cmd
))
tc
.
append_log
(
3
,
'
>>>
'
)
info
=
pi_system_info
.
PiSystemInfo
(
tc
,
io
)
with
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
as
temp_io
:
info
=
pi_system_info
.
PiSystemInfo
(
tc
,
temp_io
)
tc
.
append_log
(
1
,
'
>>> reading REGMAPs
'
)
info
.
make_register_info
()
tc
.
append_log
(
3
,
''
)
#info.read_reg_map()
#tc.append_log(3, '')
info
.
read_system_info
()
tc
.
append_log
(
3
,
''
)
info
.
read_use_phy
()
...
...
@@ -250,9 +252,10 @@ def test_remu(tc,io,cmd):
tc
.
append_log
(
3
,
'
>>>
'
)
dummy_tc
=
test_case
.
Testcase
(
'
Dummy TB -
'
,
''
)
with
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
as
temp_io
:
dummy_tc
.
set_result
(
'
PASSED
'
)
Remu
=
pi_remu
.
PiRemu
(
dummy_tc
,
io
)
Remu
=
pi_remu
.
PiRemu
(
dummy_tc
,
temp_
io
)
try
:
Remu
.
write_user_reconfigure
()
except
:
...
...
@@ -261,6 +264,7 @@ def test_remu(tc,io,cmd):
if
dummy_tc
.
get_result
()
==
'
FAILED
'
:
tc
.
append_log
(
1
,
'
Result=%s but ignoring this
'
%
dummy_tc
.
get_result
())
del
dummy_tc
tc
.
append_log
(
3
,
''
)
...
...
@@ -331,8 +335,8 @@ Cmd = {
10
:
(
'
XAUI
'
,
test_tr_xaui
,
'
using pi_tr_xaui to read xaui status (access REG_TR_XAUI)
'
,
''
),
11
:
(
'
10GBE
'
,
test_tr_10GbE
,
'
using pi_tr_10GbE to read 10GbE status (access REG_TR_10GBE)
'
,
''
),
12
:
(
'
BSN
'
,
test_bsn_mon
,
'
using pi_bsn_monitor to read BSN monitor (access REG_BSN_MONITOR)
'
,
''
),
13
:
(
'
BGDB
'
,
test_BG_to_DB
,
'
using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py)
'
,
''
),
14
:
(
'
BGDBpps
'
,
test_BG_to_DB_pps
,
'
using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py) using PPS
'
,
''
),
13
:
(
'
BGDB
'
,
test_BG_to_DB
,
'
using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py)
'
,
'
(--sp for addressing streams)
'
),
14
:
(
'
BGDBpps
'
,
test_BG_to_DB_pps
,
'
using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py) using PPS
'
,
'
(--sp for addressing streams)
'
),
15
:
(
'
EXAMPLE
'
,
show_example
,
'
show several example 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