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
7a70e024
Commit
7a70e024
authored
8 years ago
by
Priest
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parent
9623ddd4
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
applications/compaan/designs/compaan_unb1_10g_terminal_bg_db/tb/python/tc_compaan_unb1_10g_terminal_read_db.py
+53
-0
53 additions, 0 deletions
...l_bg_db/tb/python/tc_compaan_unb1_10g_terminal_read_db.py
with
53 additions
and
0 deletions
applications/compaan/designs/compaan_unb1_10g_terminal_bg_db/tb/python/tc_compaan_unb1_10g_terminal_read_db.py
0 → 100644
+
53
−
0
View file @
7a70e024
#! /usr/bin/env python
###############################################################################
#
# Copyright (dC) 2015
# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
###############################################################################
from
common
import
*
import
test_case
import
node_io
import
pi_diag_data_buffer
import
pi_eth
from
eth
import
*
# System definitions
c_data_w
=
32
# <= 32 for terminal
c_nof_streams
=
1
# Instantiate testcase and IO
tc
=
test_case
.
Testcase
(
'
TB -
'
,
''
)
io
=
node_io
.
NodeIO
(
tc
.
nodeImages
,
tc
.
base_ip
)
# Create databuffer instance (Back node 0 only)
db
=
pi_diag_data_buffer
.
PiDiagDataBuffer
(
tc
,
io
,
instanceName
=
''
,
nofStreams
=
c_nof_streams
,
ramSizePerStream
=
2048
,
nodeNr
=
tc
.
nodeFn0Nrs
)
################################################################################
##
## Read data from the databuffer
##
################################################################################
db_out
=
[]
do_until_ge
(
db
.
read_nof_words
,
ms_retry
=
1000
,
val
=
512
,
s_timeout
=
3600
)
bg
.
write_disable
()
for
i
in
range
(
1
):
db_out
.
append
(
flatten
(
db
.
read_data_buffer
(
streamNr
=
i
,
n
=
512
,
radix
=
'
uns
'
,
width
=
c_data_w
,
nofColumns
=
1
)))
print
db_out
\ No newline at end of file
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