data/full_repos/permissive/195227969/work/code/m_shiftcounter.v
1: b"%Error: data/full_repos/permissive/195227969/work/code/m_shiftcounter.v:134: Cannot find file containing module: 'bn_l4'\n         bn_l4 #(.I(16'h2222)) cmb_d21 [1:0] ( .o(d[1:0]), .i3(1'b0), .i2(1'b0), .i1(s_shift[0]),   .i0(B[2:1]));\n         ^~~~~\n        ... Looked in:\n             data/full_repos/permissive/195227969/work/code,data/full_repos/permissive/195227969/bn_l4\n             data/full_repos/permissive/195227969/work/code,data/full_repos/permissive/195227969/bn_l4.v\n             data/full_repos/permissive/195227969/work/code,data/full_repos/permissive/195227969/bn_l4.sv\n             bn_l4\n             bn_l4.v\n             bn_l4.sv\n             obj_dir/bn_l4\n             obj_dir/bn_l4.v\n             obj_dir/bn_l4.sv\n%Error: data/full_repos/permissive/195227969/work/code/m_shiftcounter.v:135: Cannot find file containing module: 'bn_l4'\n         bn_l4 #(.I(16'hcaca)) cmb_d43 [1:0] ( .o(d[3:2]), .i3(1'b0), .i2(s_shift[0]), .i1(B[1:0]), .i0(B[4:3]));\n         ^~~~~\n%Error: data/full_repos/permissive/195227969/work/code/m_shiftcounter.v:137: Cannot find file containing module: 'bn_lcy4_b'\n         bn_lcy4_b #(.I(16'h9382)) cmb_shcnt0        (.o(shcnt[0]),   .co(shcy[0]),  .ci(1'b1), .i3(B[0]),      .i2(rshcnt[0]),   .i1(s_shift[0]), .i0(s_shift[1]));\n         ^~~~~~~~~\n%Error: data/full_repos/permissive/195227969/work/code/m_shiftcounter.v:138: Cannot find file containing module: 'bn_lcy4'\n         bn_lcy4   #(.I(16'he22e)) cmb_shcnt41 [3:0] (.o(shcnt[4:1]), .co(shcy[4:1]),           .i3(shcy[3:0]), .i2(rshcnt[4:1]), .i1(s_shift[1]), .i0(d[3:0]));\n         ^~~~~~~\n%Error: data/full_repos/permissive/195227969/work/code/m_shiftcounter.v:139: Cannot find file containing module: 'bn_l4'\n         bn_l4   #(.I(16'h00aa)) cmb_lastshift     (.o(lastshift),  .i3(shcy[4]),   .i2(1'b1),        .i1(1'b1),          .i0(s_shift[1]));\n         ^~~~~\n%Error: data/full_repos/permissive/195227969/work/code/m_shiftcounter.v:141: Cannot find file containing module: 'SB_DFF'\n         SB_DFF reg_shcnt40 [4:0] ( .Q(rshcnt[4:0]), .C(clk), .D(shcnt[4:0]));\n         ^~~~~~\n%Error: Exiting due to 6 error(s)\n"
module m_shiftcounter
  # ( parameter HIGHLEVEL = 0 )   
   (
    input        clk,
    input [1:0]  s_shift,
    input [4:0]  B,
    output       lastshift,
    output [4:0] dbg_rshcnt
    );
   
   generate
      if ( HIGHLEVEL ) begin
         
         reg [4:0] rshcnt;
         reg       rr_lastshift;
         reg [5:0] shcnt;
         
         always @(B or rshcnt or s_shift) begin
            case ( s_shift )
              2'b00 : shcnt = {1'b0,B[4:0]};
              2'b01 : shcnt = {1'b0,B[1:0],3'b000};
              2'b10 : shcnt = {1'b0,rshcnt}+6'b011111 + {5'b00000,s_shift[0]};
              2'b11 : shcnt = {1'b0,rshcnt}+6'b011111 + {5'b00000,s_shift[0]};
            endcase      
         end

         assign lastshift = ~shcnt[5] & s_shift[1];
         always @(posedge clk) 
           rshcnt <= shcnt[4:0];
         assign dbg_rshcnt = rshcnt[4:0];
      end else begin



         wire [4:0] rshcnt,shcnt;
         wire [3:0] d;

         wire [4:0] shcy;

         
         bn_l4 #(.I(16'h2222)) cmb_d21 [1:0] ( .o(d[1:0]), .i3(1'b0), .i2(1'b0), .i1(s_shift[0]),   .i0(B[2:1]));
         bn_l4 #(.I(16'hcaca)) cmb_d43 [1:0] ( .o(d[3:2]), .i3(1'b0), .i2(s_shift[0]), .i1(B[1:0]), .i0(B[4:3]));

         bn_lcy4_b #(.I(16'h9382)) cmb_shcnt0        (.o(shcnt[0]),   .co(shcy[0]),  .ci(1'b1), .i3(B[0]),      .i2(rshcnt[0]),   .i1(s_shift[0]), .i0(s_shift[1]));
         bn_lcy4   #(.I(16'he22e)) cmb_shcnt41 [3:0] (.o(shcnt[4:1]), .co(shcy[4:1]),           .i3(shcy[3:0]), .i2(rshcnt[4:1]), .i1(s_shift[1]), .i0(d[3:0]));
         bn_l4   #(.I(16'h00aa)) cmb_lastshift     (.o(lastshift),  .i3(shcy[4]),   .i2(1'b1),        .i1(1'b1),          .i0(s_shift[1]));

         SB_DFF reg_shcnt40 [4:0] ( .Q(rshcnt[4:0]), .C(clk), .D(shcnt[4:0]));
         assign dbg_rshcnt = rshcnt[4:0];
      end
   endgenerate
