Simulation files of Polyphase Filter in VHDL for FPGA.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

35 lignes
1.0KB

  1. LIBRARY ieee;
  2. USE ieee.std_logic_1164.ALL;
  3. USE ieee.numeric_std.ALL;
  4. USE work.POLY_FIR_PKG.ALL;
  5. ENTITY add_blk IS
  6. GENERIC(w_out : IN natural);
  7. PORT(i_clk : IN std_logic;
  8. i_data1 : IN smpl_adder_generic;
  9. i_data2 : IN smpl_adder_generic;
  10. o_data : OUT smpl_fir_adder_data_out
  11. );
  12. END add_blk;
  13. ARCHITECTURE add OF add_blk IS
  14. SIGNAL smpl_stages_out : smpl_adder_generic := (OTHERS => '0');
  15. BEGIN -- ARCHITECTURE add
  16. -- purpose: creates the add process for the adding tree
  17. -- type : sequential
  18. -- inputs : i_clk, i_data1, i_data2
  19. -- outputs: o_data
  20. adding_process : PROCESS (i_clk) IS
  21. BEGIN -- PROCESS adding_process
  22. IF rising_edge(i_clk) THEN -- rising clock edge
  23. smpl_stages_out(w_out DOWNTO 0) <= std_logic_vector(unsigned(signed(i_data1(w_out-1)&i_data1(w_out-1 DOWNTO 0))+signed(i_data2(w_out-1)&i_data2(w_out-1 DOWNTO 0))));
  24. END IF;
  25. END PROCESS adding_process;
  26. o_data <= smpl_stages_out;
  27. END ARCHITECTURE add;