Ahmed Reda
04/29/2023, 1:51 PMgds read <cell>
flatten -doinplace dac_3v_8bit    
extract do local
extract all
ext2spice lvs
ext2spice
Thanks.Tim Edwards
04/29/2023, 3:20 PM---------------------------------------------------------------------------------------
Net: eoc                                   |Net: eoc
  sar/eoc = 1                              |  sar/eoc = 1
                                           |
Net: soc                                   |Net: soc
  sar/soc = 1                              |  sar/dvss = 1
                                           |
Net: rst_n                                 |Net: rst_n
  sar/rst_n = 1                            |  sar/dvdd = 1
                                           |
Net: clk                                   |Net: clk
  sar/clk = 1                              |  sar/data[7] = 1
---------------------------------------------------------------------------------------
You've got "clk" connected to "data[7]", "rst_n" tied to "dvdd", etc.Tim Edwards
04/29/2023, 3:22 PM.subckt sar clk cmp data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] dvdd dvss eoc hold rst_n soc
in sar.spice vs.
X4 data[0] data[1] data[2] data[3] data[4] data[5] data[6] data[7] cmp clk rst_n soc eoc hold dvdd dvss sar
in SAR_ADCx.spice.Ahmed Reda
04/29/2023, 3:29 PMTim Edwards
04/29/2023, 3:33 PMsar.sym .  You're connecting to an external netlist named sar.spice  and xschem needs to know how to output the connections in the same order as the pins are defined in that file, without knowing anything about that file.Ahmed Reda
04/29/2023, 3:43 PMMitch Bailey
04/29/2023, 4:10 PMread spice in magic before extraction to extract the ports in the same order. See here.
You also have a resistance model mismatch in follower_amp
Circuit 1: follower_amp                    |Circuit 2: follower_amp                    
-------------------------------------------|-------------------------------------------
sky130_fd_pr__pfet_g5v0d10v5 (415->10)     |sky130_fd_pr__pfet_g5v0d10v5 (10)          
sky130_fd_pr__nfet_g5v0d10v5 (132->10)     |sky130_fd_pr__nfet_g5v0d10v5 (10)          
sky130_fd_pr__res_xhigh_po (4->1)          |(no matching element)                      
sky130_fd_pr__nfet_03v3_nvt (2)            |sky130_fd_pr__nfet_03v3_nvt (2)            
sky130_fd_pr__diode_pw2nd_05v5 (2)         |sky130_fd_pr__diode_pw2nd_05v5 (2)         
(no matching element)                      |sky130_fd_pr__res_xhigh_po_0p35 (1)
magic cannot extract sky130_fd_pr__res_xhigh_po_0p35 from gds so you’ll have to manually change the source netlist from
XR1 net4 vdd vss sky130_fd_pr__res_xhigh_po_0p35 W=1 L=100 mult=1 m=1
to
XR1 net4 vdd vss sky130_fd_pr__res_xhigh_po W=0.35 L=100 mult=1 m=1