- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
VHDL的任意整数且占空比为50
VHDL的任意整数且占空比为50%分频代码
说明如下:
1.其中top file 为 division,其中的clk_com是比较的频率,用它来和分频后波形进行比较,便于观察,
2.any_enve为任意偶数分频文件
3.any_odd为任意奇数分频文件
4.是一个用于2进制与8进制的译码器,我用它来显示在数码管上当前到底是多少分频
5.以下代码在开发板上实验过,请大家放心使用,欢迎转载,但请注明出处,另外说明由于用的是quartus7.1编辑的,中间无法加中文注释,请大家慢慢读了;以下是代码:
------the top file of the design division
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity division is
port (input : in std_logic_vector(7 downto 0);
clk : in std_logic;
clk_out : out std_logic;
clk_com : out std_logic;
led1: out std_logic_vector(6 downto 0);
led2: out std_logic_vector(6 downto 0);
led3: out std_logic_vector(6 downto 0));
end entity division;
--------------------------------------------------
architecture freq of division is
component decoder is----decoder
port(bin : in std_logic_vector(2 downto 0);
de : out std_logic_vector(6 downto 0));
end component;
component any_even is----any_even division
generic (data_width : integer := 8 );
port(input1 : in std_logic_vector(data_width-1 downto 0);
clk_in : in std_logic;
clk_out : out std_logic);
end component any_even;
component any_odd is-----any_even division
generic (data_width : integer := 8);
port(input2 : in std_logic_vector(data_width - 1 downto 0);
clk_in : in std_logic;
clk_out : out std_logic);
end component any_odd;
signal temp1,temp2 : std_logic;
begin
u1: decoder port map(bin=input(2)input(1)input(0),de=led1);
u2: decoder port map(bin=input(5)input(4)input(3),de=led2);
u3: decoder port map(bin=0input(7)input(6),de=led3);
u4: any_even port map(input,clk,temp1);
U5: any_odd port map(input,clk,temp2);
process(clk,input)
begin
if input(0)= 0 then
clk_out = temp1;
else clk_out = temp2;
end if;
end process;
clk_com = clk;
end architecture freq;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity any_even is
generic (data_width : integer := 8 );
port(input1 : in std_logic
您可能关注的文档
最近下载
- CECS193-2005 城镇供水长距离输水管(渠)道工程技术规程.pdf VIP
- 《Python数学建模算法与应用课件》04第4章 线性规划和整数规划模型.pptx
- 立体仓库结构设计(底盘单元).docx VIP
- ASME中国制造-ISO12944-7-2017 中文译稿 第7部分 涂装工作的实施和监管.pdf VIP
- 2025年生物制药企业生产过程节能减排与成本控制方案.docx
- 民国时期广东的蔗糖生产与蔗糖业纠纷研究.pdf
- 末梢血标本采集专家共识试题及答案.doc VIP
- 年回收拆解30000辆报废汽车新建项目环境影响报告.docx VIP
- JTT1495-2024公路水运危险性较大工程安全专项施工方案审查规程.pdf VIP
- 《人类起源的演化过程》名著导读PPT教学课件.pptx VIP
文档评论(0)