ruwan2
Junior Member
Offline
Posts: 15
|
Hi,
I come across the following code from verilog-AMS reference book. First of all, it is found that I have to comment out one of
// wire dnet;
or
// ddiscrete dnet;
in order a verilog-AMS simulation software (SMASH) to work.
What is the meaning of the above two attributes?
It has:
electrical anet;
'dnet' has obvious electrical attribute? I feel that it is weird to have 'electrical anet;'
Could you explain it to me?
Thanks,
module a2d(dnet, anet); input dnet; output anet; wire dnet; ddiscrete dnet; electrical anet; real avar; analog begin if (dnet === 1'b1) avar = 5; else if (dnet === 1'bx) avar = avar; // hold value else if (dnet === 1'b0) avar = 0; else if (dnet === 1'bz) avar = 2.5; // high impedance - float value V(anet) <+ avar; end endmodule
|