Yuan
New Member
Offline
Posts: 1
|
I was trying to make a 2 branches switch between Vdd and ground, which controlled by a logic signal. Below is my code:
module dg_switch2(p, n, g, s); input s; output p, n, g; logic s; electrical p, n, g;
analog begin if (s) begin I(p, n) <+ 0.0; V(g, n) <+ 0.0; end else begin V(p, n) <+ 0.0; I(g, n) <+ 0.0 end end endmodule
The problem is that when I connect a Vdc to port'p' and ground to port 'n', cadence report an error says that my there is a short circuit at my Vdc. It seems that I cannot connect both the voltage source and ground to my switch. What should I do fixed the error?
|