endmodule
module m_shiftcounter
  # ( parameter HIGHLEVEL = 0 )   
   (
    input        clk,
    input [1:0]  s_shift,
    input [4:0]  B,
    output       lastshift,
    output [4:0] dbg_rshcnt
    );

   
   generate
      if ( HIGHLEVEL ) begin
         
         reg [4:0] rshcnt;
         reg       rr_lastshift;
         reg [5:0] shcnt;
         
         always @(B or rshcnt or s_shift) begin
            case ( s_shift )
              2'b00 : shcnt = {1'b0,B[4:0]};
              2'b01 : shcnt = {1'b0,B[1:0],3'b000};
              2'b10 : shcnt = {1'b0,rshcnt}+6'b011111 + {5'b00000,s_shift[0]};
              2'b11 : shcnt = {1'b0,rshcnt}+6'b011111 + {5'b00000,s_shift[0]};
            endcase      
         end

         assign lastshift = ~shcnt[5] & s_shift[1];
         always @(posedge clk) 
           rshcnt <= shcnt[4:0];
         assign dbg_rshcnt = rshcnt[4:0];
      end else begin



         wire [4:0] rshcnt,shcnt;
         wire [3:0] d;

         wire [4:0] shcy;

         
         bn_l4 #(.I(16'h2222)) cmb_d21 [1:0] ( .o(d[1:0]), .i3(1'b0), .i2(1'b0), .i1(s_shift[0]),   .i0(B[2:1]));
         bn_l4 #(.I(16'hcaca)) cmb_d43 [1:0] ( .o(d[3:2]), .i3(1'b0), .i2(s_shift[0]), .i1(B[1:0]), .i0(B[4:3]));

         bn_lcy4_b #(.I(16'h9382)) cmb_shcnt0        (.o(shcnt[0]),   .co(shcy[0]),  .ci(1'b1), .i3(B[0]),      .i2(rshcnt[0]),   .i1(s_shift[0]), .i0(s_shift[1]));
         bn_lcy4   #(.I(16'he22e)) cmb_shcnt41 [3:0] (.o(shcnt[4:1]), .co(shcy[4:1]),           .i3(shcy[3:0]), .i2(rshcnt[4:1]), .i1(s_shift[1]), .i0(d[3:0]));
         bn_l4   #(.I(16'h00aa)) cmb_lastshift     (.o(lastshift),  .i3(shcy[4]),   .i2(1'b1),        .i1(1'b1),          .i0(s_shift[1]));

         SB_DFF reg_shcnt40 [4:0] ( .Q(rshcnt[4:0]), .C(clk), .D(shcnt[4:0]));
         assign dbg_rshcnt = rshcnt[4:0];
      end
   endgenerate
endmodule