2020-11-24 17:27:58 -07:00
|
|
|
module Example(inp, out);
|
|
|
|
|
parameter ENABLED = 1;
|
2021-01-25 19:23:54 -05:00
|
|
|
localparam [0:0] DEFAULT = 1'b0;
|
2020-11-24 17:27:58 -07:00
|
|
|
input wire inp;
|
|
|
|
|
output reg out;
|
|
|
|
|
generate
|
2023-12-26 09:21:19 -07:00
|
|
|
if (ENABLED) begin
|
|
|
|
|
reg start;
|
|
|
|
|
always @(inp, start) out = inp;
|
|
|
|
|
initial start = 0;
|
|
|
|
|
end
|
2020-11-24 17:27:58 -07:00
|
|
|
else
|
2021-01-25 19:23:54 -05:00
|
|
|
initial out = DEFAULT;
|
2020-11-24 17:27:58 -07:00
|
|
|
endgenerate
|
|
|
|
|
endmodule
|