data/full_repos/permissive/50609942/router.v
1: b'%Error: data/full_repos/permissive/50609942/router.v:8: Cannot find include file: constants.v\n`include "constants.v"\n         ^~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/50609942,data/full_repos/permissive/50609942/constants.v\n             data/full_repos/permissive/50609942,data/full_repos/permissive/50609942/constants.v.v\n             data/full_repos/permissive/50609942,data/full_repos/permissive/50609942/constants.v.sv\n             constants.v\n             constants.v.v\n             constants.v.sv\n             obj_dir/constants.v\n             obj_dir/constants.v.v\n             obj_dir/constants.v.sv\n%Error: data/full_repos/permissive/50609942/router.v:9: Cannot find include file: util.v\n`include "util.v"\n         ^~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:14: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n                output [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_out;\n                          ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:14: syntax error, unexpected \'*\', expecting TYPE-IDENTIFIER\n                output [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_out;\n                                         ^\n%Error: data/full_repos/permissive/50609942/router.v:14: Define or directive not defined: \'`FLIT_SIZE\'\n                output [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_out;\n                                          ^~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:15: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n                output [0:VC_NUM*`IN_OUTPORT_CNT-1] credit;\n                                 ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:16: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n                input [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_in;\n                         ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:16: syntax error, unexpected \'*\', expecting TYPE-IDENTIFIER\n                input [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_in;\n                                        ^\n%Error: data/full_repos/permissive/50609942/router.v:16: Define or directive not defined: \'`FLIT_SIZE\'\n                input [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_in;\n                                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:17: Define or directive not defined: \'`IN_OUTPORT_CNT_BIN\'\n                input [1:`IN_OUTPORT_CNT_BIN] data;\n                         ^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:17: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n                input [1:`IN_OUTPORT_CNT_BIN] data;\n                                            ^\n%Error: data/full_repos/permissive/50609942/router.v:18: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n                input [0:VC_NUM*`IN_OUTPORT_CNT-1] next_router_credit;\n                                ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:19: Define or directive not defined: \'`ROUTERS_CNT_BIN\'\n                input [1:`ROUTERS_CNT_BIN] load;\n                         ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:19: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n                input [1:`ROUTERS_CNT_BIN] load;\n                                         ^\n%Error: data/full_repos/permissive/50609942/router.v:28: Define or directive not defined: \'`IN_OUTPORT_CNT_BIN\'\nreg [0:`IN_OUTPORT_CNT_BIN-1] TABLE_ARRAY [0:`TABLE_ROWS-1];\n       ^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:28: Define or directive not defined: \'`TABLE_ROWS\'\nreg [0:`IN_OUTPORT_CNT_BIN-1] TABLE_ARRAY [0:`TABLE_ROWS-1];\n                                             ^~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:29: Define or directive not defined: \'`IN_OUTPORT_CNT_BIN\'\nwire[0:`IN_OUTPORT_CNT_BIN-1] NEXT_TABLE_ARRAY [0:`TABLE_ROWS-1];\n       ^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:29: Define or directive not defined: \'`TABLE_ROWS\'\nwire[0:`IN_OUTPORT_CNT_BIN-1] NEXT_TABLE_ARRAY [0:`TABLE_ROWS-1];\n                                                  ^~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:31: Define or directive not defined: \'`OCCUPIEDS_SIZE\'\nreg [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] occupieds;\n       ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:31: syntax error, unexpected \'*\', expecting TYPE-IDENTIFIER\nreg [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] occupieds;\n                      ^\n%Error: data/full_repos/permissive/50609942/router.v:31: Define or directive not defined: \'`IN_OUTPORT_CNT\'\nreg [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] occupieds;\n                       ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:32: Define or directive not defined: \'`OCCUPIEDS_SIZE\'\nwire [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] nxt_occupieds;\n        ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:32: syntax error, unexpected \'*\', expecting TYPE-IDENTIFIER\nwire [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] nxt_occupieds;\n                       ^\n%Error: data/full_repos/permissive/50609942/router.v:32: Define or directive not defined: \'`IN_OUTPORT_CNT\'\nwire [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] nxt_occupieds;\n                        ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:36: Define or directive not defined: \'`TABLE_ROWS\'\n    for(tmp=0; tmp<`TABLE_ROWS; tmp=tmp+1)\n                   ^~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:36: syntax error, unexpected \';\', expecting TYPE-IDENTIFIER\n    for(tmp=0; tmp<`TABLE_ROWS; tmp=tmp+1)\n                              ^\n%Error: data/full_repos/permissive/50609942/router.v:41: Define or directive not defined: \'`IN_OUTPORT_CNT_BIN\'\n            TABLE_ARRAY[tmp] <= {`IN_OUTPORT_CNT_BIN{1\'b0}};\n                                 ^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:51: Define or directive not defined: \'`OCCUPIEDS_SIZE\'\n      occupieds <= {`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM{1\'b0}};\n                    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:51: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n      occupieds <= {`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM{1\'b0}};\n                                    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:58: Define or directive not defined: \'`TABLE_ROWS\'\n    for(i = 0; i <`TABLE_ROWS; i = i + 1)begin : GEN_NEXT_TABLE_ARRAY\n                  ^~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:65: Define or directive not defined: \'`MAKE_ARRAY\'\n`MAKE_ARRAY(credit_array, credit, `IN_OUTPORT_CNT, VC_NUM, GEN_CREDIT)\n^~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:65: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n`MAKE_ARRAY(credit_array, credit, `IN_OUTPORT_CNT, VC_NUM, GEN_CREDIT)\n                                  ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:67: Define or directive not defined: \'`MAKE_VECTOR\'\n`MAKE_VECTOR(TABLE_VECTOR, TABLE_ARRAY, `TABLE_ROWS, `IN_OUTPORT_CNT_BIN, GEN_TABLE_VECTOR)\n^~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:67: Define or directive not defined: \'`TABLE_ROWS\'\n`MAKE_VECTOR(TABLE_VECTOR, TABLE_ARRAY, `TABLE_ROWS, `IN_OUTPORT_CNT_BIN, GEN_TABLE_VECTOR)\n                                        ^~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:67: Define or directive not defined: \'`IN_OUTPORT_CNT_BIN\'\n`MAKE_VECTOR(TABLE_VECTOR, TABLE_ARRAY, `TABLE_ROWS, `IN_OUTPORT_CNT_BIN, GEN_TABLE_VECTOR)\n                                                     ^~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:69: Define or directive not defined: \'`MAKE_ARRAY_1BASED\'\n`MAKE_ARRAY_1BASED(flit_in_array, flit_in, `IN_OUTPORT_CNT, `FLIT_SIZE, GEN_FLIT_IN1)\n^~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:69: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n`MAKE_ARRAY_1BASED(flit_in_array, flit_in, `IN_OUTPORT_CNT, `FLIT_SIZE, GEN_FLIT_IN1)\n                                           ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:69: Define or directive not defined: \'`FLIT_SIZE\'\n`MAKE_ARRAY_1BASED(flit_in_array, flit_in, `IN_OUTPORT_CNT, `FLIT_SIZE, GEN_FLIT_IN1)\n                                                            ^~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:71: Define or directive not defined: \'`FLIT_SIZE\'\nwire [1:`FLIT_SIZE*VC_NUM] flit_out_each_in_port [0:`IN_OUTPORT_CNT-1];\n        ^~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:71: Define or directive not defined: \'`IN_OUTPORT_CNT\'\nwire [1:`FLIT_SIZE*VC_NUM] flit_out_each_in_port [0:`IN_OUTPORT_CNT-1];\n                                                    ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:73: Define or directive not defined: \'`IN_OUTPORT_CNT\'\nwire [0:VC_NUM-1] isnew_each_in_port [0:`IN_OUTPORT_CNT-1];\n                                        ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:74: Define or directive not defined: \'`MAKE_VECTOR\'\n`MAKE_VECTOR(isnew_vector, isnew_each_in_port, `IN_OUTPORT_CNT, VC_NUM, GEN_ISNEW_VECTOR)\n^~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:74: syntax error, unexpected \'(\'\n`MAKE_VECTOR(isnew_vector, isnew_each_in_port, `IN_OUTPORT_CNT, VC_NUM, GEN_ISNEW_VECTOR)\n             ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:74: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n`MAKE_VECTOR(isnew_vector, isnew_each_in_port, `IN_OUTPORT_CNT, VC_NUM, GEN_ISNEW_VECTOR)\n                                               ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:76: Define or directive not defined: \'`IN_OUTPORT_CNT\'\nwire [0:`IN_OUTPORT_CNT * VC_NUM -1] credit_for_inputs;\n        ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:77: Define or directive not defined: \'`IN_OUTPORT_CNT\'\nwire [0:`IN_OUTPORT_CNT * VC_NUM -1] nxt_routers_credits;\n        ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:77: syntax error, unexpected \'*\', expecting TYPE-IDENTIFIER\nwire [0:`IN_OUTPORT_CNT * VC_NUM -1] nxt_routers_credits;\n                        ^\n%Error: data/full_repos/permissive/50609942/router.v:78: Define or directive not defined: \'`IN_OUTPORT_CNT\'\nwire [0:VC_NUM-1] credit_next_router [0:`IN_OUTPORT_CNT];\n                                        ^~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/50609942/router.v:78: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\nwire [0:VC_NUM-1] credit_next_router [0:`IN_OUTPORT_CNT];\n                                                       ^\n%Error: data/full_repos/permissive/50609942/router.v:81: Define or directive not defined: \'`IN_OUTPORT_CNT\'\n    for(i = 0; i < `IN_OUTPORT_CNT; i = i + 1)begin:GEN_IN_PORT\n                   ^~~~~~~~~~~~~~~\n%Error: Exiting due to too many errors encountered; --error-limit=50\n'
module  router(flit_out, credit, flit_in, data, next_router_credit, load, write,
                init, clock, reset);
