data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v
1: b'%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:69: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,14,13) prbs15b1(iprbs,oprbs15b1);\n^~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp,data/full_repos/permissive/530013823/db_prbscal\n             data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp,data/full_repos/permissive/530013823/db_prbscal.v\n             data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp,data/full_repos/permissive/530013823/db_prbscal.sv\n             db_prbscal\n             db_prbscal.v\n             db_prbscal.sv\n             obj_dir/db_prbscal\n             obj_dir/db_prbscal.v\n             obj_dir/db_prbscal.sv\n%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:70: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,14,13) prbs15b2(oprbs15b1,oprbs15b2);\n^~~~~~~~~~\n%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:71: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,14,13) prbs15b3(oprbs15b2,oprbs15b3);\n^~~~~~~~~~\n%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:72: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,14,13) prbs15b4(oprbs15b3,oprbs15b4);\n^~~~~~~~~~\n%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:80: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,22,17) prbs23b1(iprbs,oprbs23b1);\n^~~~~~~~~~\n%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:81: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,22,17) prbs23b2(oprbs23b1,oprbs23b2);\n^~~~~~~~~~\n%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:82: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,22,17) prbs23b3(oprbs23b2,oprbs23b3);\n^~~~~~~~~~\n%Error: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:83: Cannot find file containing module: \'db_prbscal\'\ndb_prbscal #(32,22,17) prbs23b4(oprbs23b3,oprbs23b4);\n^~~~~~~~~~\n%Warning-WIDTH: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:103: Operator ADD expects 8 bits on the RHS, but RHS\'s CONST \'2\'h2\' generates 2 bits.\n                                                                                                                                   : ... In instance db_prbs4oct\n                           iprbs[7:0] + 2\'h2,\n                                      ^\n                ... Use "/* verilator lint_off WIDTH */" and lint_on around source to disable this message.\n%Warning-WIDTH: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:104: Operator ADD expects 8 bits on the RHS, but RHS\'s CONST \'2\'h3\' generates 2 bits.\n                                                                                                                                   : ... In instance db_prbs4oct\n                           iprbs[7:0] + 2\'h3,\n                                      ^\n%Warning-WIDTH: data/full_repos/permissive/530013823/LuanVan-20210617T090538Z-001/LuanVan/rtl/rsinv_test/rtl/libp/db_prbs4oct.v:105: Operator ADD expects 8 bits on the RHS, but RHS\'s CONST \'3\'h4\' generates 3 bits.\n                                                                                                                                   : ... In instance db_prbs4oct\n                           iprbs[7:0] + 3\'h4};\n                                      ^\n%Error: Exiting due to 8 error(s), 3 warning(s)\n'
module db_prbs4oct
    (
     iprbs,
     imode,
     inob,

     oprbs,
     oendfrm
     );



input [31:0]    iprbs;
input [1:0]     imode;
input [1:0]     inob;

output [31:0]   oprbs;
output          oendfrm;






parameter       RESET       = 32'hff_ff_ff_fe;
parameter       PATTERN15   = 15'h1234;
parameter       PATTERN23   = 23'h123456;
parameter       PATTERN31   = 31'h12345678;
parameter       PATTERNCNT  = 8'h12;



