// ============================================================================ // Q27 v3.2 Native Multi-Macro 3-Rail Ternary SoC Physical Assembly // (stdlib/tscl_ternary_soc.q27) // // Single Source of Truth compiled by `trilith_core/q27_compiler.py` into: // 1. Structural Top-Level Verilog (`q27_ternary_soc_macro_top.v`) // 2. OpenSTA Timing Constraints (`q27_ternary_soc_macro_top.sdc`) // 3. OpenROAD 3-Rail VDD/VMID/VSS PDN + Macro Placement + TritonRoute Tcl // 4. Golden Hierarchical Top-Level LVS SPICE (`q27_ternary_soc_macro_top_sch.spice`) // // Compile-time physical guards enforced before OpenROAD launches: // [Q27-E106] Exact LEF bounding-box overlap, core bounds & well/dnwell keepout // [Q27-E107] 3-rail VMID secondary power domain completeness // [Q27-E108] SKY130A via4 (met4 >= 1.20um) & met5 (spacing >= 1.60um) PDN rules // [Q27-E109] Structural macro/port/floating-net integrity // ============================================================================ soc q27_ternary_soc_macro_top(in din_t: trit, in wl_in: trit, in col_wen: trit, in bl_in: trit, in blb_in: trit, in rwl_in: trit, in rden_in: trit, in sae_in: trit, in saeb_in: trit, in vref_hi_in: trit, in vref_lo_in: trit, out logic_out: trit, out guard_out: trit, out tsram_dout: trit, out pbias_mon: trit) { description = "11-Macro 215T Sub-uW Native 3-Rail Ternary SoC (Planar STI_HF + dnwell STI_HF_TW + 42T KLEENE_HF + 56T T-SRAM + Complementary StrongARM)"; floorplan { die_w = 280um; die_h = 156um; core_x0 = 16um; core_y0 = 16um; core_x1 = 264um; core_y1 = 140um; site = "unithd"; } pdn { rails = "VDD,VMID,VSS"; ring_width = 1.60um; ring_spacing = 1.60um; core_offset = 1.60um; met4_width = 1.20um; met4_spacing = 0.60um; met4_pitch = 9.60um; met4_offset = 7.00um; met5_width = 1.60um; met5_spacing = 1.60um; met5_pitch = 48.0um; met5_offset = 8.00um; } timing { clock_period = 10ns; io_delay = 1ns; input_slew = 150ps; output_load = 25fF; } assembly { // Row 0: Planar 29T STI_HF -> Triple-Well 28T STI_HF_TW + 2D Wordline Gate + Replica Bias macro u_sti_hf = q27_STI_HF(a=din_t, y=n_sti_hf) @ (18um, 18um, R0); macro u_sti_tw = q27_STI_HF_TW(a=n_sti_hf, y=logic_out) @ (108um, 18um, R0); macro u_wlg = q27_WLGATE_2D(wl=wl_in, col_wen=col_wen, wlen=n_wlen, wlenb=n_wlenb) @ (192um, 18um, R0); macro u_rep = q27_RBL_REPLICA_BIAS(rden=rden_in, pbias=pbias_mon) @ (216.35um, 18um, R0); // Row 1: Sub-Rail Zero-Crowbar 42T Kleene Guard (26.3 nW) + SR Latches + Ternary Reconstructor macro u_kleene = q27_KLEENE_GUARD_HF(a=din_t, b=n_sti_hf, y=guard_out) @ (18um, 44um, R0); macro u_srn = q27_SR_NAND(sb=n_hon, rb=n_hop, q=n_ist, qb=n_istb) @ (166um, 44um, R0); macro u_srp = q27_SR_NOR(s=n_lon, r=n_lop, q=n_isp, qb=n_ispb) @ (188um, 44um, R0); macro u_rec = q27_TSA_RECON(is_t=n_ist, is_p=n_isp, dout=tsram_dout) @ (214.19um, 44um, R0); // Row 2: Complementary NMOS/PMOS StrongARM Ternary Sense Amplifiers macro u_san = q27_STRONGARM_N(inp=n_rbl, inn=vref_hi_in, sae=sae_in, outp=n_hop, outn=n_hon) @ (18um, 70um, R0); macro u_sap = q27_STRONGARM_P(inp=n_rbl, inn=vref_lo_in, saeb=saeb_in, outp=n_lop, outn=n_lon) @ (88um, 70um, R0); // Row 3: Dual-NWELL Sub-Rail 56T T-SRAM Bitcell macro u_sram = q27_TSRAM_56T_HF(wl=n_wlen, wlb=n_wlenb, bl=bl_in, blb=blb_in, rwl=rwl_in, q=n_q, qb=n_qb, rbl=n_rbl) @ (18um, 100um, R0); } } // ============================================================================ // EXP-09E: 23-Macro 471T Scaled 3-Rail Ternary SoC (2x2 Zero-Crowbar 60T Z3 // T-SRAM Bank + Dual-Col Complementary StrongARM + 2D WL Select + Triple-Well // + 42T Kleene HF) — Data-Independent Sub-uW Standby on ANY Stored Data! // Zero hand-written Verilog, SDC, OpenROAD Tcl, or LVS SPICE! // ============================================================================ soc q27_ternary_soc_2x2_bank(in din_t: trit, in wl0_in: trit, in wl1_in: trit, in col0_wen: trit, in col1_wen: trit, in bl0_in: trit, in blb0_in: trit, in bl1_in: trit, in blb1_in: trit, in rwl0_in: trit, in rwl1_in: trit, in rden_in: trit, in sae_in: trit, in saeb_in: trit, in vref_hi_in: trit, in vref_lo_in: trit, out logic_out: trit, out guard_out: trit, out dout0: trit, out dout1: trit, out pbias0_mon: trit, out pbias1_mon: trit) { description = "23-Macro 471T Data-Independent Sub-uW Native 3-Rail Ternary SoC: 2x2 Zero-Crowbar 60T Z3 T-SRAM Bank + Dual-Column StrongARM + Triple-Well STI_HF_TW + 42T KLEENE_GUARD_HF"; floorplan { die_w = 464um; die_h = 184um; core_x0 = 16um; core_y0 = 16um; core_x1 = 448um; core_y1 = 168um; site = "unithd"; } pdn { rails = "VDD,VMID,VSS"; ring_width = 1.60um; ring_spacing = 1.60um; core_offset = 1.60um; met4_width = 1.20um; met4_spacing = 0.60um; met4_pitch = 9.60um; met4_offset = 7.00um; met5_width = 1.60um; met5_spacing = 1.60um; met5_pitch = 48.0um; met5_offset = 8.00um; } timing { clock_period = 10ns; io_delay = 1ns; input_slew = 150ps; output_load = 25fF; } assembly { // Row 0: Planar STI_HF -> Triple-Well dnwell STI_HF_TW + 42T Sub-Rail Kleene Guard + Row-0 2D WL Gates macro u_sti_hf = q27_STI_HF(a=din_t, y=n_sti_hf) @ (18um, 18um, R0); macro u_sti_tw = q27_STI_HF_TW(a=n_sti_hf, y=logic_out) @ (108um, 18um, R0); macro u_kleene = q27_KLEENE_GUARD_HF(a=din_t, b=n_sti_hf, y=guard_out) @ (198um, 18um, R0); macro u_wlg_00 = q27_WLGATE_2D(wl=wl0_in, col_wen=col0_wen, wlen=n_wlen_00, wlenb=n_wlenb_00) @ (318um, 18um, R0); macro u_wlg_01 = q27_WLGATE_2D(wl=wl0_in, col_wen=col1_wen, wlen=n_wlen_01, wlenb=n_wlenb_01) @ (338um, 18um, R0); // Row 1: Row-1 2D WL Gates + Dual Replica Biases & Reconstructors (VMID-stripe-centered!) + 4 SR Latches macro u_wlg_10 = q27_WLGATE_2D(wl=wl1_in, col_wen=col0_wen, wlen=n_wlen_10, wlenb=n_wlenb_10) @ (18um, 44um, R0); macro u_wlg_11 = q27_WLGATE_2D(wl=wl1_in, col_wen=col1_wen, wlen=n_wlen_11, wlenb=n_wlenb_11) @ (38um, 44um, R0); macro u_rep_0 = q27_RBL_REPLICA_BIAS(rden=rden_in, pbias=pbias0_mon) @ (62.75um, 44um, R0); macro u_rep_1 = q27_RBL_REPLICA_BIAS(rden=rden_in, pbias=pbias1_mon) @ (101.15um, 44um, R0); macro u_rec_0 = q27_TSA_RECON(is_t=n_ist0, is_p=n_isp0, dout=dout0) @ (146.99um, 44um, R0); macro u_rec_1 = q27_TSA_RECON(is_t=n_ist1, is_p=n_isp1, dout=dout1) @ (194.99um, 44um, R0); macro u_srn_0 = q27_SR_NAND(sb=n_hon0, rb=n_hop0, q=n_ist0, qb=n_istb0) @ (240um, 44um, R0); macro u_srp_0 = q27_SR_NOR(s=n_lon0, r=n_lop0, q=n_isp0, qb=n_ispb0) @ (260um, 44um, R0); macro u_srn_1 = q27_SR_NAND(sb=n_hon1, rb=n_hop1, q=n_ist1, qb=n_istb1) @ (280um, 44um, R0); macro u_srp_1 = q27_SR_NOR(s=n_lon1, r=n_lop1, q=n_isp1, qb=n_ispb1) @ (299um, 44um, R0); // Row 2: Dual-Column Complementary NMOS + PMOS StrongARM Sense Amplifiers macro u_san_0 = q27_STRONGARM_N(inp=n_rbl0, inn=vref_hi_in, sae=sae_in, outp=n_hop0, outn=n_hon0) @ (18um, 70um, R0); macro u_sap_0 = q27_STRONGARM_P(inp=n_rbl0, inn=vref_lo_in, saeb=saeb_in, outp=n_lop0, outn=n_lon0) @ (84um, 70um, R0); macro u_san_1 = q27_STRONGARM_N(inp=n_rbl1, inn=vref_hi_in, sae=sae_in, outp=n_hop1, outn=n_hon1) @ (192um, 70um, R0); macro u_sap_1 = q27_STRONGARM_P(inp=n_rbl1, inn=vref_lo_in, saeb=saeb_in, outp=n_lop1, outn=n_lon1) @ (256um, 70um, R0); // Row 3: 2x2 Zero-Crowbar 60T Z3 T-SRAM Bank Row 0 (Col 0 + Col 1 — PDN-stripe-aligned!) macro u_sram_00 = q27_TSRAM_60T_Z3(wl=n_wlen_00, wlb=n_wlenb_00, bl=bl0_in, blb=blb0_in, rwl=rwl0_in, q=n_q00, qb=n_qb00, rbl=n_rbl0) @ (18um, 102um, R0); macro u_sram_01 = q27_TSRAM_60T_Z3(wl=n_wlen_01, wlb=n_wlenb_01, bl=bl1_in, blb=blb1_in, rwl=rwl0_in, q=n_q01, qb=n_qb01, rbl=n_rbl1) @ (239um, 102um, R0); // Row 4: 2x2 Zero-Crowbar 60T Z3 T-SRAM Bank Row 1 (Col 0 + Col 1 — PDN-stripe-aligned!) macro u_sram_10 = q27_TSRAM_60T_Z3(wl=n_wlen_10, wlb=n_wlenb_10, bl=bl0_in, blb=blb0_in, rwl=rwl1_in, q=n_q10, qb=n_qb10, rbl=n_rbl0) @ (18um, 136um, R0); macro u_sram_11 = q27_TSRAM_60T_Z3(wl=n_wlen_11, wlb=n_wlenb_11, bl=bl1_in, blb=blb1_in, rwl=rwl1_in, q=n_q11, qb=n_qb11, rbl=n_rbl1) @ (239um, 136um, R0); } }