data/full_repos/permissive/175100691/gpu/lpm/lpm_bustri.v
data/verilator_xmls/c517f4b4-66d4-4ae4-a3ba-9046ee59ffcf.xml
module lpm_bustri (
    tridata,
    data,
    enabletr,
    enabledt,
    result
);


    parameter lpm_width = 1;
    parameter lpm_type = "lpm_bustri";
    parameter lpm_hint = "UNUSED";


    input  [lpm_width-1:0] data;
    input  enabletr;
    input  enabledt;


    output [lpm_width-1:0] result;


    inout  [lpm_width-1:0] tridata;


    reg  [lpm_width-1:0] result;


    logic  enabletr;
    logic  enabledt;

    wire i_enabledt;
    wire i_enabletr;
    assign i_enabledt = enabledt;
    assign i_enabletr = enabletr;



    initial
    begin
        if (lpm_width <= 0)
        begin
            $display("Value of lpm_width parameter must be greater than 0(ERROR)");
            $display("Time: %0t  Instance: %m", $time);
            $finish;
        end
    end


    always @(data or tridata or i_enabletr or i_enabledt)
    begin
        if ((i_enabledt == 1'b0) && (i_enabletr == 1'b1))
        begin
            result = tridata;
        end
        else if ((i_enabledt == 1'b1) && (i_enabletr == 1'b1))
        begin
            result = data;
        end
        else
        begin
            result = {lpm_width{1'b0}};
        end
    end


    assign tridata = (i_enabledt == 1) ? data : {lpm_width{1'b0}};

endmodule
module lpm_bustri (
    tridata,
    data,
    enabletr,
    enabledt,
    result
);



    parameter lpm_width = 1;
    parameter lpm_type = "lpm_bustri";
    parameter lpm_hint = "UNUSED";


    input  [lpm_width-1:0] data;
    input  enabletr;
    input  enabledt;


    output [lpm_width-1:0] result;


    inout  [lpm_width-1:0] tridata;


    reg  [lpm_width-1:0] result;


    logic  enabletr;
    logic  enabledt;

    wire i_enabledt;
    wire i_enabletr;
    assign i_enabledt = enabledt;
    assign i_enabletr = enabletr;



    initial
    begin
        if (lpm_width <= 0)
        begin
            $display("Value of lpm_width parameter must be greater than 0(ERROR)");
            $display("Time: %0t  Instance: %m", $time);
            $finish;
        end
    end


    always @(data or tridata or i_enabletr or i_enabledt)
    begin
        if ((i_enabledt == 1'b0) && (i_enabletr == 1'b1))
        begin
            result = tridata;
        end
        else if ((i_enabledt == 1'b1) && (i_enabletr == 1'b1))
        begin
            result = data;
        end
        else
        begin
            result = {lpm_width{1'b0}};
        end
    end


    assign tridata = (i_enabledt == 1) ? data : {lpm_width{1'b0}};

endmodule