In spectre, this is not yet (directly) possible. There is an enhancement request for this, and I believe work is underway to support it.
That said, if you have device models which support self-heating, then this should be taken into account.
One way of changing the temperature during a transient would be to run a sequence of transients using the save state/recover state options (see spectre -h tran), and alter to change the temperature. You'd need to ensure that the temperature changed smoothly that you didn't end up with a big discontinuity caused by the operating point changing significantly.
Here's a wildly exaggerated example:
Code:// temp sweep
parameters vdd_val=3 stoptime=1u
vvdd (vdd 0) vsource type=dc dc=vdd_val
vsin (vdd inp) vsource type=sine ampl=0.1 freq=1M
r1 (inp out) resistor r=1k
r2 (out 0) resistor r=1k tc1=0.1
mytran tran stop=1.2u savefile="end.state" saveperiod=1.2u
alt1 alter param=temp value=30
mytran1 tran stop=2u savefile="end.state" recover="end.state" saveperiod=0.8u
alt2 alter param=temp value=35
mytran2 tran stop=3.1u savefile="end.state" recover="end.state" saveperiod=1.1u
Note that I used saveperiod instead of savetime to avoid it getting a suffix on the state filename. However, the saveperiod needs to be set to the duration of each transient analysis for this to work...
I did try putting it in a sweep analysis - but this is not supported at the moment (it says that recover can't be used on a tran within a sweep).
By the way, in the above example, it's intentionally not smooth - so I could see it having an effect!
Regards,
Andrew.