top.v 301 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
module dff (clk, d, q);
    input clk;
    input d;
    output reg q;

    always @(posedge clk)
         q <= d;
endmodule


module top (
input clk,
input a,
output b
);

dff u_dff (
        .clk (clk ),
19
`ifndef BUG
20
        .d (1'b0 ),
21 22 23
`else
        .d (a ),
`endif
24 25 26 27
        .q (b )
    );

endmodule