Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] FATAL: The following branches form a loop of rigid branches (shorts) when added to th

Status
Not open for further replies.

georgemailo

Newbie level 4
Joined
Apr 26, 2012
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,323
Hi. I want to design a verilog-a model of a two way switch. You can see the code below. When I run the simulation the "FATAL: The following branches form a loop of rigid branches (shorts) when added to the circuit..." error pops up. Searching on the internet I found something about switching branches in verilog-a which might cause this error but there wasn't any specific solution for it.
Do you have any solution to propose?

`include "constants.vams"
`include "disciplines.vams"

module TwoWaySwitch(p,n1,n2,cp,cn);
inout p,n1,n2;
input cp,cn;
electrical p,n1,n2,cp,cn;
parameter real vref=1.2;
parameter real vthreshold=vref/2;

analog
if (V(cp,cn)<vthreshold) begin
V(p,n1)<+0;
I(p,n2)<+0;
I(n1,n2)<+0; //maybe this is not necessary
end
else begin
V(p,n2)<+0;
I(p,n1)<+0;
I(n1,n2)<+0;
end

endmodule
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
14,065
Helped
2,796
Reputation
5,592
Reaction score
2,706
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
104,911
Try installing a low-ohm resistor in one or more wires.

It's a token resistance which is sometimes necessary so a simulator will permit such loops rather than call it an error.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top