data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv
1: b'%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:3: Cannot find include file: include/fifo_itf.sv\n`include "include/fifo_itf.sv" \n         ^~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/444559342/mp1/fifo/grading,data/full_repos/permissive/444559342/include/fifo_itf.sv\n             data/full_repos/permissive/444559342/mp1/fifo/grading,data/full_repos/permissive/444559342/include/fifo_itf.sv.v\n             data/full_repos/permissive/444559342/mp1/fifo/grading,data/full_repos/permissive/444559342/include/fifo_itf.sv.sv\n             include/fifo_itf.sv\n             include/fifo_itf.sv.v\n             include/fifo_itf.sv.sv\n             obj_dir/include/fifo_itf.sv\n             obj_dir/include/fifo_itf.sv.v\n             obj_dir/include/fifo_itf.sv.sv\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:4: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING\nimport fifo_types::*;\n       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:9: syntax error, unexpected IDENTIFIER, expecting \')\'\ntask send_tr(trans_e tr_op);\n                     ^~~~~\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:11: syntax error, unexpected \'=\', expecting IDENTIFIER\n    tr.ltime = itf.timestamp;\n             ^\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:12: syntax error, unexpected \'=\', expecting IDENTIFIER\n    tr.rtime = $time;\n             ^\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:13: syntax error, unexpected \'=\', expecting IDENTIFIER\n    tr.tr_type = tr_op;\n               ^\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:14: syntax error, unexpected \'=\', expecting IDENTIFIER\n    tr.enq_word = itf.data_i;\n                ^\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:15: syntax error, unexpected \'=\', expecting IDENTIFIER\n    tr.deq_word = itf.data_o;\n                ^\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:16: syntax error, unexpected \'.\', expecting IDENTIFIER\n    gitf.transbox.put(tr);\n                 ^\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:24: syntax error, unexpected $display\n        $display("MON: %0t: Reset Detected", $time);\n        ^~~~~~~~\n%Error: data/full_repos/permissive/444559342/mp1/fifo/grading/transaction_monitor.sv:28: syntax error, unexpected unique\n        unique case ({itf.valid_i, itf.yumi})\n        ^~~~~~\n%Error: Cannot continue\n'
module transaction_monitor(fifo_itf itf, grader_itf gitf);

task send_tr(trans_e tr_op);
    automatic trans_t tr;
    tr.ltime = itf.timestamp;
    tr.rtime = $time;
    tr.tr_type = tr_op;
    tr.enq_word = itf.data_i;
    tr.deq_word = itf.data_o;
    gitf.transbox.put(tr);
    $display("MON: %0t: %s Tr Sent", $time, tr_op.name);
endtask

default clocking mon_clk @(negedge gitf.monclk); endclocking
initial forever begin
    @(mon_clk iff (!itf.reset_n || itf.valid_i || itf.yumi));
    if (!itf.reset_n) begin
        $display("MON: %0t: Reset Detected", $time);
        send_tr(TR_RESET);
    end
    else begin
        unique case ({itf.valid_i, itf.yumi})
            2'b00: begin
                $display("MON: %0t: Grader Error Detected %s %0d", $time,
                        `__FILE__, `__LINE__);
            end
            2'b10: begin
                $display("MON: %0t: Enqueue '%0d' Detected", $time, itf.data_i);
                send_tr(TR_ENQUEUE);
            end
            2'b11: begin
                $display("MON: %0t: Enqueue '%0d' Detected", $time, itf.data_i);
                $display("MON: %0t: Dequeue '%0d' Detected", $time, itf.data_o);
                send_tr(TR_BOTH);
            end
            2'b01: begin
                $display("MON: %0t: Dequeue '%0d' Detected", $time, itf.data_o);
                send_tr(TR_DEQUEUE);
            end
        endcase
    end
end

endmodule
module transaction_monitor(fifo_itf itf, grader_itf gitf);


task send_tr(trans_e tr_op);
    automatic trans_t tr;
    tr.ltime = itf.timestamp;
    tr.rtime = $time;
    tr.tr_type = tr_op;
    tr.enq_word = itf.data_i;
    tr.deq_word = itf.data_o;
    gitf.transbox.put(tr);
    $display("MON: %0t: %s Tr Sent", $time, tr_op.name);
endtask

default clocking mon_clk @(negedge gitf.monclk); endclocking
initial forever begin
    @(mon_clk iff (!itf.reset_n || itf.valid_i || itf.yumi));
    if (!itf.reset_n) begin
        $display("MON: %0t: Reset Detected", $time);
        send_tr(TR_RESET);
    end
    else begin
        unique case ({itf.valid_i, itf.yumi})
            2'b00: begin
                $display("MON: %0t: Grader Error Detected %s %0d", $time,
                        `__FILE__, `__LINE__);
            end
            2'b10: begin
                $display("MON: %0t: Enqueue '%0d' Detected", $time, itf.data_i);
                send_tr(TR_ENQUEUE);
            end
            2'b11: begin
                $display("MON: %0t: Enqueue '%0d' Detected", $time, itf.data_i);
                $display("MON: %0t: Dequeue '%0d' Detected", $time, itf.data_o);
                send_tr(TR_BOTH);
            end
            2'b01: begin
                $display("MON: %0t: Dequeue '%0d' Detected", $time, itf.data_o);
                send_tr(TR_DEQUEUE);
            end
        endcase
    end
end

endmodule