- 1、本文档共4页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
16*8 的只读存储器的设计方法
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity rom is
port(addr:in std_logic_vector(3 downto 0); en:in std_logic;
data:out std_logic_vector(7 downto 0)); end;
architecture one of rom is
type memory is array(0 to 15)of std_logic_vector(7 downto 0);
signal data1:memory:=11111101110111001100001000000100,1000101000110100,1001111101011100);
signal addr1:integer range 0 to 15; begin
addr1=conv_integer(addr); process(en,addr1,addr,data1) begin
if en=1 then
data=data1(addr1);
else
data=(others=Z);
end if;
end process; end;
32*8 随机存储器的设计方法library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity ram is
port(addr:in std_logic_vector(4 downto 0); wr:in std_logic;
rd:in std_logic; cs:in std_logic;
datain:in std_logic_vector(7 downto 0); dataout:out std_logic_vector(7 downto 0));
end;
architecture one of ram is
type memory is array(0 to 31)of std_logic_vector(7 downto 0); signal data1:memory;
signal addr1:integer range 0 to 31; begin
addr1=conv_integer(addr); process(wr,cs,addr1,data1,datain) begin
if cs=0and wr=1 then data1(addr1)=datain; end if;
end process; process(rd,cs,addr1,data1) begin
if cs=0and rd=1 then dataout=data1(addr1); else dataout=(others=Z); end if;
end process; end;
分频电路的设计
偶数分频电路的设计方法
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity twofenpin is port(clk:in std_logic; div2:out std_logic; div4:out std_logic; div8:out std_logic); end;
architecture one of twofenpin is
signal cnt:std_logic_vector(2 downto 0); begin
process(clk) begin
if clkevent and clk=1 then cnt=cnt+1;
end if;
end process; div2=cnt(0); div4=cnt(1); div8=cnt(2); end;
您可能关注的文档
最近下载
- 怡安翰威特-胜任力模型设计与应用(学员版)_20120718.ppt VIP
- 配电箱、高低压配电柜、变压器供货安装调试投标施工方案.docx
- 提高市政雨水管道接口施工一次验收合格率.docx
- 高考英语阅读理解解题技巧之最佳标题课件.pptx
- 《生成式人工智能个人信息保护技术要求 第1部分:总则》.doc VIP
- 怡安翰威特-胜任能力模型设计和基于胜任能力的人力资源体系V9(学员版)-201005.ppt VIP
- 新教科版小学五年级下册科学全册完整课件.pptx
- 中医全科转岗试题带答案.pdf
- 义务教育版(2024)八年级全一册信息科技 探索物联系统 第16课 模块功能先划分 课件.pptx VIP
- GB50300-2013验收标准电子版新表格.doc
文档评论(0)