Memory 在Nexys 3 FPGA上访问蜂窝RAM的问题

Memory 在Nexys 3 FPGA上访问蜂窝RAM的问题,memory,vhdl,fpga,low-level,Memory,Vhdl,Fpga,Low Level,我正在尝试在Nexys 3 FPGA上使用蜂窝RAM。到目前为止,我在RAM中存储了一个8位的.wav文件(我已经用Adept验证了RAM多次正常工作)。FPGA设计的其他部分正在运行,因为我得到了其他输出,但没有数据。我不明白为什么会发生这种情况,因为数据应该以字节格式存储,以便访问和处理它 下面是我的代码片段,用于访问和读取RAM中的数据。内存访问程序访问RAM,然后为发生的另一个处理(现在正在运行)返回两个8位数字 ——顶级总线 MemAdr:out std_logic_vector(26

我正在尝试在Nexys 3 FPGA上使用蜂窝RAM。到目前为止,我在RAM中存储了一个8位的.wav文件(我已经用Adept验证了RAM多次正常工作)。FPGA设计的其他部分正在运行,因为我得到了其他输出,但没有数据。我不明白为什么会发生这种情况,因为数据应该以字节格式存储,以便访问和处理它

下面是我的代码片段,用于访问和读取RAM中的数据。内存访问程序访问RAM,然后为发生的另一个处理(现在正在运行)返回两个8位数字

——顶级总线
MemAdr:out std_logic_vector(26向下到1);--存储器地址
MemDB:在标准逻辑向量中(15到0)——内存地址
--内存访问
图书馆IEEE;
使用IEEE.STD_LOGIC_1164.ALL;
使用IEEE.NUMERIC_STD.ALL;
使用IEEE.STD_LOGIC_UNSIGNED.ALL;
UNISIM图书馆;
使用UNISIM.VComponents.all;
实体mem_访问是
港口(
o_数据输入:输出标准逻辑向量(7到0);--内存中的8位
o_数据输入:输出标准逻辑向量(7到0);--内存中的8位
o_地址总线:输出标准逻辑向量(26向下至1);
i_数据总线:标准逻辑向量(15到0);
i_采样时钟:标准逻辑;
i_时钟:标准逻辑;
i_重置:在标准逻辑中
);
结束mem_访问;
mem_访问的体系结构是
信号时钟脉冲:整数;
信号计数器:标准逻辑向量(24至0);
信号通道选择:标准逻辑;
开始
--*******************************************************--
数据访问:过程(i_采样时钟、i_重置、时钟脉冲)
开始
如果(i_reset='1'),则

频道选择我无法让它工作。这可能是因为我无法找到正确的方法来启用蜂窝RAM。对于未来的工作,请确保研究使蜂窝RAM工作所需的所有启用引脚,因为它是一个外部组件。

请注意,没有人向LuckyLuc提供帮助,这表明您不太可能在这里找到帮助。这里有一些人可以提供帮助,但可能无法访问硬件平台。尝试查看注释中链接中的内存控制器。否则,帮助需要直接的经验或数据表设计分析。我在这里找到了一个示意图和源代码示例:这是异步模式,所以我不知道它是否足够快。
--Toplevel Buses    
MemAdr              :    out std_logic_vector (26 downto 1); -- memory address
MemDB               : in     std_logic_vector (15 downto 0)  -- memory address

--Memory Access
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

library UNISIM;
use UNISIM.VComponents.all;

entity mem_access is

    port(
    o_datain_r        :    out std_logic_vector (7 downto 0); -- 8 bit from memory
    o_datain_l        :    out std_logic_vector (7 downto 0); -- 8 bit from memory
    o_addressbus      :    out std_logic_vector (26 downto 1);

    i_databus         : in     std_logic_vector (15 downto 0);
    i_sampleclock     : in     std_logic;
    i_clock           : in     std_logic;
    i_reset           : in     std_logic    

    );
end mem_access;

architecture Behavioral of mem_access is

    signal clockpulses       : integer ;
    signal counter           : std_logic_vector (24 downto 0);
    signal channel_select    : std_logic; 

begin

--*******************************************************--
data_access: process (i_sampleclock, i_reset, clockpulses)
begin
    if (i_reset = '1') then
        channel_select <= '0';
        o_addressbus   <= (others => '0');
        o_datain_r     <= X"00";
        o_datain_l     <= X"00";
        counter        <= (others => '0');

    elsif (clockpulses = 0) then
        channel_select <= '0';
        o_addressbus   <= channel_select & counter;

    elsif (clockpulses = 75) then
        o_datain_r     <= i_databus (7 downto 0);

    elsif (clockpulses = 100) then
        channel_select <= '1';
        o_addressbus   <= channel_select & counter;

    elsif (clockpulses = 175) then  
        channel_select <= '0';
        o_addressbus   <= channel_select & counter;

    elsif (clockpulses = 275) then 
        o_datain_l     <= i_databus (7 downto 0);

    elsif (rising_edge(i_sampleclock)) then
        counter <= counter + '1';

    elsif (counter = "1111111111111111111111111") then
        counter <= (others => '0');

    end if;

end process;
--*******************************************************--
clkpulses_counter: process (i_clock, i_reset, i_sampleclock)
begin

    if (i_reset = '1') then 
        clockpulses <= 0;
    elsif (rising_edge(i_clock)) then
        clockpulses <= clockpulses + 1;     
    end if;

    if (rising_edge(i_sampleclock)) then
        clockpulses <= 0;
    end if;

end process;
--*******************************************************--

end Behavioral;