data/full_repos/permissive/509468557/generators/testchipip/src/main/resources/testchipip/vsrc/SimDromajoCosimBlackBox.v
1: b"%Error: data/full_repos/permissive/509468557/generators/testchipip/src/main/resources/testchipip/vsrc/SimDromajoCosimBlackBox.v:22: Parameter without initial value is never given value (IEEE 1800-2017 6.20.1): 'COMMIT_WIDTH'\n                                                                                                                                  : ... In instance SimDromajoCosimBlackBox\n    #(parameter COMMIT_WIDTH, XLEN, INST_BITS, HARTID_LEN)\n                ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/509468557/generators/testchipip/src/main/resources/testchipip/vsrc/SimDromajoCosimBlackBox.v:22: Parameter without initial value is never given value (IEEE 1800-2017 6.20.1): 'XLEN'\n                                                                                                                                  : ... In instance SimDromajoCosimBlackBox\n    #(parameter COMMIT_WIDTH, XLEN, INST_BITS, HARTID_LEN)\n                              ^~~~\n%Error: data/full_repos/permissive/509468557/generators/testchipip/src/main/resources/testchipip/vsrc/SimDromajoCosimBlackBox.v:22: Parameter without initial value is never given value (IEEE 1800-2017 6.20.1): 'INST_BITS'\n                                                                                                                                  : ... In instance SimDromajoCosimBlackBox\n    #(parameter COMMIT_WIDTH, XLEN, INST_BITS, HARTID_LEN)\n                                    ^~~~~~~~~\n%Error: data/full_repos/permissive/509468557/generators/testchipip/src/main/resources/testchipip/vsrc/SimDromajoCosimBlackBox.v:22: Parameter without initial value is never given value (IEEE 1800-2017 6.20.1): 'HARTID_LEN'\n                                                                                                                                  : ... In instance SimDromajoCosimBlackBox\n    #(parameter COMMIT_WIDTH, XLEN, INST_BITS, HARTID_LEN)\n                                               ^~~~~~~~~~\n%Error: Exiting due to 4 error(s)\n"
module SimDromajoCosimBlackBox
    #(parameter COMMIT_WIDTH, XLEN, INST_BITS, HARTID_LEN)
(
    input clock,
    input reset,

    input [          (COMMIT_WIDTH) - 1:0] valid  ,
    input [           (HARTID_LEN) - 1:0] hartid ,
    input [     (XLEN*COMMIT_WIDTH) - 1:0] pc     ,
    input [(INST_BITS*COMMIT_WIDTH) - 1:0] inst   ,
    input [     (XLEN*COMMIT_WIDTH) - 1:0] wdata  ,
    input [     (XLEN*COMMIT_WIDTH) - 1:0] mstatus,
    input [          (COMMIT_WIDTH) - 1:0] check  ,

    input           int_xcpt,
    input [XLEN - 1:0] cause
);
    string __dtb_file, __rom_file, __bin_file, __mmio_start, __mmio_end;
    int __itr, __fail;

    initial begin

        if (!$value$plusargs("drj_dtb=%s", __dtb_file)) begin
            __dtb_file = "";
        end
        if (!$value$plusargs("drj_rom=%s", __rom_file)) begin
            __rom_file = "";
        end
        if (!$value$plusargs("drj_bin=%s", __bin_file)) begin
            __bin_file = "";
        end
        __fail = dromajo_init(
            __rom_file,
            __dtb_file,
            __bin_file);
        if (__fail != 0) begin
            $display("FAIL: Dromajo Simulation Failed");
            $fatal;
        end
    end

    always @(posedge clock) begin
        if (!reset) begin
            for (__itr=0; __itr<COMMIT_WIDTH; __itr=__itr+1) begin
                if (valid[__itr]) begin
                    __fail = dromajo_step(
                        hartid,
                        pc[((__itr+1)*XLEN - 1)-:XLEN],
                        inst[((__itr+1)*INST_BITS - 1)-:INST_BITS],
                        wdata[((__itr+1)*XLEN - 1)-:XLEN],
                        mstatus[((__itr+1)*XLEN - 1)-:XLEN],
                        check[__itr]);
                    if (__fail != 0) begin
                        $display("FAIL: Dromajo Simulation Failed with exit code: %d", __fail);
                        $fatal;
                    end
                end
            end

            if (int_xcpt) begin
                dromajo_raise_trap(
                    hartid,
                    cause
                );
            end
        end
    end

endmodule
module SimDromajoCosimBlackBox
    #(parameter COMMIT_WIDTH, XLEN, INST_BITS, HARTID_LEN)
(
    input clock,
    input reset,

    input [          (COMMIT_WIDTH) - 1:0] valid  ,
    input [           (HARTID_LEN) - 1:0] hartid ,
    input [     (XLEN*COMMIT_WIDTH) - 1:0] pc     ,
    input [(INST_BITS*COMMIT_WIDTH) - 1:0] inst   ,
    input [     (XLEN*COMMIT_WIDTH) - 1:0] wdata  ,
    input [     (XLEN*COMMIT_WIDTH) - 1:0] mstatus,
    input [          (COMMIT_WIDTH) - 1:0] check  ,

    input           int_xcpt,
    input [XLEN - 1:0] cause
);

    string __dtb_file, __rom_file, __bin_file, __mmio_start, __mmio_end;
    int __itr, __fail;

    initial begin

        if (!$value$plusargs("drj_dtb=%s", __dtb_file)) begin
            __dtb_file = "";
        end
        if (!$value$plusargs("drj_rom=%s", __rom_file)) begin
            __rom_file = "";
        end
        if (!$value$plusargs("drj_bin=%s", __bin_file)) begin
            __bin_file = "";
        end
        __fail = dromajo_init(
            __rom_file,
            __dtb_file,
            __bin_file);
        if (__fail != 0) begin
            $display("FAIL: Dromajo Simulation Failed");
            $fatal;
        end
    end

    always @(posedge clock) begin
        if (!reset) begin
            for (__itr=0; __itr<COMMIT_WIDTH; __itr=__itr+1) begin
                if (valid[__itr]) begin
                    __fail = dromajo_step(
                        hartid,
                        pc[((__itr+1)*XLEN - 1)-:XLEN],
                        inst[((__itr+1)*INST_BITS - 1)-:INST_BITS],
                        wdata[((__itr+1)*XLEN - 1)-:XLEN],
                        mstatus[((__itr+1)*XLEN - 1)-:XLEN],
                        check[__itr]);
                    if (__fail != 0) begin
                        $display("FAIL: Dromajo Simulation Failed with exit code: %d", __fail);
                        $fatal;
                    end
                end
            end

            if (int_xcpt) begin
                dromajo_raise_trap(
                    hartid,
                    cause
                );
            end
        end
    end

endmodule