data/full_repos/permissive/42434302/ivltests/pr1960633.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/42434302/ivltests/pr1960633.v:11: Unsupported: Ignoring delay on this delayed statement.\n      #1 ;\n      ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-SELRANGE: data/full_repos/permissive/42434302/ivltests/pr1960633.v:6: Selection index out of range: 8:5 outside 7:0\n                                                                             : ... In instance main\n   wire [3:0] above = foo[8:5];\n                         ^\n%Error: data/full_repos/permissive/42434302/ivltests/pr1960633.v:7: Extracting 10 bits from only 8 bit number\n                                                                  : ... In instance main\n   wire [9:0] span = foo[8:-1];\n                        ^\n%Warning-SELRANGE: data/full_repos/permissive/42434302/ivltests/pr1960633.v:7: Selection index out of range: 8:-1 outside 7:0\n                                                                             : ... In instance main\n   wire [9:0] span = foo[8:-1];\n                        ^\n%Error: Exiting due to 1 error(s), 3 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module main;

   reg [7:0] foo;

   wire [3:0] below = foo[2:-1];
   wire [3:0] above = foo[8:5];
   wire [9:0] span = foo[8:-1];

   initial begin
      foo = 'h55;
      #1 ;
      if (below !== 4'b101_x) begin
	 $display("FAILED");
	 $finish;
      end
      if (above !== 4'bx_010) begin
	 $display("FAILED");
	 $finish;
      end
      if (span !== 10'bx_01010101_x) begin
	 $display("FAILED");
	 $finish;
      end
      $display("PASSED");
   end

endmodule
module main;


   reg [7:0] foo;

   wire [3:0] below = foo[2:-1];
   wire [3:0] above = foo[8:5];
   wire [9:0] span = foo[8:-1];

   initial begin
      foo = 'h55;
      #1 ;
      if (below !== 4'b101_x) begin
	 $display("FAILED");
	 $finish;
      end
      if (above !== 4'bx_010) begin
	 $display("FAILED");
	 $finish;
      end
      if (span !== 10'bx_01010101_x) begin
	 $display("FAILED");
	 $finish;
      end
      $display("PASSED");
   end

endmodule