data/full_repos/permissive/143278/ivltests/param_select2.v
data/verilator_xmls/8f1b3e89-55e4-46ab-9dd3-5fab1ad430c1.xml
module main;

   parameter value = 2'b10;
   parameter x = 0;
   parameter y = 1;
   parameter pa = value[0];
   parameter pb = value[1];
   parameter px = value[x];
   parameter py = value[y];

   initial begin

      if (pa !== value[0]) begin
	 $display("FAILED -- pa == %b", pa);
	 $finish;
      end

      if (pa !== 0) begin
	 $display("FAILED -- pa == %b", pa);
	 $finish;
      end

      if (pb !== value[1]) begin
	 $display("FAILED -- pb == %b", pb);
	 $finish;
      end

      if (pb !== 1) begin
	 $display("FAILED -- pb == %b", pb);
	 $finish;
      end

      if (px !== value[0]) begin
	 $display("FAILED -- px == %b", px);
	 $finish;
      end

      if (px !== 0) begin
	 $display("FAILED -- px == %b", px);
	 $finish;
      end

      if (py !== value[1]) begin
	 $display("FAILED -- py == %b", py);
	 $finish;
      end

      if (py !== 1) begin
	 $display("FAILED -- py == %b", py);
	 $finish;
      end
      $display("PASSED");
   end

endmodule
module main;


   parameter value = 2'b10;
   parameter x = 0;
   parameter y = 1;
   parameter pa = value[0];
   parameter pb = value[1];
   parameter px = value[x];
   parameter py = value[y];

   initial begin

      if (pa !== value[0]) begin
	 $display("FAILED -- pa == %b", pa);
	 $finish;
      end

      if (pa !== 0) begin
	 $display("FAILED -- pa == %b", pa);
	 $finish;
      end

      if (pb !== value[1]) begin
	 $display("FAILED -- pb == %b", pb);
	 $finish;
      end

      if (pb !== 1) begin
	 $display("FAILED -- pb == %b", pb);
	 $finish;
      end

      if (px !== value[0]) begin
	 $display("FAILED -- px == %b", px);
	 $finish;
      end

      if (px !== 0) begin
	 $display("FAILED -- px == %b", px);
	 $finish;
      end

      if (py !== value[1]) begin
	 $display("FAILED -- py == %b", py);
	 $finish;
      end

      if (py !== 1) begin
	 $display("FAILED -- py == %b", py);
	 $finish;
      end
      $display("PASSED");
   end

endmodule