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

Subversion Repositories mod_sim_exp

[/] [mod_sim_exp/] [trunk/] [rtl/] [vhdl/] [ram/] [dpramblock_asym.vhd] - Diff between revs 89 and 90

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 89 Rev 90
Line 60... Line 60...
    width  : integer := 256;  -- read width
    width  : integer := 256;  -- read width
    depth  : integer := 2;    -- nr of (width)-bit words
    depth  : integer := 2;    -- nr of (width)-bit words
    device : string  := "xilinx"
    device : string  := "xilinx"
  );
  );
  port (
  port (
    -- write port A
    clk : in std_logic;
    clkA   : in std_logic;
    -- write port
    waddrA : in std_logic_vector(log2((width*depth)/32)-1 downto 0);
    waddr : in std_logic_vector(log2((width*depth)/32)-1 downto 0);
    weA    : in std_logic;
    we    : in std_logic;
    dinA   : in std_logic_vector(31 downto 0);
    din   : in std_logic_vector(31 downto 0);
    -- read port B
    -- read port
    clkB   : in std_logic;
    raddr : in std_logic_vector(log2(depth)-1 downto 0);
    raddrB : in std_logic_vector(log2(depth)-1 downto 0);
    dout  : out std_logic_vector(width-1 downto 0)
    doutB  : out std_logic_vector(width-1 downto 0)
 
  );
  );
end dpramblock_asym;
end dpramblock_asym;
 
 
architecture structural of dpramblock_asym is
architecture structural of dpramblock_asym is
  -- constants
  -- constants
Line 91... Line 90...
      rddepth => depth,
      rddepth => depth,
      wrwidth => RAMwrwidth,
      wrwidth => RAMwrwidth,
      device  => device
      device  => device
    )
    )
    port map(
    port map(
 
      clk => clk,
      -- write port
      -- write port
      clkA   => clkA,
      waddr => waddr,
      waddrA => waddrA,
      we    => we,
      weA    => weA,
      din   => din((i+1)*RAMwrwidth-1 downto RAMwrwidth*i),
      dinA   => dinA((i+1)*RAMwrwidth-1 downto RAMwrwidth*i),
 
      -- read port
      -- read port
      clkB   => clkB,
      raddr => raddr,
      raddrB => raddrB,
      dout  => dout_RAM(i)
      doutB  => dout_RAM(i)
 
    );
    );
 
 
    map_output : for j in 0 to nrRAMs-1 generate
    map_output : for j in 0 to nrRAMs-1 generate
      doutB(j*32+(i+1)*RAMwrwidth-1 downto j*32+i*RAMwrwidth)
      dout(j*32+(i+1)*RAMwrwidth-1 downto j*32+i*RAMwrwidth)
          <= dout_RAM(i)((j+1)*RAMwrwidth-1 downto j*RAMwrwidth);
          <= dout_RAM(i)((j+1)*RAMwrwidth-1 downto j*RAMwrwidth);
    end generate;
    end generate;
  end generate;
  end generate;
end structural;
end structural;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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