打印

又郁闷了 今天又遇到一个超级奇怪的问题 关于block RAM的

[复制链接]
1606|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
wahahaabc|  楼主 | 2011-8-2 22:18 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
芯片:SPARTAN-6 45T 3速 FGG484封装
软件:ISE13.1
原来的一个项目,在实际的电路板上工作正常。使用了多个简单的DPRAM,分别调用如下VHDL代码:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity dpram_w_r is
    generic (
        ADDR_WIDTH : integer := 11;
        DATA_WIDTH : integer := 8
        );
    port (
        clka  : in  std_logic;
        ena   : in  std_logic;
        wea   : in  std_logic;
        addra : in  std_logic_vector(ADDR_WIDTH-1 downto 0);
        dina  : in  std_logic_vector(DATA_WIDTH-1 downto 0);
        
        clkb  : in  std_logic;      
        enb   : in  std_logic;
        addrb : in  std_logic_vector(ADDR_WIDTH-1 downto 0);
        doutb : out std_logic_vector(DATA_WIDTH-1 downto 0)
        );
end dpram_w_r;
architecture rtl of dpram_w_r is
    type ram_type is array(2**ADDR_WIDTH-1 downto 0) of std_logic_vector(DATA_WIDTH-1 downto 0);
    signal ram : ram_type;
    attribute syn_ramstyle : string;
    attribute syn_ramstyle of ram : signal is "no_rw_check" ;      
   
begin
    -- dual port block ram inference
    process (clka)
    begin
        if rising_edge(clka) then
            if ena = '1' then
                if wea = '1' then
                    ram(to_integer(unsigned(addra))) <= dina;
                end if;
            end if;
        end if;
    end process;
   
    process (clkb)
    begin
        if rising_edge(clkb) then
            if enb = '1' then
                doutb <= ram(to_integer(unsigned(addrb)));
            end if;
        end if;
    end process;
end rtl;

(1)在ISE13.1下,改变综合器的一个参数:将ram style从auto改为block,重新编译以后,下载到电路板中,工作不正常。
(2)将上面代码中的attribute syn_ramstyle of ram : signal is "no_rw_check" ;
改为attribute syn_ramstyle of ram : signal is "block_ram" ;
重新编译以后,下载到电路板中,工作不正常。

晕倒

请大侠赐教

相关帖子

沙发
AutoESL| | 2011-8-3 14:36 | 只看该作者
那以前用auto时,这个ram综合成什么样的ram style了呢?

使用特权

评论回复
板凳
wahahaabc|  楼主 | 2011-8-3 16:05 | 只看该作者
2# AutoESL

多谢提醒 俺还忘记看了 今天有点儿忙 有时间看一下

使用特权

评论回复
地板
mowo| | 2011-8-4 22:32 | 只看该作者
我也参考下

使用特权

评论回复
5
mowo| | 2011-8-4 22:32 | 只看该作者
:handshake

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

119

主题

627

帖子

0

粉丝