I'm looking into a way to calculate the power dissipation of any arbitrary IC in circuit on SPICE. I eventually hope to create simple scripts that can list power dissipation of the device and potentially raise a flag if the device is over our de-rated maximums. I've been looking online and can't find any concrete methods to do so.
How do I model the power dissipation of an IC in SPICE?