VHDL implementation of a polyphase filter bank with polyphase filter and 5ndft
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
497B

  1. function write_polyfir_coeffs(file, coeffs)
  2. coeff_format = 'library ieee;\nUSE ieee.std_logic_1164.all;\nUSE work.POLY_FIR_PKG.all;\npackage coeff_fir is\n CONSTANT fir_coeffs_generated : vect_polyfir_coeffs_in := (';
  3. for i=1:(length(coeffs)-1)
  4. coeff_format = strcat(coeff_format,'X"%02x", ');
  5. end
  6. coeff_format = strcat(coeff_format,'X"%02x");\nend package coeff_fir;');
  7. fcoeff = fopen(file,'w');
  8. fprintf(fcoeff,coeff_format,typecast(int8(coeffs),'uint8'));
  9. fclose(fcoeff);
  10. end