MokoKoya
New Member
Offline
Posts: 7
|
hello
I'm trying to model a mixed-signal mux4x1 which is digitally controlled. I really don't understand what I'm doing wrong in this model. I have a problem when it comes to the simulation. The error from the simulation log is as follows:
the following branches form a loop of rigid branches (shorts) when added to the circuit:
mux4x1_ana_tb V2:p (from mux4x1_ana_tb.x2 to ground) mux4x1_ana_tb V4:p (from mux4x1_ana_tb.x0 to ground) mux4x1_ana_tb V1:p (from mux4x1_ana_tb.x1 to ground)
I have 4 voltage sources as my inputs (nets x0 to x3), and a load resistance on the output. I am also using an example of a switch from the Verilog AMS designers guide page 115, 3.2.1 . Here is the code that I am using:
module MUX_ANALOG_2 ( OUT, IN0, IN1, IN2, IN3, SEL);
//===================// // Ports Declaration // //===================// inout IN0, IN1, IN2, IN3; input [1:0] SEL; inout OUT; electrical OUT, IN0, IN1, IN2, IN3; //================// // Analog Process // //================//
analog begin if (SEL==2'b00) begin V(OUT, IN0) <+ 0.0; I(OUT, IN1) <+ 0.0; I(OUT, IN2) <+ 0.0; I(OUT, IN3) <+ 0.0; end else if (SEL==2'b01) begin I(OUT, IN0) <+ 0.0; V(OUT, IN1) <+ 0.0; I(OUT, IN2) <+ 0.0; I(OUT, IN3) <+ 0.0; end else if (SEL==2'b10) begin I(OUT, IN0) <+ 0.0; I(OUT, IN1) <+ 0.0; V(OUT, IN2) <+ 0.0; I(OUT, IN3) <+ 0.0; end else if (SEL==2'b11) begin I(OUT, IN0) <+ 0.0; I(OUT, IN1) <+ 0.0; I(OUT, IN2) <+ 0.0; V(OUT, IN3) <+ 0.0; end else begin I(OUT, IN0) <+ 0.0; I(OUT, IN1) <+ 0.0; I(OUT, IN2) <+ 0.0; I(OUT, IN3) <+ 0.0; end
end
endmodule
What is the problem? ???
|