OpenCores
URL https://opencores.org/ocsvn/astron_statistics/astron_statistics/trunk

Subversion Repositories astron_statistics

[/] [astron_statistics/] [trunk/] [st_calc.vhd] - Diff between revs 3 and 4

Show entire file | Details | Blame | View Log

Rev 3 Rev 4
Line 16... Line 16...
-- See the License for the specific language governing permissions and
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- limitations under the License.
--
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
 
 
LIBRARY IEEE, common_pkg_lib, common_ram_lib, common_mult_lib, technology_lib;
LIBRARY IEEE, common_pkg_lib, astron_ram_lib, astron_multiplier_lib;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_1164.ALL;
USE technology_lib.technology_select_pkg.ALL;
--USE technology_lib.technology_select_pkg.ALL;
USE common_pkg_lib.common_pkg.ALL;
USE common_pkg_lib.common_pkg.ALL;
USE common_ram_lib.common_ram_pkg.ALL;
USE astron_ram_lib.common_ram_pkg.ALL;
 
 
-- Purpose:
-- Purpose:
--   Maintain a set of accumulators and output their values at every in_sync.
--   Maintain a set of accumulators and output their values at every in_sync.
-- Description:
-- Description:
-- . The products of two input streams are accumulated per block. The block
-- . The products of two input streams are accumulated per block. The block
Line 50... Line 50...
--   out_val_m strobes that can be used as wr_en to the corresponding statistics
--   out_val_m strobes that can be used as wr_en to the corresponding statistics
--   output register in a range of g_nof_mux statistics output registers.
--   output register in a range of g_nof_mux statistics output registers.
 
 
ENTITY st_calc IS
ENTITY st_calc IS
  GENERIC (
  GENERIC (
    g_technology   : NATURAL := c_tech_select_default;
    g_technology   : NATURAL := 0;
    g_nof_mux      : NATURAL := 1;
    g_nof_mux      : NATURAL := 1;
    g_nof_stat     : NATURAL := 512;
    g_nof_stat     : NATURAL := 512;
    g_in_dat_w     : NATURAL := 18;  -- = input data width
    g_in_dat_w     : NATURAL := 18;  -- = input data width
    g_out_dat_w    : NATURAL := 54;  -- = accumulator width for the input data products, so >> 2*g_in_dat_w
    g_out_dat_w    : NATURAL := 54;  -- = accumulator width for the input data products, so >> 2*g_in_dat_w
    g_out_adr_w    : NATURAL := 9;   -- = ceil_log2(g_nof_stat)
    g_out_adr_w    : NATURAL := 9;   -- = ceil_log2(g_nof_stat)
Line 187... Line 187...
 
 
  out_adr <= out_adr_m(c_adr_w-1 DOWNTO c_mux_w);
  out_adr <= out_adr_m(c_adr_w-1 DOWNTO c_mux_w);
 
 
  -- complex multiplier: computes a * conj(b)
  -- complex multiplier: computes a * conj(b)
  --mul: ENTITY common_lib.common_complex_mult(str)
  --mul: ENTITY common_lib.common_complex_mult(str)
  mul: ENTITY common_mult_lib.common_complex_mult
  mul: ENTITY astron_multiplier_lib.common_complex_mult
  GENERIC MAP (
  GENERIC MAP (
    g_technology       => g_technology,
    g_technology       => g_technology,
    g_variant          => "IP",
    g_variant          => "IP",
    g_in_a_w           => in_ar'LENGTH,
    g_in_a_w           => in_ar'LENGTH,
    g_in_b_w           => in_br'LENGTH,
    g_in_b_w           => in_br'LENGTH,
Line 230... Line 230...
    in_acc      => rd_re,
    in_acc      => rd_re,
    out_acc     => wr_re
    out_acc     => wr_re
  );
  );
 
 
  -- accumulator memory for real part  
  -- accumulator memory for real part  
  ram_re: ENTITY common_ram_lib.common_ram_r_w
  ram_re: ENTITY astron_ram_lib.common_ram_r_w
  GENERIC MAP (
  GENERIC MAP (
    g_technology => g_technology,
    g_technology => g_technology,
    g_ram        => c_mem_acc,
    g_ram        => c_mem_acc,
    g_init_file  => "UNUSED"
    g_init_file  => "UNUSED"
  )
  )
Line 276... Line 276...
      in_acc      => rd_im,
      in_acc      => rd_im,
      out_acc     => wr_im
      out_acc     => wr_im
    );
    );
 
 
    -- dual port memory
    -- dual port memory
    ram_im: ENTITY common_ram_lib.common_ram_r_w
    ram_im: ENTITY astron_ram_lib.common_ram_r_w
    GENERIC MAP (
    GENERIC MAP (
      g_technology => g_technology,
      g_technology => g_technology,
      g_ram        => c_mem_acc,
      g_ram        => c_mem_acc,
      g_init_file  => "UNUSED"
      g_init_file  => "UNUSED"
    )
    )

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.