[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
复制代码
module top_module (
    input clk,
    input j,
    input k,
    output Q); 
    //Q(~j)(~k)+
    wire d;
    assign d=(Q&(~j)&(~k))|(j&(~k))|(j&k&(~Q));
    always@(posedge clk) begin
        Q<=d;
    end
endmodule
相关推荐
易享电子1 天前
基于单片机电器断路器保护器系统Proteus仿真(含全部资料)
单片机·嵌入式硬件·fpga开发·51单片机·proteus
璞致电子2 天前
fpga开发板ZYNQ 璞致 PZ7010/7020 邮票孔核心板简介-ZYNQ7000系列小系统学习板
linux·嵌入式硬件·学习·fpga开发·fpga·fpga开发板·xilinx开发板
greatofdream2 天前
HDLBit 个人记录
fpga开发
ARM+FPGA+AI工业主板定制专家2 天前
基于JETSON/RK3588机器人高动态双目视觉系统方案
人工智能·机器学习·fpga开发·机器人·自动驾驶
li星野2 天前
打工人日报#20251010
笔记·程序人生·fpga开发·学习方法
国科安芯2 天前
核辐射检测仪中的抗辐照MCU芯片应用探索与挑战应对
网络·人工智能·单片机·嵌入式硬件·安全·fpga开发
晓晓暮雨潇潇2 天前
Serdes专题(3)Lattice Serdes架构
fpga开发·serdes·pcs·latticeecp3
ooo-p2 天前
FPGA学习篇——Verilog学习之分频器的实现
学习·fpga开发
通信小呆呆2 天前
FPGA 中的 AXI 总线介绍
fpga开发
亮锅锅来啦2 天前
Vivado进阶-Fpga中的mem的综合和应用
fpga开发