How to do a power sweep (in W or dBm) for HSPICE?
Surely read document of HSPICE.
Simply use Power Source.
If Power Source is not available in your environment, use Voltage Source with amplitude defined by power.
.PARAM ZC = 50 .PARAM F = 800MEG .PARAM PIN = -35 S [DBM] .PARAM AMTR = '2 * SQRT(10 ** (PIN / 10) * ZC * 2.0E-3)' S PEAK VALUE .PARAM AMAC = '2 * SQRT(10 ** (PIN / 10) * ZC * 1.0E-3)' S RMS VALUE VIN 1 0 SIN(0 AMTR F 0) AC = AMAC RG 1 2 ZC RL 2 0 ZC
If your simulator lacks a "power" source then you could just
sweep V or I and -measure- the input as well as output
power, and choose the Pin result as your X-axis for plots,
pick off Pout as a compound .measure (use cross() to find
the Vsweep point for a spec Pin value, then measure Pout \
at the found Vsweep).
Thank you very much for this sir. But may I ask how do I put the values of Pin in my X-axis? What kind of analysis would I use for this? (.DC, .AC, or .TRAN)
Can you give me a sample code for this sir? Just a simple example sir just to get the idea.
If you can plot Pin then in Cadence, just right-click the X
axis and choose that vector instead of "time" or "frequency"
(whatever your simulation goal prefers).
HSpice, I know nothing. But I'd bet you can "printvs to file"
(or display, copy, paste) somehow. In another tool I just go
to the output file, copy/paste to a .txt file and import to
Excel in the usual way.
Or export Pin and Pout vectors and use some other tool
(Excel?) to plot.
If I have a power source, what kind of analysis would I use (.DC, .AC, or .TRAN) for me to sweep it in terms of power?
.tran, .hb, .sn
Surely read document of HSPICE.
If you read document of HSPICE, your questions are resolved since your questions are all very easy things.