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
e34a2e28
Commit
e34a2e28
authored
10 years ago
by
Kenneth Hiemstra
Browse files
Options
Downloads
Patches
Plain Diff
cleaned up
parent
85920fe5
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
+19
-9
19 additions, 9 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
with
19 additions
and
9 deletions
boards/uniboard1/designs/unb1_test/tb/python/tc_unb1_test.py
+
19
−
9
View file @
e34a2e28
...
...
@@ -48,7 +48,6 @@ Description:
###############################################################################
# System imports
import
sys
import
numpy
as
np
import
test_case
import
node_io
import
pi_system_info
...
...
@@ -70,36 +69,47 @@ from pi_common import *
def
test_bg
(
tc
,
io
):
tc
.
set_section_id
(
'
Read
BG -
'
)
tc
.
set_section_id
(
'
Test
BG -
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> Access the
peripheral (pi_diag_block_gen.py)
'
)
tc
.
append_log
(
1
,
'
>>> Access the peripheral
s BG
(pi_diag_block_gen.py)
and DB (pi_diag_data_buffer.py)
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
ppsh
=
pi_ppsh
.
PiPpsh
(
tc
,
io
)
tc
.
set_section_id
(
'
Read -
'
)
nof_streams
=
3
Bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
nofChannels
=
nof_streams
,
ramSizePerChannel
=
1000
)
#
Bg.write_disable()
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()
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
)
ram
=
Bg
.
read_waveform_ram
(
channelNr
=
s
,
vLevel
=
5
)
lram
=
[]
for
r
in
ram
:
lram
.
append
(
list
(
r
))
# () -> []
bg_ram
.
append
(
lram
)
#print 'bg_ram=',bg_ram
#bg_ram[0][0]=0
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 'db_ram=',db_ram
print
'
compare=
'
,
not
False
in
(
np
.
asarray
(
bg_ram
)
==
np
.
asarray
(
db_ram
))
tc
.
set_section_id
(
'
Compare (BG==DB) -
'
)
compared
=
(
bg_ram
==
db_ram
)
tc
.
append_log
(
3
,
''
)
tc
.
append_log
(
1
,
'
>>> (BG==DB): %s
'
%
compared
)
tc
.
append_log
(
3
,
''
)
if
compared
==
False
:
tc
.
set_result
(
'
FAILED
'
)
def
test_tr_xaui
(
tc
,
io
):
tc
.
set_section_id
(
'
Read tr xaui status -
'
)
...
...
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