/*********************************************************
 This example shows how to invert sparse matrices of 2000x2000 
 elements of type real. 
 The matrix is inverted twice and three values are checked to 
 see that they remained unchanged after the two inversions.
***********************************************************/
module top;
parameter SIZE = 2000;

real AR[0:SIZE-1][SIZE-1:0];
real IR[SIZE-1:0][SIZE-1:0];
real r;

initial begin

  $InitM(AR, ($I1 == $I2) ? 1 : ($I1 == 2*$I2) ? 7 : 0);
  mone = -1;
  IR = AR**(-1);
  IR = IR ** (-1);

  $display("IR[%d][%d]= %e\n", 16, 8, IR[16][8]);
  $display("IR[%d][%d]= %e\n", 16, 9, IR[16][9]);
  $display("IR[%d][%d]= %e\n", 200, 100, IR[200][100]);

end
endmodule