parameter CREDIT_DELAY = 16;
parameter VC_NUM = 4;
                output [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_out;
                output [0:VC_NUM*`IN_OUTPORT_CNT-1] credit;
                input [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_in;
                input [1:`IN_OUTPORT_CNT_BIN] data;
                input [0:VC_NUM*`IN_OUTPORT_CNT-1] next_router_credit;
                input [1:`ROUTERS_CNT_BIN] load;
                input write;
                input init;
                input clock;
                input reset;


reg [0:`IN_OUTPORT_CNT_BIN-1] TABLE_ARRAY [0:`TABLE_ROWS-1];
wire[0:`IN_OUTPORT_CNT_BIN-1] NEXT_TABLE_ARRAY [0:`TABLE_ROWS-1];

reg [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] occupieds;
wire [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] nxt_occupieds;

genvar tmp;
generate
    for(tmp=0; tmp<`TABLE_ROWS; tmp=tmp+1)
    begin
		always @(posedge clock or posedge reset)
		begin
        if ( reset ) 
            TABLE_ARRAY[tmp] <= {`IN_OUTPORT_CNT_BIN{1'b0}};
        else
            TABLE_ARRAY[tmp] <= NEXT_TABLE_ARRAY[tmp];
		end
    end
endgenerate

always @(posedge clock or posedge reset)
begin
    if(reset)
      occupieds <= {`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM{1'b0}};
    else
      occupieds <= nxt_occupieds;
end

genvar i;
generate
    for(i = 0; i <`TABLE_ROWS; i = i + 1)begin : GEN_NEXT_TABLE_ARRAY
        assign NEXT_TABLE_ARRAY[i] = ((init == 1'b0) ? TABLE_ARRAY[i] : (write == 1'b1 && load == i) ? data : TABLE_ARRAY[i]);
    end
endgenerate

genvar util_genvar;

`MAKE_ARRAY(credit_array, credit, `IN_OUTPORT_CNT, VC_NUM, GEN_CREDIT)

`MAKE_VECTOR(TABLE_VECTOR, TABLE_ARRAY, `TABLE_ROWS, `IN_OUTPORT_CNT_BIN, GEN_TABLE_VECTOR)

`MAKE_ARRAY_1BASED(flit_in_array, flit_in, `IN_OUTPORT_CNT, `FLIT_SIZE, GEN_FLIT_IN1)

wire [1:`FLIT_SIZE*VC_NUM] flit_out_each_in_port [0:`IN_OUTPORT_CNT-1];

wire [0:VC_NUM-1] isnew_each_in_port [0:`IN_OUTPORT_CNT-1];
`MAKE_VECTOR(isnew_vector, isnew_each_in_port, `IN_OUTPORT_CNT, VC_NUM, GEN_ISNEW_VECTOR)

wire [0:`IN_OUTPORT_CNT * VC_NUM -1] credit_for_inputs;
wire [0:`IN_OUTPORT_CNT * VC_NUM -1] nxt_routers_credits;
wire [0:VC_NUM-1] credit_next_router [0:`IN_OUTPORT_CNT];

generate
    for(i = 0; i < `IN_OUTPORT_CNT; i = i + 1)begin:GEN_IN_PORT
        in_port #(.CREDIT_DELAY(CREDIT_DELAY),.VC_NUM(VC_NUM)) m(
            .credit(credit_array[i]),
                    .flit_out(flit_out_each_in_port[i]),
                    .is_new(isnew_each_in_port[i]),
                    .flit_in(flit_in_array[i]),
                    .credit_next_router(credit_next_router[i]),
                    .clock(clock),
                    .reset(reset)
        );

    end
endgenerate

genvar j;
generate
    for(i=0;i<VC_NUM;i=i+1) begin : GEN_VC_CREDIT
      for(j=0;j<`IN_OUTPORT_CNT;j=j+1) begin : GEN_IN_OUTPORT_CREDIT
        assign credit_next_router[j][i] = credit_for_inputs[i*`IN_OUTPORT_CNT + j];
        assign nxt_routers_credits[i*`IN_OUTPORT_CNT + j] = next_router_credit[j*VC_NUM + i];
      end
    end
endgenerate

priority_all_vc P(.outputs_out(flit_out),
               .occupieds_out(nxt_occupieds),
               .credit_for_inputs(credit_for_inputs),
               .nxt_routers_credits(nxt_routers_credits),
               .flit_in(flit_in),
               .occupieds_in(occupieds),
               .is_new_flit(isnew_vector),
               .TABLE(TABLE_VECTOR)
);

endmodule
module  router(flit_out, credit, flit_in, data, next_router_credit, load, write,
                init, clock, reset);

parameter CREDIT_DELAY = 16;
parameter VC_NUM = 4;
                output [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_out;
                output [0:VC_NUM*`IN_OUTPORT_CNT-1] credit;
                input [1:`IN_OUTPORT_CNT*`FLIT_SIZE] flit_in;
                input [1:`IN_OUTPORT_CNT_BIN] data;
                input [0:VC_NUM*`IN_OUTPORT_CNT-1] next_router_credit;
                input [1:`ROUTERS_CNT_BIN] load;
                input write;
                input init;
                input clock;
                input reset;


reg [0:`IN_OUTPORT_CNT_BIN-1] TABLE_ARRAY [0:`TABLE_ROWS-1];
wire[0:`IN_OUTPORT_CNT_BIN-1] NEXT_TABLE_ARRAY [0:`TABLE_ROWS-1];

reg [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] occupieds;
wire [0:`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM-1] nxt_occupieds;

genvar tmp;
generate
    for(tmp=0; tmp<`TABLE_ROWS; tmp=tmp+1)
    begin
		always @(posedge clock or posedge reset)
		begin
        if ( reset ) 
            TABLE_ARRAY[tmp] <= {`IN_OUTPORT_CNT_BIN{1'b0}};
        else
            TABLE_ARRAY[tmp] <= NEXT_TABLE_ARRAY[tmp];
		end
    end
endgenerate

always @(posedge clock or posedge reset)
begin
    if(reset)
      occupieds <= {`OCCUPIEDS_SIZE*`IN_OUTPORT_CNT*VC_NUM{1'b0}};
    else
      occupieds <= nxt_occupieds;
end

genvar i;
generate
    for(i = 0; i <`TABLE_ROWS; i = i + 1)begin : GEN_NEXT_TABLE_ARRAY
        assign NEXT_TABLE_ARRAY[i] = ((init == 1'b0) ? TABLE_ARRAY[i] : (write == 1'b1 && load == i) ? data : TABLE_ARRAY[i]);
    end
endgenerate

genvar util_genvar;

`MAKE_ARRAY(credit_array, credit, `IN_OUTPORT_CNT, VC_NUM, GEN_CREDIT)

`MAKE_VECTOR(TABLE_VECTOR, TABLE_ARRAY, `TABLE_ROWS, `IN_OUTPORT_CNT_BIN, GEN_TABLE_VECTOR)

`MAKE_ARRAY_1BASED(flit_in_array, flit_in, `IN_OUTPORT_CNT, `FLIT_SIZE, GEN_FLIT_IN1)

wire [1:`FLIT_SIZE*VC_NUM] flit_out_each_in_port [0:`IN_OUTPORT_CNT-1];

wire [0:VC_NUM-1] isnew_each_in_port [0:`IN_OUTPORT_CNT-1];
`MAKE_VECTOR(isnew_vector, isnew_each_in_port, `IN_OUTPORT_CNT, VC_NUM, GEN_ISNEW_VECTOR)

wire [0:`IN_OUTPORT_CNT * VC_NUM -1] credit_for_inputs;
wire [0:`IN_OUTPORT_CNT * VC_NUM -1] nxt_routers_credits;
wire [0:VC_NUM-1] credit_next_router [0:`IN_OUTPORT_CNT];

generate
    for(i = 0; i < `IN_OUTPORT_CNT; i = i + 1)begin:GEN_IN_PORT
        in_port #(.CREDIT_DELAY(CREDIT_DELAY),.VC_NUM(VC_NUM)) m(
            .credit(credit_array[i]),
                    .flit_out(flit_out_each_in_port[i]),
                    .is_new(isnew_each_in_port[i]),
                    .flit_in(flit_in_array[i]),
                    .credit_next_router(credit_next_router[i]),
                    .clock(clock),
                    .reset(reset)
        );

    end
endgenerate

genvar j;
generate
    for(i=0;i<VC_NUM;i=i+1) begin : GEN_VC_CREDIT
      for(j=0;j<`IN_OUTPORT_CNT;j=j+1) begin : GEN_IN_OUTPORT_CREDIT
        assign credit_next_router[j][i] = credit_for_inputs[i*`IN_OUTPORT_CNT + j];
        assign nxt_routers_credits[i*`IN_OUTPORT_CNT + j] = next_router_credit[j*VC_NUM + i];
      end
    end
endgenerate

priority_all_vc P(.outputs_out(flit_out),
               .occupieds_out(nxt_occupieds),
               .credit_for_inputs(credit_for_inputs),
               .nxt_routers_credits(nxt_routers_credits),
               .flit_in(flit_in),
               .occupieds_in(occupieds),
               .is_new_flit(isnew_vector),
               .TABLE(TABLE_VECTOR)
);

endmodule