Exams/2014 q4b

这篇具有很好参考价值的文章主要介绍了Exams/2014 q4b。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Consider the n-bit shift register circuit shown below:

Exams/2014 q4b,HDLBits题目,verilog

 

Write a top-level Verilog module (named top_module) for the shift register, assuming that n = 4. Instantiate four copies of your MUXDFF subcircuit in your top-level module. Assume that you are going to implement the circuit on the DE2 board.文章来源地址https://www.toymoban.com/news/detail-619306.html

  • Connect the R inputs to the SW switches,
  • clk to KEY[0],
  • E to KEY[1],
  • L to KEY[2], and
  • w to KEY[3].
  • Connect the outputs to the red lights LEDR[3:0].
module top_module (
    input [3:0] SW,
    input [3:0] KEY,
    output [3:0] LEDR
); //

    MUXDFF MUX_3(
        .clk	(KEY[0]),
        .e		(KEY[1]),
        .l		(KEY[2]),
        .r		(SW[3]),
        .w		(KEY[3]),
    
        .Q     (LEDR[3])
);
    
    MUXDFF MUX_2(
        .clk	(KEY[0]),
        .e		(KEY[1]),
        .l		(KEY[2]),
        .r		(SW[2]),
        .w		(LEDR[3]),
    
        .Q     (LEDR[2])
);
    
    MUXDFF MUX_1(
        .clk	(KEY[0]),
        .e		(KEY[1]),
        .l		(KEY[2]),
        .r		(SW[1]),
        .w		(LEDR[2]),
    
        .Q     (LEDR[1])
);
    
    
    MUXDFF MUX_0(
        .clk	(KEY[0]),
        .e		(KEY[1]),
        .l		(KEY[2]),
        .r		(SW[0]),
        .w		(LEDR[1]),
    
        .Q     (LEDR[0])
);
    
    
endmodule

module MUXDFF (
	input clk,
    input e,
    input l,
    input r,
    input w,
    
    output Q
);
    wire  temp0;
    wire  temp1;
    assign temp0 = e? w : Q;
    assign temp1 = l? r : temp0;
    
    always@(posedge clk)
        begin 
            Q <= temp1;
        end

endmodule

到了这里,关于Exams/2014 q4b的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • [HDLBits] Exams/ece241 2013 q7

    A JK flip-flop has the below truth table. Implement a JK flip-flop with only a D-type flip-flop and gates. Note: Qold is the output of the D flip-flop before the positive clock edge. J K Q 0 0 Qold 0 1 0 1 0 1 1 1 ~Qold  

    2024年02月09日
    浏览(24)
  • Exams/ece241 2014 q7a(Counter1-12)

    Design a 1-12 counter with the following inputs and outputs: Reset Synchronous active-high reset that forces the counter to 1 Enable Set high for the counter to run Clk Positive edge-triggered clock input Q[3:0] The output of the counter c_enable, c_load, c_d[3:0] Control signals going to the provided 4-bit counter, so correct operation can be verified. You

    2024年02月09日
    浏览(30)
  • Exams/ece241 2013 q12

    In this question, you will design a circuit for an 8x1 memory, where writing to the memory is accomplished by shifting-in bits, and reading is \\\"random access\\\", as in a typical RAM. You will then use the circuit to realize a 3-input logic function. First, create an 8-bit shift register with 8 D-type flip-flops. Label the flip-flop outputs from Q[0]...Q[7]. Th

    2024年02月15日
    浏览(31)
  • 历年上午真题笔记(2014年)

    解析:A 网络设计的三层模型 : 接入层:Layer 2 Switching,最终用户被许可接入网络的点,用户通过接入层可以访问网络设备。 汇聚层:Layer2/3 Switching,访问层设备的汇聚点,负责汇接配线单元,利用二、三层技术实现工作组分段及网络故障的隔离,以免对核心层网络设备造成

    2024年02月07日
    浏览(30)
  • 绿色债券数据最新(2014-2023年)

    绿色金融是指通过金融方式促进环保建设和社会经济的可持续发展,引导资金流向于节约资源、保护生态环境等相关的产业,引导企业注重绿色环保,引导消费者绿色消费理念,目的是支持有环境效益的项目,保护环境改善、资源高效利用等推出绿色债券,绿色信贷等相关金

    2024年02月05日
    浏览(31)
  • [春秋云镜]CVE-2014-3529

    Apache POI 3.10.1 之前的 OPC SAX 设置允许远程攻击者通过 OpenXML 文件读取任意文件,该文件包含与 XML 外部实体 (XXE) 问题相关的 XML 外部实体声明和实体引用。 春秋云镜开启靶场: http://eci-2ze9wvzaypj11h8emteu.cloudeci1.ichunqiu.com:8080/ 一:使用python开启一个web服务 python -m http.server 80 二:

    2023年04月19日
    浏览(23)
  • SL651-2014全协议解析

    SL651-2014协议解析 转载请注明来源

    2024年02月12日
    浏览(28)
  • SQL Server 2014安装笔记

    最近要部署一个项目,需要用到SQL Server 2014。我把安装过程简单记录一下,给有需要的朋友吧。 在国内微软的官网下载速度还是比较慢的,我是从 https://msdn.itellyou.cn/下载的。 搜索SQLServer我是下载以下的版本。 为了防止环境不同会遇到不同的情况,我这里说明一下,我用的

    2024年02月13日
    浏览(27)
  • phpmyadmin 文件包含(CVE-2014-8959)

    0x01 漏洞介绍 phpMyAdmin 是phpMyAdmin团队开发的一套免费的、基于Web的MySQL数据库管理工具。该工具能够创建和删除数据库,创建、删除、修改数据库表,执行SQL脚本命令等。 phpMyAdmin的GIS编辑器中 libraries/gis/GIS_Factory.class.php 脚本存在目录遍历漏洞。 远程攻击者可借助特制的 ‘

    2024年02月02日
    浏览(19)
  • SQL Server 2014 各版本介绍

    目前,SQL Server 2014 分为主要版本和专业版。 在选择版本的时候可以根据您具体的需要进行抉择,如果你需要一个免费的数据库管理系统,那么就选择 Compact 版本或 Express 版本;如果不确定你要使用什么版本的话也可以下载一个试用版,SQL Server 2014 试用版的免费使用时间为

    2024年02月15日
    浏览(31)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包