永发信息网

求8*8位流水线乘法器的Quartus的原理图或者VHDL代码!急用,谢谢!

答案:4  悬赏:60  手机版
解决时间 2021-04-01 07:33
求8*8位流水线乘法器的Quartus的原理图或者VHDL代码!急用,谢谢!
最佳答案
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_ARITH.all;
use IEEE.STD_LOGIC_UNSIGNED.all;
entity Test is
port(
clk :in std_logic;
a :in std_logic_VECTOR(7 downto 0);
b :in std_logic_VECTOR(7 downto 0);
cout:out std_logic_VECTOR(15 downto 0)
);
end Test;

architecture Test of Test is
signal a1,b1:std_logic_vector(3 downto 0);
signal a2,b2:std_logic_vector(7 downto 4);
signal cout1:std_logic_vector(15 downto 0);
signal cout2:std_logic_vector(15 downto 0);
signal a1b1,a2b1,a1b2,a2b2:std_logic_vector(15 downto 0);
begin
process(a,b,clk)
begin
if clk'event and clk='1' then
a1b1<="0000"&(a(5 downto 0) *b(5 downto 0));
a2b1<="00"&(a(7 downto 6)*b(5 downto 0))&"000000";
a1b2<="00"&(a(5 downto 0)*b(7 downto 6))&"000000";
a2b2<=(a(7 downto 6)*b(7 downto 6))&"000000000000";
end if;
end process;
process(clk)
begin
if clk'event and clk='1' then
cout1<=a1b1+a2b1;
cout2<=a1b2+a2b2;
end if;
end process;
process(clk)
begin
if clk'event and clk='1' then
cout<=cout1+cout2;
end if;
end process;
end Test;

这个可以用~试试吧!
全部回答
你没楼上的在搞笑?看哥哥给你3分钟搞一个!
http://202.115.21.138/wlxt/ncourse/xddzsy/web/jp/wlxt/syzd4/stage4-1.htm去这看看 应该有你想要的
--h_suber
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY h_suber IS
PORT(x,y: IN STD_LOGIC;
diff,s_out:OUT STD_LOGIC);
END h_suber;
ARCHITECTURE behav OF h_suber IS
BEGIN
diff<=x XOR y;
s_out<=(NOT x) AND y;
END behav;
--end h_suber
--f_suber
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY f_suber is
PORT(fx,fy,sub_in:IN STD_LOGIC;
diffr,sub_out:OUT STD_LOGIC);
END ENTITY f_suber;
ARCHITECTURE behav OF f_suber IS
COMPONENT h_suber
PORT(x,y : IN STD_LOGIC;
diff,s_out:OUT STD_LOGIC);
END COMPONENT;
SIGNAL a,b,c : STD_LOGIC;
BEGIN
u1:h_suber PORT MAP(x=>fx,y=>fy,diff=>a,s_out=>b);
u2:h_suber PORT MAP(x=>a,y=>sub_in,diff=>diffr,s_out=>c);
sub_out<=b AND c;
END behav;
--end f_suber
--f_suber8
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY f_suber8 IS
PORT(fx8,fy8 :IN STD_LOGIC_VECTOR(7 DOWNTO 0);
sub_in8: IN STD_LOGIC;
diff8: OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
s_out8: OUT STD_LOGIC);
END ENTITY f_suber8;
ARCHITECTURE behav OF f_suber8 IS
COMPONENT f_suber
PORT(fx,fy,sub_in:IN STD_LOGIC;
diffr,sub_out:OUT STD_LOGIC);
END COMPONENT;
SIGNAL s_outs: STD_LOGIC_VECTOR(6 DOWNTO 0);
BEGIN
u1 : f_suber PORT MAP(fx=>fx8(0),fy=>fy8(0),sub_in=>sub_in8,diffr=>diff8(0),sub_out=>s_outs(0));
u2 : f_suber PORT MAP(fx=>fx8(1),fy=>fy8(1),sub_in=>s_outs(0),diffr=>diff8(1),sub_out=>s_outs(1));
u3 : f_suber PORT MAP(fx=>fx8(2),fy=>fy8(2),sub_in=>s_outs(1),diffr=>diff8(2),sub_out=>s_outs(2));
u4 : f_suber PORT MAP(fx=>fx8(3),fy=>fy8(3),sub_in=>s_outs(2),diffr=>diff8(3),sub_out=>s_outs(3));
u5 : f_suber PORT MAP(fx=>fx8(4),fy=>fy8(4),sub_in=>s_outs(3),diffr=>diff8(4),sub_out=>s_outs(4));
u6 : f_suber PORT MAP(fx=>fx8(5),fy=>fy8(5),sub_in=>s_outs(4),diffr=>diff8(5),sub_out=>s_outs(5));
u7 : f_suber PORT MAP(fx=>fx8(6),fy=>fy8(6),sub_in=>s_outs(5),diffr=>diff8(6),sub_out=>s_outs(6));
u8 : f_suber PORT MAP(fx=>fx8(7),fy=>fy8(7),sub_in=>s_outs(6),diffr=>diff8(7),sub_out=>s_out8);
END behav;
--end f_suber8
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
梦然的老公是不是冷漠
魅族pro7plus和小米6哪个好 小米6和魅族p
减肥有3大好处 如何减肥才有效
网站加急备案大概多少钱加急网站加急备案价格
水浒中截生辰纲的都有谁?
如图所示,质量为0.5kg的小球,从桌面以上高1
君若怜之必惜之,莫若孤芳独自赏什么意思?
excel表格中创建组功能一般应用在什么情况,
重庆至万源通高铁了吗?
奉使虚随八月查是什么意思?
谁知道郑少高速上有几个西南绕城高速的下站口
依据《安全生产法》的规定,企业必须对安全设
四月中旬去大连合适吗?
谁有铝合金玻璃阳台的施工方案
若艾尔法=-1,则角X的终边在第几象限?为什么
推荐资讯
1/4乘3.6表示什么?
一八合作定今期,二九分开各有利。
韩国哪个银行可以用旅游签证开账户
大姐说话先喝水,二姐说话先脱帽。三姐说话先
8毛钱3个人分平均是多少
穿越火线qt语音怎么没有呢
单选题Thegirlswereverypleased________the
液位传感器检查水位快装满桶没,然后它会发送
波士蓝橙力娇酒保质期一般是多久?
手机百度刚输入就弹出以前的记录
昆明到石林多少公里
中国哪个地方姓景的最多
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?