logic_cond.v 271 Bytes
Newer Older
1 2
module Example(inp, out);
    parameter ENABLED = 1;
3
    localparam [0:0] DEFAULT = 1'b0;
4 5 6 7 8 9
    input wire inp;
    output reg out;
    generate
        if (ENABLED)
            always @* out = inp;
        else
10
            initial out = DEFAULT;
11 12
    endgenerate
endmodule