There is an outstanding PCR for this problem - PCR 694264.
The problem is that a register cannot connect to an analog port if the register is at the top-level (driving analog), since this is not supported by ncelab.
Supporting this case from the digital elaborator involves non-trivial
amount of work, which is why it hasn't been implemented yet.
There's a simple workaround - use an assign statement, and then connect the assigned net to the analog block:
Code:`include "disciplines.vams"
module test();
reg a;
logic b,c;
initial a=0;
initial forever a = #100 ~a;
assign c=a;
analog_inv a1(c,b);
endmodule
module analog_inv(a,b);
input a;output b;
electrical a,b;
real outval;
analog begin
@(above(V(a) - 1.65)) outval = 0.0;
@(above(1.65 - V(a))) outval = 3.3;
V(b) <+ transition(outval,0,1n);
end
endmodule
(note, I corrected the missing parenthesis in your code too).
Regards,
Andrew.