[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
相关推荐
HIZYUAN1 天前
FPGA/CPLD漫谈:2K LUT的功能定位与典型方案(一)
stm32·单片机·嵌入式硬件·fpga开发·国产mcu+fpga
FPGA_Linuxer1 天前
FPGA开发板 KU5P开发板 图像处理,硬件加速 PCIE3.0 100G光口
fpga开发
szxinmai主板定制专家1 天前
基于ZYNQ MPSOC多通道声音振动采集方案,替代NI9234和B&K
arm开发·人工智能·嵌入式硬件·fpga开发
ZYNQRFSOC2 天前
基于安路PH2A系列FPGA的JESD204B接口测试
嵌入式硬件·fpga开发
szxinmai主板定制专家2 天前
基于RK3588超小体积,轻巧,长续航的无人机AI模块,支持视频跟踪
arm开发·人工智能·嵌入式硬件·fpga开发·无人机
unicrom_深圳市由你创科技3 天前
多 FPGA 之间如何同步与通信?
fpga开发
LCMICRO-133108477463 天前
长芯微LCMDC7616完全P2P替代AD7616,16通道16位模数转换器(ADC)
stm32·嵌入式硬件·fpga开发·硬件工程·模数转换器adc·电力线监测
又菜又爱玩的东哥3 天前
【Verilog 3-8译码器设计与仿真:深入理解case语句与组合逻辑】
fpga开发
Risehuxyc3 天前
<= 是Verilog中的非阻塞赋值操作符
fpga开发
扣脑壳的FPGAer3 天前
傅里叶级数、傅里叶变换、Z变换、数字滤波器
fpga开发·信号处理