- 1、本文档共3页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
乘法器.doc
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
entity cnt20 is
port(stop,start,reset,clk:in std_logic;
q:out std_logic_vector(7 downto 0);
yellow,green,red:out std_logic);
end cnt20;
architecture behavioral of cnt20 is
signal cao_v:std_logic_vector(1 downto 0);
begin
process(stop,reset,clk)
variable tmp1:integer;
variable tmp2:integer;
variable ca:integer;
begin
if reset=1 then
tmp1:=0;
tmp2:=1;
ca:=0;
elsif(clkevent and clk=1)then
if(stop=0)then
if(start=1)then
if(tmp1=0)then
if(tmp2=0)then
ca:=1;
else
tmp2:=tmp2-1;
tmp1:=9;
end if;
else
tmp1:=tmp1-1;
end if;
end if;
end if;
end if;
cao_v=conv_std_logic_vector(ca,2);
yellow=cao_v(0);
q(7 downto 4)=conv_std_logic_vector(tmp2,4);
q(3 downto 0)=conv_std_logic_vector(tmp1,4);
end process;
green=stop and start;
red=stop and (not start);
end behavioral;
library ieee;
use ieee.std_logic_1164.all;
entity first is
port(reset:in std_logic;
a:in std_logic_vector(3 downto 0);
lockout:out std_logic;
firstman:out std_logic_vector(2 downto 0));
end first;
architecture behavioral of first is
signal clk,lock:std_logic;
signal c:std_logic_vector(3 downto 0);
begin
clk=1when a(3)=1 or a(2)=1 or a(1)=1 else 0;
lockout=lock;
process_label:
process(clk)
begin
if reset=1then
c=0000;
lock=0;
elsif clk=1 then
if lock=0 then
c=a;
lock=1;
end if;
end if;
end process process_label;
firstman=001 when c=1000 else
010 when c=0100 else
011 when c=0010 else
100 when c=0001 else
000;
end behavioral;
您可能关注的文档
- 90年党旗飘扬.doc
- 第6章负债(学生).ppt
- 专题一求气体式量的方法.ppt
- PB内审检查表.doc
- 初中函数知识点.doc
- 氨基酸检测图谱.doc
- 中南大学公路勘测设计课件第3-4讲汽车行驶特性.ppt
- 平面图形周长面积演示文稿2.ppt
- CAD练习题20题.doc
- PS利用图层.doc
- 2025年中国铝型棒行业投资前景及策略咨询研究报告.docx
- 2025年中国水平孔罗盘斜仪数据监测报告.docx
- 2025年中国对氟苯丙酮行业投资前景及策略咨询研究报告.docx
- 2025年中国硅橡胶绝缘电缆行业投资前景及策略咨询研究报告.docx
- 2025至2030年电力电子元件项目可行性研究报告.docx
- 2025年中国雪尼尔制品数据监测研究报告.docx
- 2025年综合类-中级农业经济-第二章农业企业经营与管理体制历年真题摘选带答案(5套合计100道单选.docx
- 2025年中国平推票据打印机数据监测报告.docx
- 2025年中国熔煅器行业投资前景及策略咨询研究报告.docx
- 2025年中国永磁同步变频调速电动机数据监测研究报告.docx
文档评论(0)