Hi,
There is a description including Python code for a solution based on a recurrence relation or a solution based on an approximation at Wikipedia. That is if you're using real valued arguments.
http://en.wikipedia.org/wiki/Lambert's_W_function
It is quite trivial to convert this code to Verilog-A: here is the recurrence relation code:
Code:function real lambertw;
input x, prec, iters, error;
real x, prec;
integer iters, error;
real w, we, w1e;
integer i;
begin
w = 0;
for (i = 0; i < iters; i = i + 1) begin
we = w * exp(w);
w1e = (w + 1) * exp(w);
if (prec > abs((x - we) / w1e))
break;
w = w - (we - x) / (w1e - (w+2) * (we-x) / (2*w+2));
end
error = (i < iters) ? 0 : 1;
lambertw = w;
end
endfunction // lambertw
I've not actually run this code, but I think you get the idea.