`timescale 1ns / 1ps
module task3(output reg y);
initial begin
y = 0; // Initialize the output signal
end
integer counter; // Declare a counter
parameter MAX_CYCLES = 100; // Set the maximum number of cycles
always begin
#5 y = ~y; // Toggle the clock signal every 5 ns (100 MHz)
counter = counter + 1; // Increment the counter
if (counter >= MAX_CYCLES) begin
$finish; // Terminate the simulation when the max cycles is reached
end
end
initial begin
counter = 0; // Initialize the counter
end
endmodule