HDLBits(5)----D latch
2021/11/16 23:40:34
本文主要是介绍HDLBits(5)----D latch,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
目录
- 1. D latch
- 2. Exams/m2014 q4d
- 3. Exams/2014 q4a
- 4. Exams/ece241 2014 q
1. D latch
Implement the following circuit:
Note that this is a latch, so a Quartus warning about having inferred a latch is expected.
module top_module ( input d, input ena, output q); always@(*) begin if(ena) q <= d; end endmodule
2. Exams/m2014 q4d
module top_module ( input clk, input in, output out); always@(posedge clk) begin out<= out ^in; end endmodule
3. Exams/2014 q4a
module top_module ( input clk, input w, R, E, L, output reg Q ); wire mid_a; wire mid_b; assign mid_b = L ? R :mid_a; assign mid_a = E ? w :Q; always@(posedge clk) begin Q <= mid_b; end endmodule
4. Exams/ece241 2014 q
module top_module ( input clk, input x, output z ); reg a,b,c; wire D_a,D_b,D_c; assign D_a = x ^a; assign D_b = x & (!b); assign D_c = x | (!c); assign z = !(a|b|c); always @(posedge clk) begin a <= D_a; b <= D_b; c <= D_c; end endmodule
这篇关于HDLBits(5)----D latch的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-23增量更新怎么做?-icode9专业技术文章分享
- 2024-11-23压缩包加密方案有哪些?-icode9专业技术文章分享
- 2024-11-23用shell怎么写一个开机时自动同步远程仓库的代码?-icode9专业技术文章分享
- 2024-11-23webman可以同步自己的仓库吗?-icode9专业技术文章分享
- 2024-11-23在 Webman 中怎么判断是否有某命令进程正在运行?-icode9专业技术文章分享
- 2024-11-23如何重置new Swiper?-icode9专业技术文章分享
- 2024-11-23oss直传有什么好处?-icode9专业技术文章分享
- 2024-11-23如何将oss直传封装成一个组件在其他页面调用时都可以使用?-icode9专业技术文章分享
- 2024-11-23怎么使用laravel 11在代码里获取路由列表?-icode9专业技术文章分享
- 2024-11-22怎么实现ansible playbook 备份代码中命名包含时间戳功能?-icode9专业技术文章分享