Hello,
I have to simulate a circuit with a transient analysis (.tran) and I need to sweep a testing parameter. This way I will already have 2 sweeps nested one in time and another parametric. My problem is: I need to perform calculations between the output signals generated in the parametric iterations. For example:
.tran 1n 100u sweep MyParam POI 3 val1 val2 val3
.probe ID(M1)
I need to subtract the first current from the rest of the set, which would be equivalent to make ID(M1) from the 1st iteration and subtract the 1st from it (resulting zero for this one), save the result, and then do the same for the 2rd and 3rd outputs.
I visualized some approaches:
1) Print/Probe directly the member that I want. So I need to invoke ID(M1)@index=1 or ID(M1)[0] (as it appears in CosmosScope calculator) or something like this. I've googled for it more than one week (here inclusive). I've read to many different tutorials of HSpice, but couldn't find nothing to retrieve a specific output from a multi-member curves coming from a sweep like this one. If I open the files in the CosmosScope I can use the calculator to do the member extraction, but I have to waste time with it. The real simulation is much more complex than the lines above and the firs set is about 50 simulations. Maybe there is a simple way that I couldn't see in my searches through the internet and I would appreciate very much if you could help me with this.
2) Perform the first simulation, save its result, and invoke this result in the same simulation with the other set of parameters with .ALTER, for instance. .ALTER command will result in different .tr# and .mt# files. In addition, when an .ALTER begins, I can't retrieve the results from the previous .ALTER. Placing 2 different lines with the same analysis would cause the 2nd to vanish with the 1st one. Besides, I don't want to open the files. If I have to open the files, I'll have to do all by my self. I've tried to record macros in the CosmosScope, but they worked only partially and to do all the measurements by my own hands would cost me a time that I don't have. .IF-ELSE-ENDIF statements don't permit .PROBE/.PLOT/.PRINT commands inside it, so they don't serve for me as well.
3) Use Matlab together with CosmosScope: discarded since I don't have it and it would be the case to install a cannon to kill a fly.
4) Excel and macros: I can program macros in VB but it's not my primary job and it's really time consuming, without any guaranties that I could reach in results readable by the CosmosScope at the end of the processes.
Again, I feel that I'm missing something that probably already passed in front of my eyes, but right now I can't see. I don't think that a software like HSpice is not able to provide what I'm needing. If one of you know something to help me I would be very thankful.
Best regards,
Patrick.