[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 天前
蒙哥马利模乘FPGA优化实战
fpga开发·密码学
星夜离尘561 天前
FPGA 多通道 DAC 目标码影子寄存器:成组提交、同拍写入与快照边界
fpga开发
t_niu_niu1 天前
基于多帧累加平均的图像传感器暗电流抑制方法与 FPGA 实现
fpga开发·ram·fpn·固定模式噪声·image sensor
幻智星科技1 天前
FPGA纯硬件UDP桥接:微秒级响应新范式
c++·fpga开发·硬件架构
小蘇的FPGA1 天前
基于FPGA实现PCIe H2C过程中TAG的一种管理方法
fpga开发
威嵌神州1 天前
一台加固平板,能替掉几台现场设备?
嵌入式硬件·fpga开发·电脑·平板
幻智星科技2 天前
树形架构破解FPGA扇出瓶颈
fpga开发·硬件架构
FPGA小迷弟2 天前
FPGA开发Vivado Block Design/Vitis/SDK/xlinx/开发教程,保姆级别,一看就会!
网络协议·tcp/ip·fpga开发·verilog·fpga
FPGA小迷弟2 天前
基于FPGA实现智能网卡的概念,什么是智能网卡
网络协议·tcp/ip·fpga开发·verilog·fpga
好焊孙辉2 天前
螺柱焊机哪家质量好
python·fpga开发