[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
相关推荐
希言自然也3 小时前
FPGA 时序分析(一)
fpga开发
I'm a winner8 小时前
基于FPGA的情绪感知系统设计方案:心理健康监测应用(一)
fpga开发·前沿研究
嵌入式-老费18 小时前
Zynq开发实践(Verilog、仿真、FPGA和芯片设计)
fpga开发
hahaha60161 天前
pcie实现虚拟串口
stm32·单片机·fpga开发
9527华安1 天前
FPGA高端项目:图像采集+Aurora 8B10B+UDP图传架构,基于GTH高速收发器的光口转网口,提供工程源码和技术支持
fpga开发·架构·udp·aurora·gth·高速收发器·aurora 8b10b
徐晓康的博客2 天前
Verilog功能模块--SPI主机和从机(03)--SPI从机设计思路与代码解析
fpga开发·verilog·主机·spi·从机
listhi5203 天前
FPGA设计中的信号完整性量化与优化:探索高速数字系统的关键路径
fpga开发
hahaha60163 天前
xilinx的oddr原语是否可以直接使用verilog实现?
fpga开发
I'm a winner3 天前
FPGA 在情绪识别领域的护理应用(三)
fpga开发·前沿研究
小眼睛FPGA4 天前
【盘古100Pro+开发板实验例程】FPGA学习 | gamma 变化 | 图像实验指导手册
科技·学习·ai·fpga开发·fpga