- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
应用移位相加原理设计8位乘法器
应用移位相加原理设计8位乘法器
顶层文件
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity multi8x8 is
port(clkk,start:in std_logic;
a,b:in std_logic_vector(7 downto 0);
dout:out std_logic_vector(15 downto 0));
end entity;
architecture struc of multi8x8 is
component arictl
port(clk,start:in std_logic;
clkout,rstall:out std_logic);
end component;
component andarith
port(abin:in std_logic;
din:in std_logic_vector(7 downto 0);
dout:out std_logic_vector(7 downto 0));
end component;
component adder8b
port(cin:in std_logic;
a,b:in std_logic_vector(7 downto 0);
s:out std_logic_vector(7 downto 0);
cout:out std_logic);
end component;
component sreg8b
port(clk,load:in std_logic;
din:in std_logic_vector(7 downto 0);
qb:out std_logic);
end component;
component reg16b
port(clk,clr:in std_logic;
d:in std_logic_vector(8 downto 0);
q:out std_logic_vector(15 downto 0));
end component;
signal gndint,intclk,rstall,newstart,qb:std_logic;
signal andsd:std_logic_vector(7 downto 0);
signal dtbin:std_logic_vector(8 downto 0);
signal dtbout:std_logic_vector(15 downto 0);
begin
dout=dtbout;
gndint=0;
process(clkk,start)
begin
if(start=1)then
newstart=1;
else if(clkk=0)then
newstart=0;
end if;
end if;
end process;
u1:arictl port map(clk=clkk,start=newstart,clkout=intclk,rstall=rstall);
u2:sreg8b port map(clk=intclk,load=rstall,din=b,qb=qb);
u3:andarith port map(abin=qb,din=a,dout=andsd);
u4:adder8b port map(cin=gndint,a=dtbout(15 downto 8),b=andsd,s=dtbin(7 downto 0),cout=dtbin(8));
u5:reg16b port map(clk=intclk,clr=rstall,d=dtbin,q=dtbout);
end architecture;
各部件
arictl—控制元件
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity arictl is
port(clk,start:in std_logic;
clkout,rstall:out std_logic);
end entity;
architecture bhv of arictl is
signal cnt4b:std_logic_vector(3 downto 0);
begin
process(clk,start)
begin
rstall=start;
if(start=1)then
cnt4b=0000;
您可能关注的文档
最近下载
- SICK西克KTS Core色标传感器操作手册.pdf VIP
- GB50345-2012 屋面工程技术规范.docx VIP
- 船舶油漆使用基本基础知识.pdf VIP
- 四年级(上)语文课文同步仿写、续写1.pdf VIP
- 9 天上有颗“南仁东星”课件(共30张PPT)2025-2026学年统编版语文八年级上册.pptx VIP
- 高级保育员课件.pptx VIP
- 第十章生态系统.ppt VIP
- 《脑卒中运动障碍康复护理规范》.pdf VIP
- 2012年全国创新杯说课大赛作品汇总铰链四杆机构的类型及判定说课(新蓝).ppt VIP
- 年处理80吨茯苓提取车间提取工段工艺设计-毕业论文(设计).doc VIP
文档评论(0)