From 70110ddb00be717801540f7a861f215c0ea91c49 Mon Sep 17 00:00:00 2001 From: Daniel van der Schuur <schuur@astron.nl> Date: Wed, 11 Feb 2015 12:25:42 +0000 Subject: [PATCH] -Added tc_apertif_unb1_correlator.py. --- .../tb/python/tc_apertif_unb1_correlator.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 applications/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator.py diff --git a/applications/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator.py b/applications/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator.py new file mode 100644 index 0000000000..a3d5fbd78b --- /dev/null +++ b/applications/apertif_unb1_correlator/tb/python/tc_apertif_unb1_correlator.py @@ -0,0 +1,23 @@ + +#from common import * +from common_dsp import * +from file_io import * + +REC_FILE = os.environ['RADIOHDL']+'/applications/apertif_unb1_correlator/tb/rec/correlator_src_out_arr0.rec' + +NOF_INPUTS = 12 +NOF_VISIBILITIES = (NOF_INPUTS*(NOF_INPUTS+1))/2 +CORRELATOR_INPUT_WIDTH=14 +CORRELATOR_INTEGRATION_PERIOD = 39 +CORRELATOR_MULT_OUTPUT_WIDTH = 2*CORRELATOR_INPUT_WIDTH +CORRELATOR_OUTPUT_COMPLEX_WIDTH = CORRELATOR_MULT_OUTPUT_WIDTH + ceil_log2(CORRELATOR_INTEGRATION_PERIOD) + +# Use gen_hex_files_composite_signals.py to generate HEX files with ONE channel +# . Check. + +# 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[1], NOF_VISIBILITIES) + -- GitLab