data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v:53: Unsupported: Ignoring delay on this delayed statement.\n        #10 \n        ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v:58: Unsupported: Ignoring delay on this delayed statement.\n        #10\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v:63: Unsupported: Ignoring delay on this delayed statement.\n        #10 \n        ^\n%Warning-STMTDLY: data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v:68: Unsupported: Ignoring delay on this delayed statement.\n        #10\n        ^\n%Error: data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v:73: Unsupported or unknown PLI call: $dumpfile\n            $dumpfile("face_culler_Test.vcd");\n            ^~~~~~~~~\n%Error: data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v:74: Unsupported or unknown PLI call: $dumpvars\n            $dumpvars(0,face_culler_Test);\n            ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/499944578/rtl/test/triangle_pipe/face_culler_Test.v:75: Unsupported: Ignoring delay on this delayed statement.\n            #1;\n            ^\n%Error: Exiting due to 2 error(s), 5 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module face_culler_Test();

    localparam FourFP = 32'h40800000;
    localparam TwoFP = 32'h40000000;
    localparam OneFP = 32'h3f800000;
    localparam ZeroFP = 32'h00000000;
    localparam HalfFP = 32'h3f000000;
    localparam QuarterFP = 32'h3e800000;

    localparam PLUS = 1'b0;
    localparam MINUS = 1'b1;


    localparam TL = 1'b0;
    localparam BL = 1'b1;


    localparam CW = 1'b1 ;
    localparam ACW = 1'b0;


    localparam B = 'b00;
    localparam F = 'b01;
    localparam FB = 'b10;

    reg [63:0] Pa, Pb, Pc;
    wire [65:0] PaRecFN, PbRecFN, PcRecFN;
    reg Enable, windingOrder, origin_location;  
    reg [1:0] Mode;  
    wire cull;
    wire [32:0] TwoArecFN;

    fNToRecFN#(8,24) fNToRecFNax (Pa[63:32], PaRecFN[65:33]);
    fNToRecFN#(8,24) fNToRecFNay (Pa[31:0], PaRecFN[32:0]);
    fNToRecFN#(8,24) fNToRecFNbx (Pb[63:32], PbRecFN[65:33]);
    fNToRecFN#(8,24) fNToRecFNby (Pb[31:0], PbRecFN[32:0]);
    fNToRecFN#(8,24) fNToRecFNcx (Pc[63:32], PcRecFN[65:33]);
    fNToRecFN#(8,24) fNToRecFNcy (Pc[31:0], PcRecFN[32:0]);

    calcArea Area(1'b0, 1'b1, 1'b1, PaRecFN, PbRecFN, PcRecFN, TwoArecFN);
    face_culler DUT(PaRecFN,PbRecFN,PcRecFN,Enable, Mode, windingOrder,origin_location, TwoArecFN[32],cull);

    initial begin
        $display("Starting");
        Enable = 1'b1; 
        Mode = {1'b0,B};
        windingOrder = ACW;
        origin_location = TL;

        Pa = {ZeroFP, ZeroFP};
        Pb = {ZeroFP,  OneFP};
        Pc = { OneFP, ZeroFP};
        #10 
        $display("cull,areaSign: (%b,%b)", cull, TwoArecFN[32]);
        if(~cull) begin
            $display("dont cull front facing, acw, TL tst passed");
        end
        #10

        Pa = {ZeroFP, ZeroFP};
        Pb = { OneFP, ZeroFP};
        Pc = {ZeroFP,  OneFP};
        #10 
        $display("cull,areaSign: (%b,%b)", cull, TwoArecFN[32]);
        if(cull) begin
            $display("cull back facing, acw, TL tst passed");
        end
        #10
        $finish;
    end
    initial
        begin
            $dumpfile("face_culler_Test.vcd");
            $dumpvars(0,face_culler_Test);
            #1;
        end
endmodule
module face_culler_Test();


    localparam FourFP = 32'h40800000;
    localparam TwoFP = 32'h40000000;
    localparam OneFP = 32'h3f800000;
    localparam ZeroFP = 32'h00000000;
    localparam HalfFP = 32'h3f000000;
    localparam QuarterFP = 32'h3e800000;

    localparam PLUS = 1'b0;
    localparam MINUS = 1'b1;


    localparam TL = 1'b0;
    localparam BL = 1'b1;


    localparam CW = 1'b1 ;
    localparam ACW = 1'b0;


    localparam B = 'b00;
    localparam F = 'b01;
    localparam FB = 'b10;

    reg [63:0] Pa, Pb, Pc;
    wire [65:0] PaRecFN, PbRecFN, PcRecFN;
    reg Enable, windingOrder, origin_location;  
    reg [1:0] Mode;  
    wire cull;
    wire [32:0] TwoArecFN;

    fNToRecFN#(8,24) fNToRecFNax (Pa[63:32], PaRecFN[65:33]);
    fNToRecFN#(8,24) fNToRecFNay (Pa[31:0], PaRecFN[32:0]);
    fNToRecFN#(8,24) fNToRecFNbx (Pb[63:32], PbRecFN[65:33]);
    fNToRecFN#(8,24) fNToRecFNby (Pb[31:0], PbRecFN[32:0]);
    fNToRecFN#(8,24) fNToRecFNcx (Pc[63:32], PcRecFN[65:33]);
    fNToRecFN#(8,24) fNToRecFNcy (Pc[31:0], PcRecFN[32:0]);

    calcArea Area(1'b0, 1'b1, 1'b1, PaRecFN, PbRecFN, PcRecFN, TwoArecFN);
    face_culler DUT(PaRecFN,PbRecFN,PcRecFN,Enable, Mode, windingOrder,origin_location, TwoArecFN[32],cull);

    initial begin
        $display("Starting");
        Enable = 1'b1; 
        Mode = {1'b0,B};
        windingOrder = ACW;
        origin_location = TL;

        Pa = {ZeroFP, ZeroFP};
        Pb = {ZeroFP,  OneFP};
        Pc = { OneFP, ZeroFP};
        #10 
        $display("cull,areaSign: (%b,%b)", cull, TwoArecFN[32]);
        if(~cull) begin
            $display("dont cull front facing, acw, TL tst passed");
        end
        #10

        Pa = {ZeroFP, ZeroFP};
        Pb = { OneFP, ZeroFP};
        Pc = {ZeroFP,  OneFP};
        #10 
        $display("cull,areaSign: (%b,%b)", cull, TwoArecFN[32]);
        if(cull) begin
            $display("cull back facing, acw, TL tst passed");
        end
        #10
        $finish;
    end
    initial
        begin
            $dumpfile("face_culler_Test.vcd");
            $dumpvars(0,face_culler_Test);
            #1;
        end
endmodule