aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/examples/ff/ff.v
blob: 1c2710428139b2e42aaa0c3db686fc7c0aa10a5a (plain)
1
2
3
4
5
6
7
8
9
10
11
module top(input clk, input d, input r, output reg q);

always @(posedge clk)
begin
    if(r)
        q <= 1'b0;
    else
        q <= d;
end

endmodule