MyFPGA Forum

 找回密码
 注册
搜索
查看: 3108|回复: 0
打印 上一主题 下一主题

小题目 求助

[复制链接]
跳转到指定楼层
1#
发表于 2010-11-8 13:02:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
刚学了一点,有个题目不会希望会的大侠给做一下 哈哈谢了
一、
library ieee;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
use IEEE.std_logic_arith.all;
entity counter_t is
        generic(width : integer := 8);
        port(data : in std_logic_vector (width-1 downto 0);
                load, en, clk, rst : in std_logic;
                q : out std_logic_vector (width-1 downto 0));
end counter_t;
architecture behave of counter_t is
        signal count : std_logic_vector (width-1 downto 0);       
begin
        process(clk, rst)       
        begin
                if rst = '1' then
                        count <=(others=>'0');       --清零
                elsif CLK'EVENT AND CLK='1' then  --上升沿检测
                        if load = '1' then
                                count <= data;
                        ELSIF en = '1' then
                                count <= count + 1;
                        END IF;
                end if;
        end process;
        Q<=COUNT;
        end behave;
要求:
(一)基本要求:
1、分析上面VHDL代码所实现的电路功能;
2、分析各语句的功能;
(二)进阶要求:
1、改写上述代码使其能实现相同的电路功能;
2、利用EDA工具(QUARTUS II,ISE,SYNPLIFY PRO)等完成编译、仿真并给出其RTL级电路图;
二、

(一)基本要求
1、假设各模块已设计好,利用结构化设计方法,利用VHDL(Verilog HDL)代码实现上述电路功能;
(二)进阶要求
1、设计各电路子模块;
2、利用结构化方法(VHDL,Verilog HDL)描述上述电路;
3、利用EDA工具对其进行编译、仿真并给出其RTL级电路图;
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|MyFPGA

GMT+8, 2025-5-1 08:09 , Processed in 0.033275 second(s), 15 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表