Qspice throws warning error

I have another one that I cant figure out. The simulation throws a “Warning: Error” about some node voltage V(n01) but still runs. I cant find a reference to V(n01) anywhere in the netlist so what is Qspice complaining about here?

warning - error.qsch (4.0 KB)


I’m not sure of the exact reason, but it seems to be due to unnecessary curly braces in the B device listing.

“B N1 N2 I = {if ( ………… )}”

In your circuit, the following lines are the ones causing the issue.

“bchnl D1 S1 I = {if ……}”

“bdiode D1 S1 I = {if ……}”

Interestingly, LTSpice also complains about this.

I think both simulators, being created by the same author, have the same ‘gene’ and hence, produce the same response. :stuck_out_tongue_closed_eyes:

1 Like

@EL34 Thanks, I like the LT spice warning about “Questionable use of curly brackets”, what is that, a grammar warning : )

Maybe at some point in the future, whatever Qspice mechanism is offended by "Node voltages such as V(n01) can not be used in netlist … " could do the courtesy of letting noobs such as myself know what line number in the netlist it is complaining about so I can have a chance at debugging it myself.

Here is the reason why such a warning appeared in both spice simulators

LTspice : "Questionable use of curly braces in “b1 out 0 v={if(v(in)>.5,1,0)}”
Qspice : “Warning: Error: Node voltages such as V(n01) can not be used in netlist parameter expressions because these parameters are evaluated before the simulation starts.”

LTspice only warns you with a “Questionable use of curly braces” message, and the Qspice warning message explains why. The root cause is that the curly braces are meant to evaluate the contents before proceeding to the simulation itself. However, in the pre-processing phase, the node voltage V() is not yet available, and therefore, it shouldn’t be used there. That’s why both LTspice and Qspice return this warning. Both simulators can determine that this is not the correct syntax and should not process it in the pre-processing phase, but they return a warning to remind the user. By removing the curly braces in the B-source, this warning can be eliminated.

You will only become aware of this in LTspice if you open the error log. Qspice includes this in its output window, making it more visible. QSPICE tries to figure out what can be solved before the simulation by itself and that why curly braces normally not required!

Transphorm made a mistake in their device subcircuit netlist. Removing the curly braces in “bchnl” and “bdiode” should eliminate this warning in your simulation.

1 Like

@KSKelvin I see, thanks for clarifying this.