data/full_repos/permissive/173469592/emulate_pull_down.v
data/verilator_xmls/1e20fa99-3cda-4821-822b-520d8468b9f5.xml
module emulate_pull_down #(parameter WIDTH = 1) (
    input                  clk,
    inout      [WIDTH-1:0] in,
    output reg [WIDTH-1:0] out
);

    reg [3:0] counter;
    reg pull_low;

    assign in = {WIDTH {pull_low ? 1'b0 : 1'bz}};

    always @(posedge clk) begin
        if (counter < 3)
            pull_low <= 1;
        else begin
            pull_low <= 0;
            out <= in;
        end

        counter <= counter + 1;
    end
endmodule
module emulate_pull_down #(parameter WIDTH = 1) (
    input                  clk,
    inout      [WIDTH-1:0] in,
    output reg [WIDTH-1:0] out
);


    reg [3:0] counter;
    reg pull_low;

    assign in = {WIDTH {pull_low ? 1'b0 : 1'bz}};

    always @(posedge clk) begin
        if (counter < 3)
            pull_low <= 1;
        else begin
            pull_low <= 0;
            out <= in;
        end

        counter <= counter + 1;
    end
endmodule