[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
相关推荐
cmc10287 小时前
292.三段式状态机第三段时序逻辑用state_c与_n的差异分析
fpga开发
qq_150841998 小时前
用verilog语言在Quartus Prime Lite 18中对CPLD EPM570T100C5进行编程
verilog·quartus·cpld
智塑未来2 天前
FPGA开发板怎么选?先看资质、案例与研发底盘
fpga开发
minglie12 天前
黑金AX301的SDRAM
fpga开发
hahaha60162 天前
HLS高层次综合设计技巧--高层次综合设计探讨
fpga开发
minglie12 天前
黑金AX301的EEPROM 24LC04
fpga开发
Hello-FPGA2 天前
量子计算滨松c15550-22up单光子相机与PCIe1004采集卡
人工智能·计算机视觉·fpga开发
9527华安3 天前
FPGA实现CameraLink转SFP光口,基于GT Transceivers Wizard Aurora8B10B编解码架构,提供4套工程源码和技术支持
fpga开发·sfp·cameralink·aurora8b10b·transceivers
ALINX技术博客3 天前
【期刊共读】如何应对 FPGA 短缺常态?
嵌入式硬件·fpga开发·fpga
156082072194 天前
短波接收机灵敏度测试
fpga开发