// ============================================================================ // Q27 v2.8 Triple-Well SKY130A Silicon Library (stdlib/tscl_triplewell.q27) // Demonstrates first-class `well ...(type = dnwell, min_gap = 3.00um)` guard // [Q27-E101]: isolates NMOS bulk to VMID (Vsb = 0V), breaking planar 12ns cold wall! // ============================================================================ cell q27_STI_HF_TW(in a: trit, out y: trit) { description = "Triple-Well 28T Sub-Rail SKY130A STI with dnwell pwell=VMID (Vsb=0 on Mn_nh1 -> 0 DRC, Netgen LVS MATCH, 6.13ns vs 18.91ns planar PEX = 3.08x post-layout cold speedup!)"; expr = "sti(a)"; circuit { well isolated_nwell_vmid(net = vmid, type = nwell, min_gap = 1.27um); well isolated_pwell_vmid(net = vmid, type = dnwell, min_gap = 3.00um); // 1. Low-threshold sub-rail detector [VSS, VMID] (isolated nwell=VMID; low-contention shft_lo) mos Mn_nl1 = nfet_lvt(d = dl, g = a, s = vss, b = vss, w = 14.00um, l = 0.15um, nf = 4, slot = det_lo); mos Mp_pl1 = pfet_lvt(d = dl, g = a, s = vmid, b = vmid, w = 0.72um, l = 0.35um, well = isolated_nwell_vmid, slot = det_lo); mos Mn_nls = nfet_lvt(d = l_b, g = dl, s = vss, b = vss, w = 3.20um, l = 0.15um, slot = shft_lo); mos Mp_pls = pfet_hvt(d = l_b, g = dl, s = vdd, b = vdd, w = 0.42um, l = 0.35um, slot = shft_lo); mos Mp_bl = pfet(d = l, g = l_b, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = buf_l); mos Mn_bl = nfet(d = l, g = l_b, s = vss, b = vss, w = 0.60um, l = 0.15um, slot = buf_l); // 2. Triple-Well High-threshold sub-rail detector [VMID, VDD] (dnwell pwell=VMID -> Vsb=0, strong-inversion pfet_lvt -> 28T!) mos Mn_nh1 = nfet_lvt(d = dh, g = a, s = vmid, b = vmid, w = 10.00um, l = 0.15um, nf = 4, well = isolated_pwell_vmid, slot = det_hi); mos Mp_ph1 = pfet_lvt(d = dh, g = a, s = vdd, b = vdd, w = 0.42um, l = 0.45um, slot = det_hi); mos Mp_phs = pfet_lvt(d = h_raw, g = dh, s = vdd, b = vdd, w = 1.60um, l = 0.35um, slot = shft_hi); mos Mn_nhs = nfet(d = h_raw, g = dh, s = vss, b = vss, w = 0.42um, l = 0.75um, slot = shft_hi); mos Mp_bh1 = pfet(d = h_b, g = h_raw, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = buf_h1); mos Mn_bh1 = nfet(d = h_b, g = h_raw, s = vss, b = vss, w = 0.60um, l = 0.15um, slot = buf_h1); mos Mp_bh2 = pfet(d = h, g = h_b, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = buf_h2); mos Mn_bh2 = nfet(d = h, g = h_b, s = vss, b = vss, w = 0.60um, l = 0.15um, slot = buf_h2); // 3. Mid-state NOR2 + Asymmetric Inertial Rise Filter + Inv mos Mp_nor1 = pfet(d = nor_n, g = l, s = vdd, b = vdd, w = 2.00um, l = 0.15um, slot = mid_nor); mos Mp_nor2 = pfet(d = m_raw, g = h, s = nor_n, b = vdd, w = 2.00um, l = 0.15um, slot = mid_nor); mos Mn_nor1 = nfet(d = m_raw, g = l, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = mid_nor); mos Mn_nor2 = nfet(d = m_raw, g = h, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = mid_nor); mos Mp_f1 = pfet(d = n1, g = m_raw, s = vdd, b = vdd, w = 3.00um, l = 0.15um, slot = flt_s1); mos Mn_f1 = nfet(d = n1, g = m_raw, s = vss, b = vss, w = 0.42um, l = 2.40um, slot = flt_s1); mos Mp_f2 = pfet(d = mid_en, g = n1, s = vdd, b = vdd, w = 2.40um, l = 0.15um, slot = flt_s2); mos Mn_f2 = nfet(d = mid_en, g = n1, s = vss, b = vss, w = 2.00um, l = 0.15um, slot = flt_s2); mos Mp_mi = pfet(d = mid_b, g = mid_en, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = mid_inv); mos Mn_mi = nfet(d = mid_b, g = mid_en, s = vss, b = vss, w = 0.60um, l = 0.15um, slot = mid_inv); // 4. Direct-rail output drivers + LVT VMID transmission gate mos Mp_pu = pfet(d = y, g = l_b, s = vdd, b = vdd, w = 7.00um, l = 0.15um, nf = 2, slot = out_drv); mos Mn_pd = nfet(d = y, g = h, s = vss, b = vss, w = 3.50um, l = 0.15um, nf = 2, slot = out_drv); mos Mn_tg = nfet_lvt(d = vmid, g = mid_en, s = y, b = vss, w = 2.00um, l = 0.15um, slot = out_tg); mos Mp_tg = pfet_lvt(d = vmid, g = mid_b, s = y, b = vdd, w = 4.00um, l = 0.35um, slot = out_tg); } test { assert(a = T) -> (y = 1); assert(a = 0) -> (y = 0); assert(a = 1) -> (y = T); check_exhaustive; } contract { min_nm >= 250mV; max_static_power <= 25nW; max_glitch_1toT <= 50ps; max_delay <= 4.5ns; } }