[HDLBits] Exams/ece241 2014 q7a

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

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 have the following components available:

  • the 4-bit binary counter (count4) below, which has Enable and synchronous parallel-load inputs (load has higher priority than enable). The count4 module is provided to you. Instantiate it in your circuit.
  • logic gates
module count4(
	input clk,
	input enable,
	input load,
	input [3:0] d,
	output reg [3:0] Q
);

The c_enablec_load, and c_d outputs are the signals that go to the internal counter's enableload, and d inputs, respectively. Their purpose is to allow these signals to be checked for correctness.文章来源地址https://www.toymoban.com/news/detail-705914.html

module top_module (
    input clk,
    input reset,
    input enable,
    output [3:0] Q,
    output c_enable,
    output c_load,
    output [3:0] c_d
); //
    assign c_enable=enable;
    /*
    always@(posedge clk) begin
        if(reset||Q>=12) begin
            c_load<=0;
            c_d<=1;
        end
        else
            c_load<=1;
    end
    */
    assign c_load=(reset||(Q>=12&&enable)) ? 1:0;
    assign c_d=c_load;
    count4 the_counter (clk, c_enable, c_load, c_d,Q);

endmodule

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

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

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

相关文章

  • [HDLBits] Exams/m2014 q3

    Consider the function  f  shown in the Karnaugh map below. Implement this function.  d  is don\\\'t-care, which means you may choose to output whatever value is convenient.

    2024年02月13日
    浏览(24)
  • [HDLBits] Exams/m2014 q4c

    Implement the following circuit:  

    2024年02月12日
    浏览(21)
  • Exams/2014 q4b

    Consider the  n -bit shift register circuit shown below:   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. Connect the  R  inputs to the  SW  switches, clk  

    2024年02月14日
    浏览(27)
  • HDLbits---Verilog Language---Procedures

    2024年02月13日
    浏览(44)
  • Verilog刷题[hdlbits] :Module add

    You are given a module add16 that performs a 16-bit addition. Instantiate two of them to create a 32-bit adder. One add16 module computes the lower 16 bits of the addition result, while the second add16 module computes the upper 16 bits of the result, after receiving the carry-out from the first adder. Your 32-bit adder does not need to handle carry-in (assu

    2024年02月06日
    浏览(33)
  • verilog学习 | HDLBits:在线学习答案

    HDLBits 在提供 Verilog 基础语法教程的同时,还能够在线仿真 Verilog 模块。 以下是各单元解法答案。希望可以帮助您了解 Verilog 的工作原理。 HDLBits 在提供 Verilog 基础语法教程的同时,还能够在线仿真 Verilog 模块。 ⚠️ 注意:顶层的模块名称和端口名称 top_module 不能更改,否

    2024年02月16日
    浏览(25)
  • HDLbits---Verilog Language---module:Hierarchy

    2024年02月15日
    浏览(33)
  • HDLBits-Verilog学习记录 | Verilog Language-Modules(1)

    practice:You may connect signals to the module by port name or port position. For extra practice, try both methods. 两种方法: 1、You may connect signals to the module by port name 注:mod_a的端口与top_module的输入输出端口顺序一致,按照位置从左到右适配 2、port position 注:这里直接将两者进行绑定 practice: Thi

    2024年02月11日
    浏览(28)
  • 【FPGA Verilog开发实战指南】初识Verilog HDL-基础语法

    就是用代码来描述硬件结构 语言有VHDL与Verilog HDL Verilog HDL 是从C语言来的,学的快 ###例子 也叫保留字,一般是小写 module 表示模块的开始 endmodule 模块的结束 模块名 一般与.v文件的名字一致 输入信号 input 输出信号 output 既做输入也做输出 inout 需要一些变量和参数对输

    2024年02月21日
    浏览(34)
  • 【HDLBits 刷题 1】Verilog Language(1)Basics 部分

    目录   写在前面 Basics Simple wire  Four wires  Inverter  AND gate  NOR gate  Declaring wires  7485 chip HDLBits 作为 Verilog 的刷题网站,非常适合初学者拿来练习,不仅可以学到基础的语法,还可以让自己写出的代码更直观,直接映射到电路中,因此在这段时间每周会抽出一点时间来把这个

    2024年02月10日
    浏览(30)

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

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

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

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

二维码1

领取红包

二维码2

领红包