To merge two graphs in Hspice Custom Wave Viewer and calculate the Static Noise Margin (SNM) from Butterfly curves, you can follow these steps:
Open the Hspice Custom Wave Viewer.
Load the two graphs you want to merge by selecting File > Open and navigating to the waveform files.
In the Waveform Navigator, select the first waveform you want to merge.
Right-click on the waveform and select "Add Trace."
In the "Add Trace" dialog box, select the second waveform you want to merge and click "OK."
The two waveforms should now be merged into one graph.
To calculate the SNM from Butterfly curves, select the merged waveform and use the cursor to measure the VIL (input low voltage) and VIH (input high voltage) points on the graph.
Calculate the SNM using the formula SNM = min(VIL, VIH) / (VIH - VIL).
Note that the above steps assume that you have already generated the Butterfly curves using Hspice simulations. If you haven't generated the Butterfly curves yet, you'll need to run Hspice simulations with different input voltages and plot the resulting output voltages on a graph using Hspice Custom Wave Viewer.