wire            mode15;
wire            mode23;
wire            mode31;
wire            modecnt;
assign          mode15  = (imode == 2'd0);
assign          mode23  = (imode == 2'd1);
assign          mode31  = (imode == 2'd2);
assign          modecnt = (imode == 2'd3);
wire            nob1;
wire            nob2;
wire            nob3;
assign          nob1    = (inob == 2'd1);
assign          nob2    = (inob == 2'd2);
assign          nob3    = (inob == 2'd3);




wire [31:0]     oprbs15b1;
wire [31:0]     oprbs15b2;
wire [31:0]     oprbs15b3;
wire [31:0]     oprbs15b4;

db_prbscal #(32,14,13) prbs15b1(iprbs,oprbs15b1);
db_prbscal #(32,14,13) prbs15b2(oprbs15b1,oprbs15b2);
db_prbscal #(32,14,13) prbs15b3(oprbs15b2,oprbs15b3);
db_prbscal #(32,14,13) prbs15b4(oprbs15b3,oprbs15b4);


wire [31:0]     oprbs23b1;
wire [31:0]     oprbs23b2;
wire [31:0]     oprbs23b3;
wire [31:0]     oprbs23b4;

db_prbscal #(32,22,17) prbs23b1(iprbs,oprbs23b1);
db_prbscal #(32,22,17) prbs23b2(oprbs23b1,oprbs23b2);
db_prbscal #(32,22,17) prbs23b3(oprbs23b2,oprbs23b3);
db_prbscal #(32,22,17) prbs23b4(oprbs23b3,oprbs23b4);


wire [31:0]     oprbs31b1;
wire [31:0]     oprbs31b2;
wire [31:0]     oprbs31b3;
wire [31:0]     oprbs31b4;


wire [31:0]     ocnt;
wire [31:0]     ocntb1;
wire [31:0]     ocntb2;
wire [31:0]     ocntb3;
wire [31:0]     ocntb4;
assign          ocnt    = {iprbs[7:0] + 1'h1,
                           iprbs[7:0] + 2'h2,
                           iprbs[7:0] + 2'h3,
                           iprbs[7:0] + 3'h4};
assign          ocntb1  = {iprbs[23:0],ocnt[31:24]};
assign          ocntb2  = {iprbs[15:0],ocnt[31:16]};
assign          ocntb3  = {iprbs[7:0],ocnt[31:8]};
assign          ocntb4  = ocnt;


wire [31:0]     ofixpat ;
assign          ofixpat = {iprbs[7:0],
                           iprbs[7:0],
                           iprbs[7:0],
                           iprbs[7:0]};

assign          oprbs31b1 = ofixpat;
assign          oprbs31b2 = ofixpat;
assign          oprbs31b3 = ofixpat;
assign          oprbs31b4 = ofixpat;



wire [31:0]     oprbsb1;
wire [31:0]     oprbsb2;
wire [31:0]     oprbsb3;
wire [31:0]     oprbsb4;

wire            prbsrst;
assign          prbsrst = !(|iprbs);

assign          oprbsb1 = modecnt   ? ocntb1    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b1 :
                          mode23    ? oprbs23b1 : 
                                      oprbs31b1;

assign          oprbsb2 = modecnt   ? ocntb2    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b2 :
                          mode23    ? oprbs23b2 :
                                      oprbs31b2;

assign          oprbsb3 = modecnt   ? ocntb3    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b3 :
                          mode23    ? oprbs23b3 : 
                                      oprbs31b3;

assign          oprbsb4 = modecnt   ? ocntb4    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b4 :
                          mode23    ? oprbs23b4 : 
                                      oprbs31b4;

assign          oprbs   = nob1      ? oprbsb1 :
                          nob2      ? oprbsb2 :
                          nob3      ? oprbsb3 : oprbsb4;

wire            ecntc1;
wire            ecntc2;
wire            ecntc3;
wire            ecntc4;
wire            ecnt;

assign          ecntc1  = (oprbs[31:24]  == PATTERNCNT);
assign          ecntc2  = (oprbs[23:16]  == PATTERNCNT);
assign          ecntc3  = (oprbs[15:8]   == PATTERNCNT);
assign          ecntc4  = (oprbs[7:0]    == PATTERNCNT);
assign          ecnt    = nob1  ? ecntc1 :
                          nob2  ? ecntc1 | ecntc2 :
                          nob3  ? ecntc1 | ecntc2 | ecntc3 : 
                          ecntc1 | ecntc2 | ecntc3 | ecntc4;

assign          oendfrm = mode15 ? (iprbs[14:0] == PATTERN15) :
                          mode23 ? (iprbs[22:0] == PATTERN23) :
                          mode31 ? (iprbs[30:0] == PATTERN31) : ecnt;

                                   
                                       
endmodule
module db_prbs4oct
    (
     iprbs,
     imode,
     inob,

     oprbs,
     oendfrm
     );




input [31:0]    iprbs;
input [1:0]     imode;
input [1:0]     inob;

output [31:0]   oprbs;
output          oendfrm;






parameter       RESET       = 32'hff_ff_ff_fe;
parameter       PATTERN15   = 15'h1234;
parameter       PATTERN23   = 23'h123456;
parameter       PATTERN31   = 31'h12345678;
parameter       PATTERNCNT  = 8'h12;



wire            mode15;
wire            mode23;
wire            mode31;
wire            modecnt;
assign          mode15  = (imode == 2'd0);
assign          mode23  = (imode == 2'd1);
assign          mode31  = (imode == 2'd2);
assign          modecnt = (imode == 2'd3);
wire            nob1;
wire            nob2;
wire            nob3;
assign          nob1    = (inob == 2'd1);
assign          nob2    = (inob == 2'd2);
assign          nob3    = (inob == 2'd3);




wire [31:0]     oprbs15b1;
wire [31:0]     oprbs15b2;
wire [31:0]     oprbs15b3;
wire [31:0]     oprbs15b4;

db_prbscal #(32,14,13) prbs15b1(iprbs,oprbs15b1);
db_prbscal #(32,14,13) prbs15b2(oprbs15b1,oprbs15b2);
db_prbscal #(32,14,13) prbs15b3(oprbs15b2,oprbs15b3);
db_prbscal #(32,14,13) prbs15b4(oprbs15b3,oprbs15b4);


wire [31:0]     oprbs23b1;
wire [31:0]     oprbs23b2;
wire [31:0]     oprbs23b3;
wire [31:0]     oprbs23b4;

db_prbscal #(32,22,17) prbs23b1(iprbs,oprbs23b1);
db_prbscal #(32,22,17) prbs23b2(oprbs23b1,oprbs23b2);
db_prbscal #(32,22,17) prbs23b3(oprbs23b2,oprbs23b3);
db_prbscal #(32,22,17) prbs23b4(oprbs23b3,oprbs23b4);


wire [31:0]     oprbs31b1;
wire [31:0]     oprbs31b2;
wire [31:0]     oprbs31b3;
wire [31:0]     oprbs31b4;


wire [31:0]     ocnt;
wire [31:0]     ocntb1;
wire [31:0]     ocntb2;
wire [31:0]     ocntb3;
wire [31:0]     ocntb4;
assign          ocnt    = {iprbs[7:0] + 1'h1,
                           iprbs[7:0] + 2'h2,
                           iprbs[7:0] + 2'h3,
                           iprbs[7:0] + 3'h4};
assign          ocntb1  = {iprbs[23:0],ocnt[31:24]};
assign          ocntb2  = {iprbs[15:0],ocnt[31:16]};
assign          ocntb3  = {iprbs[7:0],ocnt[31:8]};
assign          ocntb4  = ocnt;


wire [31:0]     ofixpat ;
assign          ofixpat = {iprbs[7:0],
                           iprbs[7:0],
                           iprbs[7:0],
                           iprbs[7:0]};

assign          oprbs31b1 = ofixpat;
assign          oprbs31b2 = ofixpat;
assign          oprbs31b3 = ofixpat;
assign          oprbs31b4 = ofixpat;



wire [31:0]     oprbsb1;
wire [31:0]     oprbsb2;
wire [31:0]     oprbsb3;
wire [31:0]     oprbsb4;

wire            prbsrst;
assign          prbsrst = !(|iprbs);

assign          oprbsb1 = modecnt   ? ocntb1    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b1 :
                          mode23    ? oprbs23b1 : 
                                      oprbs31b1;

assign          oprbsb2 = modecnt   ? ocntb2    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b2 :
                          mode23    ? oprbs23b2 :
                                      oprbs31b2;

assign          oprbsb3 = modecnt   ? ocntb3    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b3 :
                          mode23    ? oprbs23b3 : 
                                      oprbs31b3;

assign          oprbsb4 = modecnt   ? ocntb4    :
                          prbsrst   ? RESET     :
                          mode15    ? oprbs15b4 :
                          mode23    ? oprbs23b4 : 
                                      oprbs31b4;

assign          oprbs   = nob1      ? oprbsb1 :
                          nob2      ? oprbsb2 :
                          nob3      ? oprbsb3 : oprbsb4;

wire            ecntc1;
wire            ecntc2;
wire            ecntc3;
wire            ecntc4;
wire            ecnt;

assign          ecntc1  = (oprbs[31:24]  == PATTERNCNT);
assign          ecntc2  = (oprbs[23:16]  == PATTERNCNT);
assign          ecntc3  = (oprbs[15:8]   == PATTERNCNT);
assign          ecntc4  = (oprbs[7:0]    == PATTERNCNT);
assign          ecnt    = nob1  ? ecntc1 :
                          nob2  ? ecntc1 | ecntc2 :
                          nob3  ? ecntc1 | ecntc2 | ecntc3 : 
                          ecntc1 | ecntc2 | ecntc3 | ecntc4;

assign          oendfrm = mode15 ? (iprbs[14:0] == PATTERN15) :
                          mode23 ? (iprbs[22:0] == PATTERN23) :
                          mode31 ? (iprbs[30:0] == PATTERN31) : ecnt;

                                   
                                       
endmodule