data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv
1: b'%Error: data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv:2: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING\nimport bitmap_processing::*;\n       ^~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv:31: Unsupported: classes\n    class VideoVIPCallback extends AxisVideoImageCallback;\n    ^~~~~\n%Error: data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv:31: syntax error, unexpected IDENTIFIER, expecting TYPE-IDENTIFIER\n    class VideoVIPCallback extends AxisVideoImageCallback;\n                                   ^~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv:43: syntax error, unexpected \'=\', expecting \',\' or \';\'\n    AxisVideoImageCallback callbacks = vcallback;\n                                     ^\n%Warning-STMTDLY: data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv:72: Unsupported: Ignoring delay on this delayed statement.\n        forever #5 clk = ~clk;\n                ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv:77: syntax error, unexpected \'@\'\n            @(posedge clk);\n            ^\n%Error: Internal Error: data/full_repos/permissive/487568919/SystemVerilog-Bitmap-Library-AXI-Image-VIP/axi_stream_video_image_example.sv:5: ../V3ParseSym.h:114: Symbols suggest ending CLASS \'VideoVIPCallback\' but parser thinks ending MODULE \'axi_stream_video_image_example\'\nmodule axi_stream_video_image_example();\n       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n'
module axi_stream_video_image_example();

    Bitmap inputBitmap;
    Bitmap outputBitmap;


    logic        clk;
    logic [31:0] m_axis_video_out_tdata;
    logic        m_axis_video_out_tvalid;
    logic        m_axis_video_out_tlast;
    logic        m_axis_video_out_tuser;
    logic        m_axis_video_out_tready;

    logic [31:0] s_axis_video_in_tdata;
    logic        s_axis_video_in_tvalid;
    logic        s_axis_video_in_tlast;
    logic        s_axis_video_in_tuser;
    logic        s_axis_video_in_tready;

    assign s_axis_video_in_tdata  = m_axis_video_out_tdata;
    assign s_axis_video_in_tvalid = m_axis_video_out_tvalid;
    assign s_axis_video_in_tlast  = m_axis_video_out_tlast;
    assign s_axis_video_in_tuser  = m_axis_video_out_tuser;
    assign s_axis_video_in_tready = m_axis_video_out_tready;


    class VideoVIPCallback extends AxisVideoImageCallback;
        virtual task SentCallback(); 
            $display("Sent");
        endtask

        virtual task ReceivedCallback(); 
            $display("Received");
            $stop();
        endtask
    endclass

    VideoVIPCallback vcallback = new();
    AxisVideoImageCallback callbacks = vcallback;

    axis_video_img_in_vip #(
        .IMAGE_WIDTH(960),
        .IMAGE_HEIGHT(540),
        .PIXEL_PER_CLK(1)
    )
    in_vip
    (
        .*,
        .frameBitmap(inputBitmap),
        .callbacks(callbacks)
    );

    axis_video_img_out_vip #(
        .IMAGE_WIDTH(960),
        .IMAGE_HEIGHT(540),
        .PIXEL_PER_CLK(1)
    )
    out_vip
    (
        .*,
        .frameBitmap (outputBitmap),
        .callbacks(callbacks),
    );


    always begin
        clk = 0;
        forever #5 clk = ~clk;
    end

    initial begin
        for(int i = 0; i < 10; i++) begin
            @(posedge clk);
        end
    
        out_vip.ReceiveAndSaveBitmap("out.bmp");
        in_vip.ReadAndSendBitmap("in.bmp");
    end
endmodule
module axi_stream_video_image_example();


    Bitmap inputBitmap;
    Bitmap outputBitmap;


    logic        clk;
    logic [31:0] m_axis_video_out_tdata;
    logic        m_axis_video_out_tvalid;
    logic        m_axis_video_out_tlast;
    logic        m_axis_video_out_tuser;
    logic        m_axis_video_out_tready;

    logic [31:0] s_axis_video_in_tdata;
    logic        s_axis_video_in_tvalid;
    logic        s_axis_video_in_tlast;
    logic        s_axis_video_in_tuser;
    logic        s_axis_video_in_tready;

    assign s_axis_video_in_tdata  = m_axis_video_out_tdata;
    assign s_axis_video_in_tvalid = m_axis_video_out_tvalid;
    assign s_axis_video_in_tlast  = m_axis_video_out_tlast;
    assign s_axis_video_in_tuser  = m_axis_video_out_tuser;
    assign s_axis_video_in_tready = m_axis_video_out_tready;


    class VideoVIPCallback extends AxisVideoImageCallback;
        virtual task SentCallback(); 
            $display("Sent");
        endtask

        virtual task ReceivedCallback(); 
            $display("Received");
            $stop();
        endtask
    endclass

    VideoVIPCallback vcallback = new();
    AxisVideoImageCallback callbacks = vcallback;

    axis_video_img_in_vip #(
        .IMAGE_WIDTH(960),
        .IMAGE_HEIGHT(540),
        .PIXEL_PER_CLK(1)
    )
    in_vip
    (
        .*,
        .frameBitmap(inputBitmap),
        .callbacks(callbacks)
    );

    axis_video_img_out_vip #(
        .IMAGE_WIDTH(960),
        .IMAGE_HEIGHT(540),
        .PIXEL_PER_CLK(1)
    )
    out_vip
    (
        .*,
        .frameBitmap (outputBitmap),
        .callbacks(callbacks),
    );


    always begin
        clk = 0;
        forever #5 clk = ~clk;
    end

    initial begin
        for(int i = 0; i < 10; i++) begin
            @(posedge clk);
        end
    
        out_vip.ReceiveAndSaveBitmap("out.bmp");
        in_vip.ReadAndSendBitmap("in.bmp");
    end
endmodule