EDA程序填空

上传人:慢*** 文档编号:233025654 上传时间:2022-01-01 格式:DOC 页数:2 大小:15.13KB
返回 下载 相关 举报
EDA程序填空_第1页
第1页 / 共2页
EDA程序填空_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《EDA程序填空》由会员分享,可在线阅读,更多相关《EDA程序填空(2页珍藏版)》请在金锄头文库上搜索。

1、EDA程序填空1、下面程序是参数可定制带计数使能异步复位计数器的VHDL描述,试补充完整。- N-bit Up Counter with Load, Count Enable, and- Asynchronous Resetlibrary ieee;use IEEE.std_logic_1164.all;use IEEE.std_logic_unsigned.all;use IEEE.std_logic_arith.all;entity counter_n isgeneric (width : integer := 8);port(data : in std_logic_vector (wid

2、th-1 downto 0);load, en, clk, rst : in std_logic;q : out std_logic_vector (width - 1 downto 0);end counter_n;architecture behave of counter_n issignal count : std_logic_vector (width-1 downto 0);beginprocess(clk, rst)beginif rst = 1 thencount 0); 清零elsif clkevent and clk = 1 then 边沿检测if load = 1 the

3、ncount = data;elsif en = 1 thencount = count + 1;end if;end if;end process;q 10 THENQ1 0);- 置零ELSEQ1 = Q1 + 1 ;- 加1END IF;END IF;END PROCESS ;Q = Q1;END bhv;3. 下面是一个多路选择器的VHDL描述,试补充完整。LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;ENTITY bmux ISPORT (sel : IN STD_LOGIC;A, B : IN STD_LOGIC_VECTOR(7 DOWNTO 0);Y: OUT STD_LOGIC_VECTOR(7 DOWNTO 0) ;END bmux;ARCHITECTURE bhv OF bmux ISBEGINy = A when sel = 1 ELSE B;END bhv;

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 中学教育 > 其它中学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号