data/full_repos/permissive/447976230/fpga/usrp2/models/math_real.v
1: b"%Error: data/full_repos/permissive/447976230/fpga/usrp2/models/math_real.v:144: syntax error, unexpected var, expecting IDENTIFIER\n      input real var ;\n                 ^~~\n%Error: data/full_repos/permissive/447976230/fpga/usrp2/models/math_real.v:158: syntax error, unexpected var, expecting ')'\n         gaussian = mean + sqrt((-2.0*log(s))/s) * v1 * sqrt(var) ;\n                                                             ^~~\n%Error: Exiting due to 2 error(s)\n"
function real gaussian ;
      input real mean ;
      input real var ;
      real u1, u2, v1, v2, s ;
      begin
         s = 1.0 ;
         while( s >= 1.0  ) begin

            u1 = $random/4294967296.0 + 0.5 ;
            u2 = $random/4294967296.0 + 0.5 ;

            v1 = 2*u1-1.0 ;
            v2 = 2*u2-1.0 ;

            s = (v1*v1 + v2*v2) ;
         end
         gaussian = mean + sqrt((-2.0*log(s))/s) * v1 * sqrt(var) ;

      end
   endfunction
function real gaussian ;

      input real mean ;
      input real var ;
      real u1, u2, v1, v2, s ;
      begin
         s = 1.0 ;
         while( s >= 1.0  ) begin

            u1 = $random/4294967296.0 + 0.5 ;
            u2 = $random/4294967296.0 + 0.5 ;

            v1 = 2*u1-1.0 ;
            v2 = 2*u2-1.0 ;

            s = (v1*v1 + v2*v2) ;
         end
         gaussian = mean + sqrt((-2.0*log(s))/s) * v1 * sqrt(var) ;

      end
   endfunction