I am fairly new to HSPICE and I am investigating someone else's testbench and I am trying to track down where is the vsource generator used in the .lstb analysis in this testbench.
I am a bit shorthanded in providing a bigger picture of the problem, but I was hoping just clarifying the used syntax would help me out a lot actually.
So, to narrow it down, I am curious to find the net location where stability analysis was performed. In the whole testbench file there is only one .lstb call-up, luckily, and there is also only one VV0 mentioned in the file.
VV0 imirrsrc[1] vss dc='p_vload'
.lstb mode=single vsource=XREFGEN.XLOOPBRK.vv0
'p_vload' is undefined throughout the testbench file.
Judging from the way vsource was defined in .lstb it means vv0 is instantiated inside the XLOOPBRK? That is the way to interpret the syntax XREFGEN.XLOOPBRK.vv0 ?
If that is the correct case, I am unsure of how it is declared in the first line then just as VV0 imirrsrc[1] vss dc='p_vload'? Is this doable?
Or is the correct syntax:
.param p_vload=someValue $assuming p_vload is desired to be defined
XREFGEN.XLOOPBRK.VV0 imirrsrc[1] vss dc='p_vload'.lstb mode=single vsource=XREFGEN.XLOOPBRK.vv0
I know reading through someone else's work is always cumbersome, but I need help to sort my thoughts on this one...Am I reading into this correctly?
EDIT: I am not sure if I should delete the original text, but here's what I wanted to add so far:
I made my testcases to confirm my rights and wrongs here and I couldn't replicate my question, so my current answer is: NO you can't create a voltage source this way and use it in a subcircuit moreover, you are probably seeing incomplete stuff, and you need the p_vload defined at some point.
It made me realize my question is not good enough.
So, can you create a voltage source in your testbench/toplevel, and then instantiate it (wire it) in a subcircuit right there in your toplevel testbench?
I couldn't do it in my testcases (it failed), but maybe I am missing some syntax knowledge again. So, is something like this possible:
# toplevel testbench, assuming nodes in MySubckt2 are 2 and 0
xMySubckt.xMySubckt2.V1 2 0 dc=5V
.dc xMySubckt.xMySubckt2.V1 0 5 0.25