data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv
1: b"%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:3: syntax error, unexpected IDENTIFIER, expecting PACKAGE-IDENTIFIER or STRING\nimport cam_types::*;\n       ^~~~~~~~~\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:8: syntax error, unexpected '@', expecting ';'\ndefault clocking mon_clk @(posedge gitf.monclk); endclocking\n                         ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:12: syntax error, unexpected '=', expecting IDENTIFIER\n    tr.ltime = itf.timestamp;\n             ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:13: syntax error, unexpected '=', expecting IDENTIFIER\n    tr.rtime = $time;\n             ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:14: syntax error, unexpected '=', expecting IDENTIFIER\n    tr.key = itf.key;\n           ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:15: syntax error, unexpected '=', expecting IDENTIFIER\n    tr.rdata = itf.val_o;\n             ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:16: syntax error, unexpected '=', expecting IDENTIFIER\n    tr.wdata = itf.val_i;\n             ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:17: syntax error, unexpected '=', expecting IDENTIFIER\n    tr.valid_o = itf.valid_o;\n               ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:18: syntax error, unexpected '=', expecting IDENTIFIER\n    tr.tr_type =tre;\n               ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:19: syntax error, unexpected '.', expecting IDENTIFIER\n    gitf.transbox.put(tr);\n                 ^\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:25: syntax error, unexpected '(', expecting IDENTIFIER\n        send_tr(TR_RESET);\n                ^~~~~~~~\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:29: syntax error, unexpected '(', expecting IDENTIFIER\n            send_tr(TR_READ);\n                    ^~~~~~~\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:32: syntax error, unexpected '(', expecting IDENTIFIER\n            send_tr(TR_WRITE);\n                    ^~~~~~~~\n%Error: data/full_repos/permissive/444559342/mp1/cam/grading/transaction_monitor.sv:35: syntax error, unexpected end\nend\n^~~\n%Error: Cannot continue\n"
module transaction_monitor(cam_itf itf, grader_itf gitf);

default clocking mon_clk @(posedge gitf.monclk); endclocking

task automatic send_tr(trans_e tre);
    trans_t tr;
    tr.ltime = itf.timestamp;
    tr.rtime = $time;
    tr.key = itf.key;
    tr.rdata = itf.val_o;
    tr.wdata = itf.val_i;
    tr.valid_o = itf.valid_o;
    tr.tr_type =tre;
    gitf.transbox.put(tr);
endtask

initial forever begin
    @(mon_clk);
    if (!itf.reset_n) begin
        send_tr(TR_RESET);
    end
    else if (itf.valid_i) begin
        if (itf.rw_n) begin
            send_tr(TR_READ);
        end
        else begin
            send_tr(TR_WRITE);
        end
    end
end

endmodule
module transaction_monitor(cam_itf itf, grader_itf gitf);


default clocking mon_clk @(posedge gitf.monclk); endclocking

task automatic send_tr(trans_e tre);
    trans_t tr;
    tr.ltime = itf.timestamp;
    tr.rtime = $time;
    tr.key = itf.key;
    tr.rdata = itf.val_o;
    tr.wdata = itf.val_i;
    tr.valid_o = itf.valid_o;
    tr.tr_type =tre;
    gitf.transbox.put(tr);
endtask

initial forever begin
    @(mon_clk);
    if (!itf.reset_n) begin
        send_tr(TR_RESET);
    end
    else if (itf.valid_i) begin
        if (itf.rw_n) begin
            send_tr(TR_READ);
        end
        else begin
            send_tr(TR_WRITE);
        end
    end
end

endmodule