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
4c49c0e9
Commit
4c49c0e9
authored
9 years ago
by
Pepping
Browse files
Options
Downloads
Patches
Plain Diff
Added databuffer
parent
a0cbc066
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_terminal_bg_mesh_db/tb/python/tc_unb1_board_bg_mesh_db.py
+18
-14
18 additions, 14 deletions
...terminal_bg_mesh_db/tb/python/tc_unb1_board_bg_mesh_db.py
with
18 additions
and
14 deletions
boards/uniboard1/designs/unb1_terminal_bg_mesh_db/tb/python/tc_unb1_board_bg_mesh_db.py
+
18
−
14
View file @
4c49c0e9
...
@@ -64,6 +64,7 @@ tc = test_case.Testcase('TB - ', '')
...
@@ -64,6 +64,7 @@ tc = test_case.Testcase('TB - ', '')
g_nof_input_streams
=
12
# 16
g_nof_input_streams
=
12
# 16
g_blocks_per_sync
=
800000
#32 # 781250
g_blocks_per_sync
=
800000
#32 # 781250
if
tc
.
sim
==
True
:
if
tc
.
sim
==
True
:
g_blocks_per_sync
=
16
# 781250
g_blocks_per_sync
=
16
# 781250
...
@@ -71,6 +72,8 @@ if tc.sim == True:
...
@@ -71,6 +72,8 @@ if tc.sim == True:
# Define settings for the block generator
# Define settings for the block generator
c_bg_nof_streams
=
g_nof_input_streams
c_bg_nof_streams
=
g_nof_input_streams
c_bg_ram_size
=
128
c_bg_ram_size
=
128
c_db_nof_streams
=
g_nof_input_streams
c_db_ram_size
=
c_bg_ram_size
c_samples_per_packet
=
128
c_samples_per_packet
=
128
c_gapsize
=
64
c_gapsize
=
64
c_mem_low_addr
=
0
c_mem_low_addr
=
0
...
@@ -79,7 +82,7 @@ c_bsn_init = 42
...
@@ -79,7 +82,7 @@ c_bsn_init = 42
c_in_dat_w
=
16
c_in_dat_w
=
16
c_write_bg_data
=
False
c_write_bg_data
=
False
c_write_bg_data_to_file
=
Fals
e
c_write_bg_data_to_file
=
Tru
e
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
1
,
'
>>> Title : Test script for unb1_board_bg_mesh_db
'
)
tc
.
append_log
(
1
,
'
>>> Title : Test script for unb1_board_bg_mesh_db
'
)
...
@@ -93,8 +96,8 @@ io = node_io.NodeIO(tc.nodeImages, tc.base_ip)
...
@@ -93,8 +96,8 @@ io = node_io.NodeIO(tc.nodeImages, tc.base_ip)
# Create block generator instance
# Create block generator instance
bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
g_nof_input_streams
,
c_bg_ram_size
)
bg
=
pi_diag_block_gen
.
PiDiagBlockGen
(
tc
,
io
,
g_nof_input_streams
,
c_bg_ram_size
)
#
BSN monitor
#
Create databuffer instances
bsn_out
=
pi_bsn_monitor
.
PiBsnMonito
r
(
tc
,
io
,
instanceName
=
''
,
nofStreams
=
g
_nof_
input_
streams
)
db
=
pi_diag_data_buffer
.
PiDiagDataBuffe
r
(
tc
,
io
,
instanceName
=
''
,
nofStreams
=
c_db
_nof_streams
,
ramSizePerStream
=
c_db_ram_size
)
# Create dsp_test instance for helpful methods
# Create dsp_test instance for helpful methods
dsp_test_bg
=
dsp_test
.
DspTest
(
inDatW
=
c_in_dat_w
)
dsp_test_bg
=
dsp_test
.
DspTest
(
inDatW
=
c_in_dat_w
)
...
@@ -103,9 +106,6 @@ pps = pi_ppsh.PiPpsh(tc, io, nodeNr=tc.nodeFnNrs)
...
@@ -103,9 +106,6 @@ pps = pi_ppsh.PiPpsh(tc, io, nodeNr=tc.nodeFnNrs)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
bsn_out
.
read_bsn_monitor
(
0
)
bsn_out
.
read_bsn_monitor
(
1
)
################################################################################
################################################################################
##
##
## Initialize the blockgenerators
## Initialize the blockgenerators
...
@@ -124,7 +124,6 @@ if __name__ == "__main__":
...
@@ -124,7 +124,6 @@ if __name__ == "__main__":
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
inputData
=
[]
inputData
=
[]
dataList
=
[]
dataList
=
[]
for
i
in
xrange
(
0
,
g_nof_input_streams
):
for
i
in
xrange
(
0
,
g_nof_input_streams
):
data
=
[]
data
=
[]
...
@@ -145,18 +144,23 @@ if __name__ == "__main__":
...
@@ -145,18 +144,23 @@ if __name__ == "__main__":
# - Enable the block generator
# - Enable the block generator
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
Arm
the block generator
'
)
tc
.
append_log
(
3
,
'
>>>
Start
the block generator
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
'
>>>
'
)
tc
.
append_log
(
3
,
''
)
tc
.
append_log
(
3
,
''
)
# toggle = pps.read_ppsh_toggle()
# do_until_ne(pps.read_ppsh_toggle, ms_retry=1000, val=toggle, s_timeout=13600)
bg
.
write_enable
()
bg
.
write_enable
()
bsn_out
.
read_bsn_monitor
(
0
)
do_until_ge
(
db
.
read_nof_words
,
ms_retry
=
3000
,
val
=
c_db_ram_size
,
s_timeout
=
3600
)
bsn_out
.
read_bsn_monitor
(
1
)
###############################################################################
#
# Read data from data buffer
#
###############################################################################
db_out
=
[]
for
i
in
range
(
c_bg_nof_streams
):
db_out
.
append
(
flatten
(
db_re
.
read_data_buffer
(
streamNr
=
i
,
n
=
c_db_ram_size
,
radix
=
'
uns
'
,
width
=
c_in_dat_w
,
nofColumns
=
8
)))
###############################################################################
###############################################################################
# End
# End
tc
.
set_section_id
(
''
)
tc
.
set_section_id
(
''
)
...
...
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