在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2394|回复: 6

求助VHDL程序(急)

[复制链接]
发表于 2008-4-27 09:17:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
library synplify;
use synplify.attributes.all;
entity blockdram is
generic(
depth: integer;
Dwidth: integer;
Awidth: integer
);
port(
addra: IN std_logic_VECTOR(Awidth-1 downto 0);
clka: IN std_logic;
addrb: IN std_logic_VECTOR(Awidth-1 downto 0);
clkb: IN std_logic;
dia: IN std_logic_VECTOR(Dwidth-1 downto 0);
wea: IN std_logic;
dob: OUT std_logic_VECTOR(Dwidth-1 downto 0));
end blockdram;
architecture arch_blockdram of blockdram is
type ram_memtype is array (depth-1 downto 0) of std_logic_vector
(Dwidth-1 downto 0);
signal mem : ram_memtype := (others => (others => '0'));
attribute syn_ramstyle of mem : signal is "block_ram";
signal addrb_reg: std_logic_vector(Awidth-1 downto 0);
begin
wr: process( clka )
begin
  if rising_edge(clka) then
   if wea = '1' then
    mem(conv_integer(addra)) <= dia;
   end if;
  end if;
end process wr;
rd: process( clkb )
begin
  if rising_edge(clkb) then
   addrb_reg <= addrb;
  end if;
    end process rd;
dob <= mem(conv_integer(addrb_reg));
end arch_blockdram;
红色字体出现错误,请问是什么原因,我用的是Modelsim
发表于 2008-4-27 20:19:13 | 显示全部楼层
报错的信息是怎么说的?看样子是你的library它找不到啊.
发表于 2008-4-28 09:00:33 | 显示全部楼层
你没有加入syniplify的库,当然要报错了!
发表于 2008-4-28 09:37:16 | 显示全部楼层
找不到这个库
 楼主| 发表于 2008-4-29 12:36:23 | 显示全部楼层
syniplify的库怎么加的啊,高手指点下,谢谢
发表于 2008-4-29 20:37:54 | 显示全部楼层
这个问题很简单,我只是奇怪,这段代码是RAM仿真模型,为什么要调用Synplify的库?

Synplify只是综合工具,不应该和仿真库有交集啊?
发表于 2008-6-14 16:05:40 | 显示全部楼层

进来看看

进来看看;;
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-4 23:57 , Processed in 0.034507 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表