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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 1823|回复: 0

大家帮忙看看这个vhdl的乘法器程序!

[复制链接]
发表于 2007-7-6 10:10:47 | 显示全部楼层 |阅读模式

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

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

x
Library ieee;
Use ieee.std_logic_1164.all;
Use ieee.std_logic_unsigned.all;
Use ieee.std_logic_arith.all;
entity const_mult is
generic(N:integer:=8;
   M:integer:=8;

cst_mult:integer:=66);
port
(clock:in std_logic;
clockenable:in std_logic;
reset:in std_logic;
color:in std_logic_vector(n-1 downto 0);
color_out: out std_logic_vector(m+n-1 downto 0)
);
end const_mult;
architecture rtl of const_mult is
begin
color_kcm:process(clock,reset)
begin
if (reset= '0' ) then
color_out<=(others=> '0');
elsif (clock'event and clock='1')then
if (clockenable= '1')then
color_out<=conv_std_logic_vector(conv_unsigned(cst_mult,M)*unsigned(color),out_size);
end if;
end if;

end process;
end rtl;




好像不太对,哪位能帮我找找错误,谢谢大家了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-5-4 06:55 , Processed in 0.030197 second(s), 10 queries , Gzip On, Redis On.

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