Skip to content
Snippets Groups Projects
Commit 78cff69e authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

-Plotting channels 0.

parent 4816a195
No related branches found
No related tags found
No related merge requests found
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment