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
78cff69e
Commit
78cff69e
authored
10 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Plotting channels 0.
parent
4816a195
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
applications/apertif/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator.py
+20
-26
20 additions, 26 deletions
...f_unb1_correlator/tb/python/tc_apertif_unb1_correlator.py
with
20 additions
and
26 deletions
applications/apertif/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator.py
+
20
−
26
View file @
78cff69e
...
...
@@ -18,29 +18,23 @@ CORRELATOR_OUTPUT_COMPLEX_WIDTH = CORRELATOR_MULT_OUTPUT_WIDTH + ceil_log2(CORRE
# Use gen_hex_files_composite_signals.py to generate HEX files with ONE channel
# . Check.
## Wait until file exists
#do_until(file_exists, True, s_timeout=900, filename=REC_FILE)
#
#if USE_NEW_REC_FILE==True:
# # Wait until file is modified
# print 'Waiting for %s to be modified...' %REC_FILE
# now = time.time()
# do_until_gt(file_mod_time, now, s_timeout=900, filename=REC_FILE)
# print '%s modified. Waiting for %d lines to be written...' %(REC_FILE, NOF_LINES_IN_REC_FILE_TO_VERIFY)
# do_until_gt(file_linecount, NOF_LINES_IN_REC_FILE_TO_VERIFY, s_timeout=900, filename=REC_FILE)
#
## Read test bench output file written by dp_stream_rec_play.vhd
#correlator_src_out_arr = rec_file_to_complex(REC_FILE, complex_width=CORRELATOR_OUTPUT_COMPLEX_WIDTH)
#
## Plot the phase shifts
#plot_phase_shifts(correlator_src_out_arr[32], NOF_VISIBILITIES)
#
# Repeat, but this time use WPFB record file and correlator model
REC_FILE
=
os
.
environ
[
'
RADIOHDL
'
]
+
'
/applications/apertif/apertif_unb1_correlator/tb/rec/wpfb_src_out_arr0.rec
'
WPFB_OUT_DATA_WIDTH
=
14
complex_list
=
rec_file_to_complex
(
REC_FILE
,
complex_width
=
WPFB_OUT_DATA_WIDTH
)
print
complex_list
[
0
]
# Wait until file exists
do_until
(
file_exists
,
True
,
s_timeout
=
900
,
filename
=
REC_FILE
)
if
USE_NEW_REC_FILE
==
True
:
# Wait until file is modified
print
'
Waiting for %s to be modified...
'
%
REC_FILE
now
=
time
.
time
()
do_until_gt
(
file_mod_time
,
now
,
s_timeout
=
900
,
filename
=
REC_FILE
)
print
'
%s modified. Waiting for %d lines to be written...
'
%
(
REC_FILE
,
NOF_LINES_IN_REC_FILE_TO_VERIFY
)
do_until_gt
(
file_linecount
,
NOF_LINES_IN_REC_FILE_TO_VERIFY
,
s_timeout
=
900
,
filename
=
REC_FILE
)
# Read test bench output file written by dp_stream_rec_play.vhd
correlator_src_out_arr
=
rec_file_to_complex
(
REC_FILE
,
complex_width
=
CORRELATOR_OUTPUT_COMPLEX_WIDTH
)
# Plot the phase shifts
for
i
in
range
(
1000
):
print
i
plot_phase_shifts
(
correlator_src_out_arr
[
i
*
64
],
NOF_VISIBILITIES
)
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