Skip to content
Snippets Groups Projects
Select Git revision
  • b9e901b0cd1f928b59c832707f335074350e6654
  • master default protected
  • nightly_master
  • online_much_readconf_cleanup protected
  • online_mvd_readconf_cleanup protected
  • jul25_patches
  • cleanup_rich_v25a
  • jul24_patches
  • nov23_patches
  • DC_2404
  • nighly_master
  • DC_Jan24
  • DC_Nov23
  • DC_Oct23
  • feb23_patches
  • L1Algo-dev9
  • dec21_patches protected
  • apr21_patches protected
  • dev_2025_44
  • dev_2025_43
  • dev_2025_42
  • dev_2025_41
  • dev_2025_40
  • dev_2025_39
  • dev_2025_38
  • dev_2025_37
  • dev_2025_36
  • dev_2025_35
  • dev_2025_34
  • dev_2025_33
  • dev_2025_32
  • dev_2025_31
  • dev_2025_30
  • RC_jul25
  • dev_2025_29
  • dev_2025_28
  • dev_2025_27
  • dev_2025_26
38 results

CbmRoot_test.cmake

Blame
  • ram.vhd 821 B
    LIBRARY IEEE;
    USE IEEE.std_logic_1164.ALL;
    USE IEEE.std_logic_ARITH.ALL;
    USE IEEE.std_logic_UNSIGNED.ALL;
    
    library work;
    use work.trb_net_std.all;
    
    entity ram is
      generic(
        depth : integer := 5;
        width : integer := 32
        );
      port(
        CLK  : in std_logic;
        wr   : in std_logic;
        a    : in std_logic_vector(depth-1 downto 0);
        dout : out std_logic_vector(width-1 downto 0);
        din  : in std_logic_vector(width-1 downto 0)
        );
    end entity;
    
    architecture ram_arch of ram is
      type ram_t is array(0 to 2**depth-1) of std_logic_vector(width-1 downto 0);
    	SIGNAL ram : ram_t;
    
    begin
      process(CLK)
        begin
          if rising_edge(CLK) then
            if wr = '1' then
              ram(conv_integer(a)) <= din;
            end if;
            dout <= ram(conv_integer(a));
          end if;
        end process;
    end architecture;