我是靠谱客的博主 受伤过客,这篇文章主要介绍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.
在这里插入图片描述


前言

三个输入,包括一个时钟clk,一个主输入信号j,一个副输入信号k;一个输出信号Q。

代码

module top_module (
    input clk,
    input j,
    input k,
    output Q); 
    always@(posedge clk)begin
        Q<=(j^k)?j:k?(~Q):Q;
    end
endmodule

总结

观察真值表找出输出值与输入值之间的联系,以及判断语句的复用。

最后

以上就是受伤过客最近收集整理的关于HDLBits练习——Exams/ece241 2013 q7前言代码总结的全部内容,更多相关HDLBits练习——Exams/ece241内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(137)

评论列表共有 0 条评论

立即
投稿
返回
顶部