xcorr

class caf_verilog.xcorr.XCorr(ref, rec, ref_i_bits=12, ref_q_bits=0, rec_i_bits=12, rec_q_bits=0, pipeline=True, output_dir='.')[source]

Bases: CafVerilogBase

gen_quantized_output()[source]
Returns:

gen_submodules()[source]
gen_tb()[source]
params_dict() dict[source]
template_dict(inst_name=None)[source]
write_tb_values()[source]
write_xcorr_tb_module()[source]
async caf_verilog.xcorr.capture_test_output_data(dut, cycle_timeout=11) tuple[source]

This method will wait for signal s_axis_tvalid to become 1, and then return the out_max and index values.

caf_verilog.xcorr.dot_xcorr(ref, rec) list[source]

Perform the cross correlation using the dot product. This produces an output list of magnitudes that are inverse offset from the center of the reference signal.

Parameters:
  • ref

  • rec

Returns:

caf_verilog.xcorr.gen_tb_values(ref, rec)[source]

Reference and received vectors to be provided to the module. Copies the ref vector by the length of the ref vector. Received vector is shifted in by a positive offset each time.

async caf_verilog.xcorr.send_and_receive(dut, ref_vals: Iterable, rec_vals: Iterable, cycle_timeout=11) tuple[source]
Parameters:
  • dut – Design Under Test

  • ref_vals – List of reference values

  • rec_vals – List of received values

  • cycle_timeout – Number of clock cycles to wait for valid signal

async caf_verilog.xcorr.send_test_input_data(dut, x, y)[source]
caf_verilog.xcorr.simple_xcorr(f, g, nlags)[source]
Parameters:
  • f

  • g

  • nlags

Returns:

caf_verilog.xcorr.size_visualization(f, g, nlags)[source]