首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

请各位大侠看一下下面的SRAM程序

请各位大侠看一下下面的SRAM程序

我在MAXPLUS2中用Vhdl 编写的SRAM程序无法通过,错误提示:15行:unsupported feature error:non locally static bounds are not supported 程序如下: LIBRARY ieee; USE ieee.std_logic_1164.ALL; use ieee.std_logic_unsigned.all; ENTITY sram64 IS GENERIC(k: integer := 8; w: integer:= 3); PORT( wr, rd,cs: IN STD_LOGIC; addr: IN STD_LOGIC_VECTOR(w-1 downto 0); din: IN STD_LOGIC_VECTOR(w-1 downto 0); dout : OUT STD_LOGIC_vector(k-1 downto 0)); END sram64 ; ARCHITECTURE a OF sram64 IS subtype word is std_logic_vector(k-1 downto 0); type memory is array (0 to 2**w-1) of word; SIGNAL addr_in: integer range 0 to 2**w-1; SIGNAL din_change,wr_rise: time:=0 ps; signal sram:memory; BEGIN addr_in<=conv_integer(addr); process(wr) begin if(wr'event and wr='1') then if(cs='1' and wr='1') then sram(addr_in)<=din after 2 ns; end if; end if; wr_rise<=now; assert(now-din_change>=800 ps); report "setup error din(sram)" severity warning; end process; process(din) begin din_change<=now; assert (now-wr_rise>=800 ps); report"hold error din(sram)" severity warning; end process; END a;
返回列表