// ============================================================================ // Q27 v3.0 Native T-SRAM Array Periphery & Complementary Dual-Polarity // StrongARM Ternary Sense Amplifier Library (stdlib/tscl_tsram_periph.q27) // // Single Source of Truth (SSOT): Q27 AST -> Safe SPICE + 0-DRC/LVS SKY130A GDSII // 1. q27_WLGATE_2D (6T): 2D cross-point wordline write-protect gate // 2. q27_RBL_REPLICA_BIAS (4T): Bank-shared 0.85x replica VMID-tracked pfet_lvt bias // 3. q27_STRONGARM_N (11T): Clocked NMOS-input StrongARM comparator (RBL vs Vref_hi) // 4. q27_STRONGARM_P (11T): Clocked PMOS-input StrongARM comparator (RBL vs Vref_lo) // 5. q27_SR_NAND (8T): Cross-coupled NAND2 SR latch for SA_HI // 6. q27_SR_NOR (8T): Cross-coupled NOR2 SR latch for SA_LO // 7. q27_TSA_RECON (12T): Rail-to-rail ternary output reconstructor (is_T, is_P -> DOUT) // ============================================================================ cell q27_WLGATE_2D(in wl: trit, in col_wen: trit, out wlen: trit, out wlenb: trit) { description = "6T Local 2D Cross-Point Wordline Gate (WLEN = WL & COL_WEN, eliminates row half-select disturb)"; circuit { mos Mp_na1 = pfet(d = wlenb, g = wl, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = nand); mos Mp_na2 = pfet(d = wlenb, g = col_wen, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = nand); mos Mn_na1 = nfet(d = wlenb, g = col_wen, s = n1, b = vss, w = 1.60um, l = 0.15um, slot = nand); mos Mn_na2 = nfet(d = n1, g = wl, s = vss, b = vss, w = 1.60um, l = 0.15um, slot = nand); mos Mp_inv = pfet(d = wlen, g = wlenb, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = inv); mos Mn_inv = nfet(d = wlen, g = wlenb, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = inv); } } cell q27_RBL_REPLICA_BIAS(in rden: trit, out pbias: trit) { description = "4T Bank-Shared 0.85x Replica VMID-Tracked pfet_lvt Bias Generator with 0nW Standby Clamp"; circuit { mos Mn_rs = nfet_lvt(d = rep_m, g = vmid, s = vss, b = vss, w = 0.84um, l = 0.15um, slot = rep_rs); mos Mn_re = nfet_lvt(d = pbias, g = rden, s = rep_m, b = vss, w = 0.84um, l = 0.15um, slot = rep_re); mos Mp_pm = pfet_lvt(d = pbias, g = pbias, s = vdd, b = vdd, w = 8.00um, l = 0.50um, nf = 2, slot = rep_pm); mos Mp_off = pfet(d = pbias, g = rden, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = rep_off); } } cell q27_STRONGARM_N(in inp: trit, in inn: trit, in sae: trit, out outp: trit, out outn: trit) { description = "11T Zero-Static-Power Clocked NMOS-Input StrongARM Comparator (Upper RBL vs Vref_hi Decision)"; circuit { mos Mn_tail = nfet_lvt(d = tail, g = sae, s = vss, b = vss, w = 4.00um, l = 0.15um, nf = 2, slot = tail); mos Mn_inp = nfet_lvt(d = dip, g = inp, s = tail, b = vss, w = 3.00um, l = 0.25um, nf = 2, slot = in_p); mos Mn_inn = nfet_lvt(d = din, g = inn, s = tail, b = vss, w = 3.00um, l = 0.25um, nf = 2, slot = in_n); mos Mp_dp = pfet(d = dip, g = sae, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = pre_dp); mos Mp_dn = pfet(d = din, g = sae, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = pre_dn); mos Mp_ll = pfet(d = outn, g = outp, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = lat_l); mos Mn_ll = nfet_lvt(d = outn, g = outp, s = dip, b = vss, w = 2.00um, l = 0.15um, slot = lat_l); mos Mp_lr = pfet(d = outp, g = outn, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = lat_r); mos Mn_lr = nfet_lvt(d = outp, g = outn, s = din, b = vss, w = 2.00um, l = 0.15um, slot = lat_r); mos Mp_on = pfet(d = outn, g = sae, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = pre_on); mos Mp_op = pfet(d = outp, g = sae, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = pre_op); } } cell q27_STRONGARM_P(in inp: trit, in inn: trit, in saeb: trit, out outp: trit, out outn: trit) { description = "11T Zero-Static-Power Clocked PMOS-Input StrongARM Comparator (Lower RBL vs Vref_lo, Zero Dead-Zone to 0V)"; circuit { mos Mp_tail = pfet_lvt(d = ptail, g = saeb, s = vdd, b = vdd, w = 6.00um, l = 0.35um, nf = 2, slot = tail); mos Mp_inp = pfet_lvt(d = dip, g = inp, s = ptail, b = vdd, w = 4.80um, l = 0.35um, nf = 2, slot = in_p); mos Mp_inn = pfet_lvt(d = din, g = inn, s = ptail, b = vdd, w = 4.80um, l = 0.35um, nf = 2, slot = in_n); mos Mn_dp = nfet(d = dip, g = saeb, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = rst_dp); mos Mn_dn = nfet(d = din, g = saeb, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = rst_dn); mos Mp_ll = pfet_lvt(d = outn, g = outp, s = dip, b = vdd, w = 2.40um, l = 0.35um, slot = lat_l); mos Mn_ll = nfet(d = outn, g = outp, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = lat_l); mos Mp_lr = pfet_lvt(d = outp, g = outn, s = din, b = vdd, w = 2.40um, l = 0.35um, slot = lat_r); mos Mn_lr = nfet(d = outp, g = outn, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = lat_r); mos Mn_on = nfet(d = outn, g = saeb, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = rst_on); mos Mn_op = nfet(d = outp, g = saeb, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = rst_op); } } cell q27_SR_NAND(in sb: trit, in rb: trit, out q: trit, out qb: trit) { description = "8T Cross-Coupled NAND2 SR Latch for NMOS-Input StrongARM Sense Amplifier"; circuit { mos Mp_q1 = pfet(d = q, g = sb, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = na_q); mos Mp_q2 = pfet(d = q, g = qb, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = na_q); mos Mn_q1 = nfet(d = q, g = qb, s = nq1, b = vss, w = 1.20um, l = 0.15um, slot = na_q); mos Mn_q2 = nfet(d = nq1, g = sb, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = na_q); mos Mp_qb1 = pfet(d = qb, g = rb, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = na_qb); mos Mp_qb2 = pfet(d = qb, g = q, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = na_qb); mos Mn_qb1 = nfet(d = qb, g = q, s = nq2, b = vss, w = 1.20um, l = 0.15um, slot = na_qb); mos Mn_qb2 = nfet(d = nq2, g = rb, s = vss, b = vss, w = 1.20um, l = 0.15um, slot = na_qb); } } cell q27_SR_NOR(in s: trit, in r: trit, out q: trit, out qb: trit) { description = "8T Cross-Coupled NOR2 SR Latch for PMOS-Input StrongARM Sense Amplifier"; circuit { mos Mp_qb1 = pfet(d = pq1, g = s, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = no_qb); mos Mp_qb2 = pfet(d = qb, g = q, s = pq1, b = vdd, w = 1.60um, l = 0.15um, slot = no_qb); mos Mn_qb1 = nfet(d = qb, g = s, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = no_qb); mos Mn_qb2 = nfet(d = qb, g = q, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = no_qb); mos Mp_q1 = pfet(d = pq2, g = r, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = no_q); mos Mp_q2 = pfet(d = q, g = qb, s = pq2, b = vdd, w = 1.60um, l = 0.15um, slot = no_q); mos Mn_q1 = nfet(d = q, g = r, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = no_q); mos Mn_q2 = nfet(d = q, g = qb, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = no_q); } } cell q27_TSA_RECON(in is_t: trit, in is_p: trit, out dout: trit) { description = "12T Rail-to-Rail Balanced-Ternary Output Reconstructor (is_T, is_P -> DOUT in {0V, VMID, VDD})"; circuit { mos Mp_ip = pfet(d = is_pb, g = is_p, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = inv_p); mos Mn_ip = nfet(d = is_pb, g = is_p, s = vss, b = vss, w = 0.60um, l = 0.15um, slot = inv_p); mos Mp_no1 = pfet(d = pno, g = is_p, s = vdd, b = vdd, w = 1.60um, l = 0.15um, slot = nor_z); mos Mp_no2 = pfet(d = is_0, g = is_t, s = pno, b = vdd, w = 1.60um, l = 0.15um, slot = nor_z); mos Mn_no1 = nfet(d = is_0, g = is_p, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = nor_z); mos Mn_no2 = nfet(d = is_0, g = is_t, s = vss, b = vss, w = 0.80um, l = 0.15um, slot = nor_z); mos Mp_iz = pfet(d = is_0b, g = is_0, s = vdd, b = vdd, w = 1.20um, l = 0.15um, slot = inv_z); mos Mn_iz = nfet(d = is_0b, g = is_0, s = vss, b = vss, w = 0.60um, l = 0.15um, slot = inv_z); mos Mp_pu = pfet(d = dout, g = is_pb, s = vdd, b = vdd, w = 4.00um, l = 0.15um, nf = 2, slot = out_drv); mos Mn_pd = nfet(d = dout, g = is_t, s = vss, b = vss, w = 2.00um, l = 0.15um, slot = out_drv); mos Mn_t0 = nfet_lvt(d = vmid, g = is_0, s = dout, b = vss, w = 1.60um, l = 0.15um, slot = out_tg); mos Mp_t0 = pfet_lvt(d = vmid, g = is_0b, s = dout, b = vdd, w = 3.20um, l = 0.35um, slot = out_tg); } }