数字电路EDA实验报告

更新时间:2023-06-23 11:20:43 阅读: 评论:0

服开头的成语
数字电路EDA实验报告
学校:                 
学院:                 
班级:                  挖掘机简笔画
姓名:                 
学号:                 
指导教师:             

60倒计时器
一、实验目的
1.使用VHDL语言设计数字电路。
2.熟悉Quartus II开发环境,掌握基本操作。
3.学会使用FPGA开发板进行开发。
二、实验仪器
1.电脑一台。
2. FPGA开发板一块。
三、实验原理与设计
1.分频器设计
(1)原理设计
使用实验板上的50MHz时钟信号,因此需要对该时钟信号进行分频,以得到1Hz时钟信号,供计数器使用。
(2)VHDL语言描述
library ieee;
u ieee.std_logic_1164.all;
u ieee.std_logic_unsigned.all;
entity divider is
投标文件密封条port(
    CLK:in std_logic;
    OUT_CLK:out std_logic
);
实习项目end divider;
architecture one of divider is
signal count:std_logic_vector(31 downto 0):=x"00000000";
signal flag:std_logic:='0';
begin
    process(CLK)
        begin
            if CLK'event and CLK='1' then
                if count<24999999 then
                    count<=count+1;
                el
                    count<=(others=>'0');
仿写春天的句子                    flag<=not flag;
                end if;
            end if;
    end process;
    OUT_CLK<=flag;
end one;
(3)RTL视图
(4)符号表示
2.计数器设计
(1)原理设计
    计数器为模60倒计时计数器,分成十位与个位两部分。个位减到0后再减则十位减1,个位减完后为9。当两位数为“00”时输出借位,再减1则为“59”。另外,设计计数使能、异步清零功能。
(2)VHDL语言描述
library ieee;
u ieee.std_logic_1164.all;
最亲爱的人
u ieee.std_logic_unsigned.all;
entity cnt60 is
port(
    CLK:in std_logic;
    OUT_H:out std_logic_vector(3 downto 0);
    OUT_L:out std_logic_vector(3 downto 0);
    EN:in std_logic;
    CL:in std_logic;
    OC:out std_logic
);
end cnt60;
architecture one of cnt60 is
signal s_h:std_logic_vector(3 downto 0):=(others=>'0');
signal s_l:std_logic_vector(3 downto 0):=(others=>'0');
signal s_oc:std_logic:='0';
begin
    process(EN,CL,CLK)
        begin
            if CL='0' then
小鸟小鸟歌曲                s_h<=(others=>'0');
                s_l<=(others=>'0');
            elsif EN='1' then
                if CLK'event and CLK='1' then
                    if s_oc='1' then
                        s_oc<='0';
                    end if;
                    if s_l>0 then
                        s_l<=s_l-1;
                        if s_h="0000" and s_l="0001" then
                            s_oc<='1';
                        end if;
                    el
                        s_l<="1001";
                        if s_h>0 then
                            s_h<=s_h-1;
                        el
即使的意思
                            s_h<="0101";
                        end if;
                    end if;
                end if;
            end if;
    end process;
    OUT_L<=s_l;
    OUT_H<=s_h;
    OC<=s_oc;
end one;
(3)RTL视图

本文发布于:2023-06-23 11:20:43,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1051193.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:设计   使用   个位   开发   信号   计数器   时钟   实验
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图