Shmoo plot
Chip Test — pass/fail in V×F space, computed
Example from the compendium of canonical charts
Python Code
"""Chip Test — Shmoo plot (pass/fail in V×F space, computed)."""
import numpy as np
import plotly.graph_objects as go
def generate():
V = np.linspace(0.6, 1.2, 60) # voltage (V)
F = np.linspace(0.1, 2.0, 80) # frequency (GHz)
# Fmax(V): max operating frequency given supply voltage
Fmax = 2.0 * (1 - np.exp(-5 * (V - 0.7)))
Fmax = np.clip(Fmax, 0, None)
# Build pass/fail matrix
pass_matrix = np.zeros((len(V), len(F)), dtype=int)
for i, v in enumerate(V):
if v >= 0.7:
for j, f in enumerate(F):
if f <= Fmax[i]:
pass_matrix[i, j] = 1
print(f" pass cells: {pass_matrix.sum()} / {pass_matrix.size}")
colorscale = [
[0.0, "#DA5597"],
[0.49, "#DA5597"], # fail — PINK (sharp boundary)
[0.51, "#55B685"],
[1.0, "#55B685"], # pass — GREEN
]
fig = go.Figure(go.Heatmap(
x=F,
y=V,
z=pass_matrix,
colorscale=colorscale,
zmin=0,
zmax=1,
colorbar=dict(
tickvals=[0.25, 0.75],
ticktext=["FAIL", "PASS"],
thickness=16,
len=0.5,
),
hovertemplate="Freq: %{x:.2f} GHz<br>Volt: %{y:.3f} V<br>%{z}<extra></extra>",
))
# Overlay Fmax curve
fig.add_trace(go.Scatter(
x=Fmax,
y=V,
mode="lines",
line=dict(color="white", width=2.5, dash="dash"),
name="Fmax boundary",
hovertemplate="V=%{y:.3f} V → Fmax=%{x:.2f} GHz<extra></extra>",
))
fig.update_layout(
xaxis=dict(title="Frequency (GHz)"),
yaxis=dict(title="Voltage (V)"),
legend=dict(x=0.02, y=0.98, bgcolor="rgba(0,0,0,0.4)", font=dict(color="white")),
margin=dict(t=20, b=60, l=60, r=80),
)
return fig
if __name__ == "__main__":
generate()
Made with Plotly