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

Subversion Repositories astron_diagnostics

[/] [astron_diagnostics/] [trunk/] [diag_data_buffer.vhd] - Diff between revs 3 and 4

Show entire file | Details | Blame | View Log

Rev 3 Rev 4
Line 40... Line 40...
--   require two RAM blocks. For g_data_w=2*c_word_w=64b there is no
--   require two RAM blocks. For g_data_w=2*c_word_w=64b there is no
--   difference between these 2 schemes. Hence by rising the g_data_w to a
--   difference between these 2 schemes. Hence by rising the g_data_w to a
--   power of 2 multiple of 32b the user can enforce using splitting the data
--   power of 2 multiple of 32b the user can enforce using splitting the data
--   a c_word_w parts.
--   a c_word_w parts.
 
 
LIBRARY IEEE, common_pkg_lib, mm_lib, technology_lib, common_ram_lib, common_counter_lib, common_components_lib;
LIBRARY IEEE, common_pkg_lib, astron_mm_lib, astron_ram_lib, astron_counter_lib, common_components_lib;
USE IEEE.std_logic_1164.ALL;
USE IEEE.std_logic_1164.ALL;
USE IEEE.numeric_std.ALL;
USE IEEE.numeric_std.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;
USE work.diag_pkg.ALL;
USE work.diag_pkg.ALL;
USE technology_lib.technology_select_pkg.ALL;
--USE technology_lib.technology_select_pkg.ALL;
 
 
ENTITY diag_data_buffer IS
ENTITY diag_data_buffer IS
  GENERIC (
  GENERIC (
    g_technology  : NATURAL := c_tech_select_default;
    g_technology  : NATURAL := 0;
    g_data_w      : NATURAL := 32;
    g_data_w      : NATURAL := 32;
    g_nof_data    : NATURAL := 1024;
    g_nof_data    : NATURAL := 1024;
    g_use_in_sync : BOOLEAN := FALSE   -- when TRUE start filling the buffer at the in_sync, else after the last word was read
    g_use_in_sync : BOOLEAN := FALSE   -- when TRUE start filling the buffer at the in_sync, else after the last word was read
  );
  );
  PORT (
  PORT (
Line 188... Line 188...
        nxt_wr_addr <= INCR_UVEC(wr_addr, 1);
        nxt_wr_addr <= INCR_UVEC(wr_addr, 1);
      END IF;
      END IF;
    END IF;
    END IF;
  END PROCESS;
  END PROCESS;
 
 
  u_buf : ENTITY common_ram_lib.common_ram_crw_crw_ratio
  u_buf : ENTITY astron_ram_lib.common_ram_crw_crw_ratio
  GENERIC MAP (
  GENERIC MAP (
    g_technology => g_technology,
    g_technology => g_technology,
    g_ram_a     => c_buf_mm,
    g_ram_a     => c_buf_mm,
    g_ram_b     => c_buf_st,
    g_ram_b     => c_buf_st,
    g_init_file => "UNUSED"
    g_init_file => "UNUSED"
Line 217... Line 217...
    rd_en_b   => '0',
    rd_en_b   => '0',
    rd_dat_b  => OPEN,
    rd_dat_b  => OPEN,
    rd_val_b  => OPEN
    rd_val_b  => OPEN
  );
  );
 
 
  u_reg : ENTITY mm_lib.common_reg_r_w_dc
  u_reg : ENTITY astron_mm_lib.common_reg_r_w_dc
  GENERIC MAP (
  GENERIC MAP (
    g_reg       => c_reg
    g_reg       => c_reg
  )
  )
  PORT MAP (
  PORT MAP (
    -- Clocks and reset
    -- Clocks and reset
Line 241... Line 241...
    out_reg     => OPEN
    out_reg     => OPEN
  );
  );
 
 
  reg_slv <= word_cnt & sync_cnt;
  reg_slv <= word_cnt & sync_cnt;
 
 
  u_word_cnt : ENTITY common_counter_lib.common_counter
  u_word_cnt : ENTITY astron_counter_lib.common_counter
  PORT MAP (
  PORT MAP (
    rst     => st_rst,
    rst     => st_rst,
    clk     => st_clk,
    clk     => st_clk,
    cnt_en  => wr_en,
    cnt_en  => wr_en,
    cnt_clr => wr_sync,
    cnt_clr => wr_sync,
    count   => word_cnt
    count   => word_cnt
  );
  );
 
 
  u_sync_cnt : ENTITY common_counter_lib.common_counter
  u_sync_cnt : ENTITY astron_counter_lib.common_counter
  PORT MAP (
  PORT MAP (
    rst     => st_rst,
    rst     => st_rst,
    clk     => st_clk,
    clk     => st_clk,
    cnt_en  => wr_sync,
    cnt_en  => wr_sync,
    cnt_clr => sync_cnt_clr,
    cnt_clr => sync_cnt_clr,

powered by: WebSVN 2.1.0

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