[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
相关推荐
s090713616 分钟前
常用FPGA实现的图像处理算法
图像处理·算法·fpga开发
s09071367 小时前
FPGA实现Gamma校正的系统性指南
图像处理·fpga开发·gama校正
读书点滴7 小时前
FPGA中如何获取任何一条路径的延时
fpga开发
minglie17 小时前
嵌入式协程AlarmProtothread
mcu·fpga开发
Godspeed Zhao8 小时前
自动驾驶中的传感器技术79——Sensor Fusion(2)
人工智能·fpga开发·自动驾驶
ShiMetaPi9 小时前
GM-3568JHF丨ARM+FPGA异构开发板系列教程:外设教程 07 音频
arm开发·fpga开发·音视频·fpga·rk3568
bitQ18 小时前
ZBoot-MP:ZYNQ 多介质 Linux 启动与升级解决方案
fpga开发
我爱C编程1 天前
【1.22】基于FPGA的Costas环开发课程学习总结
学习·fpga开发·costas环
FPGA_无线通信1 天前
USB3.0 GPIF II接口
fpga开发
Terasic友晶科技1 天前
5-DE10-Nano的HDMI方块移动案例——基于FPGA的I2C控制模块设计
单片机·嵌入式硬件·fpga开发·时钟分频·hdmi方块移动·i2c控制模块设计·配置寄存器