FPGA/HDLBits

Sim/circuit7

장영현 2023. 6. 20. 20:21
728x90

This is a sequential circuit. Read the simulation waveforms to determine what the circuit does, then implement it.

module top_module (
    input clk,
    input a,
    output q );

    always @(posedge clk)begin
        q <= 1'b1;
        if(a)
            q <= 1'b0;
    end
endmodule