Latest version with new PLL components
diff --git a/gds/user_project_wrapper.gds.gz b/gds/user_project_wrapper.gds.gz index df88577..44b8506 100644 --- a/gds/user_project_wrapper.gds.gz +++ b/gds/user_project_wrapper.gds.gz Binary files differ
diff --git a/xschem/chargepump/chargepump.sch b/xschem/chargepump/chargepump.sch new file mode 100644 index 0000000..ec53b0b --- /dev/null +++ b/xschem/chargepump/chargepump.sch
@@ -0,0 +1,182 @@ +v {xschem version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 1010 -150 1010 -120 {lab=#net1} +N 1130 -120 1250 -120 {lab=#net1} +N 1250 -150 1250 -120 {lab=#net1} +N 1130 -120 1130 -90 {lab=#net1} +N 1010 -420 1010 -390 {lab=#net2} +N 1130 -420 1250 -420 {lab=#net2} +N 1250 -420 1250 -390 {lab=#net2} +N 1130 -450 1130 -420 {lab=#net2} +N 1250 -330 1250 -210 {lab=OUT} +N 730 0 1130 0 {lab=GND} +N 1130 -30 1130 0 {lab=GND} +N 710 -30 710 0 {lab=GND} +N 710 -60 730 -60 {lab=GND} +N 730 -60 730 0 {lab=GND} +N 1130 -60 1150 -60 {lab=GND} +N 1150 -60 1150 0 {lab=GND} +N 1130 0 1150 0 {lab=GND} +N 510 0 530 0 {lab=GND} +N 1150 -180 1250 -180 {lab=GND} +N 1150 -180 1150 -60 {lab=GND} +N 1130 -480 1150 -480 {lab=VDD} +N 1150 -540 1150 -480 {lab=VDD} +N 1130 -540 1150 -540 {lab=VDD} +N 1130 -540 1130 -510 {lab=VDD} +N 690 -480 710 -480 {lab=VDD} +N 690 -540 690 -480 {lab=VDD} +N 690 -540 710 -540 {lab=VDD} +N 710 -540 710 -510 {lab=VDD} +N 1290 -180 1370 -180 {lab=DOWN_buf} +N 1290 -360 1340 -360 {lab=UP_buf} +N 1010 -120 1130 -120 {lab=#net1} +N 1010 -420 1130 -420 {lab=#net2} +N 530 0 710 0 {lab=GND} +N 710 0 730 0 {lab=GND} +N 1010 -180 1150 -180 {lab=GND} +N 890 -180 970 -180 {lab=DOWN_inv} +N 920 -360 970 -360 {lab=UP_inv} +N 710 -450 710 -90 {lab=#net3} +N 750 -480 1090 -480 {lab=#net3} +N 710 -540 1130 -540 {lab=VDD} +N 710 -420 770 -420 {lab=#net3} +N 770 -480 770 -420 {lab=#net3} +N 570 -60 670 -60 {lab=BIAS} +N 800 -60 1090 -60 {lab=BIAS} +N 800 -120 800 -60 {lab=BIAS} +N 530 -120 530 -90 {lab=BIAS} +N 1250 -270 1390 -270 {lab=OUT} +N 530 -170 530 -120 {lab=BIAS} +N 480 -170 530 -170 {lab=BIAS} +N 120 -120 200 -120 {lab=DOWN_inv} +N 110 -420 180 -420 {lab=UP_buf} +N 0 -420 30 -420 {lab=UP} +N 260 -420 320 -420 {lab=UP_inv} +N 0 -120 30 -120 {lab=DOWN} +N 280 -120 360 -120 {lab=DOWN_buf} +N 480 -540 690 -540 {lab=VDD} +N 480 0 510 0 {lab=GND} +N 1010 -330 1010 -300 {lab=GND} +N 930 -300 1010 -300 {lab=GND} +N 1010 -240 1010 -210 {lab=VDD} +N 930 -240 1010 -240 {lab=VDD} +N 1010 -360 1250 -360 {lab=VDD} +N 1150 -480 1150 -360 {lab=VDD} +N 530 -120 800 -120 { lab=BIAS} +N 530 -90 530 -60 { lab=BIAS} +N 530 -60 560 -60 { lab=BIAS} +N 560 -60 570 -60 { lab=BIAS} +N 30 -120 40 -120 { lab=DOWN} +C {lab_wire.sym} 1290 -360 0 1 {name=l1 sig_type=std_logic lab=UP_buf} +C {lab_wire.sym} 1290 -180 0 1 {name=l2 sig_type=std_logic lab=DOWN_buf} +C {lab_wire.sym} 890 -180 0 1 {name=l3 sig_type=std_logic lab=DOWN_inv} +C {lab_wire.sym} 920 -360 0 1 {name=l4 sig_type=std_logic lab=UP_inv} +C {ipin.sym} 480 -170 0 0 {name=p1 lab=BIAS} +C {opin.sym} 1390 -270 0 0 {name=p2 lab=OUT} +C {ipin.sym} 0 -420 0 0 {name=p3 lab=UP} +C {lab_wire.sym} 260 -420 0 1 {name=l5 sig_type=std_logic lab=UP_inv} +C {lab_wire.sym} 110 -420 0 1 {name=l6 sig_type=std_logic lab=UP_buf} +C {ipin.sym} 0 -120 0 0 {name=p4 lab=DOWN} +C {lab_wire.sym} 280 -120 0 1 {name=l7 sig_type=std_logic lab=DOWN_buf} +C {lab_wire.sym} 120 -120 0 1 {name=l8 sig_type=std_logic lab=DOWN_inv} +C {iopin.sym} 480 -540 0 1 {name=p5 lab=VDD} +C {iopin.sym} 480 0 0 1 {name=p6 lab=GND} +C {lab_wire.sym} 930 -300 0 1 {name=l13 sig_type=std_logic lab=GND} +C {lab_wire.sym} 930 -240 0 1 {name=l14 sig_type=std_logic lab=VDD} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 730 -480 0 1 {name=M2 +L=1 +W=3 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=2 +model=pfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 1110 -480 0 0 {name=M10 +L=1 +W=3 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=2 +model=pfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/pfet_01v8.sym} 990 -360 0 0 {name=M15 +L=0.15 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=1 +model=pfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/pfet_01v8.sym} 1270 -360 0 1 {name=M17 +L=0.15 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=1 +model=pfet_01v8 +spiceprefix=X +} +C {sky130_stdcells/inv_1.sym} 70 -420 0 0 {name=x1 VGND=gnd VNB=gnd VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/inv_1.sym} 220 -420 0 0 {name=x2 VGND=gnd VNB=gnd VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/inv_1.sym} 80 -120 0 0 {name=x3 VGND=gnd VNB=gnd VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/inv_1.sym} 240 -120 0 0 {name=x4 VGND=gnd VNB=gnd VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_fd_pr/nfet_01v8_lvt.sym} 1110 -60 0 0 {name=M1 +L=1 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=2 +model=nfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/nfet_01v8_lvt.sym} 690 -60 0 0 {name=M3 +L=1 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=2 +model=nfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/nfet_01v8.sym} 990 -180 0 0 {name=M4 +L=0.15 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=1 +model=nfet_01v8 +spiceprefix=X +} +C {sky130_fd_pr/nfet_01v8.sym} 1270 -180 0 1 {name=M5 +L=0.15 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=1 +model=nfet_01v8 +spiceprefix=X +}
diff --git a/xschem/chargepump/chargepump.sym b/xschem/chargepump/chargepump.sym new file mode 100644 index 0000000..905369b --- /dev/null +++ b/xschem/chargepump/chargepump.sym
@@ -0,0 +1,68 @@ +v {xschem version=2.9.7 file_version=1.1} +G {type=subcircuit +format="@name @pinlist @symname w_invp=@w_invp l_invp=@l_invp w_invn=@w_invn l_invn=@l_invn w_currn=@w_currn l_currn=@l_currn w_currp=@w_currp l_currp=@l_currp m_curr=@m_curr w_swn=@w_swn l_swn=@l_swn w_swp=@w_swp l_swp=@l_swp m_sw=@m_sw " +template="name=x1 w_invp=3u l_invp=0.18u w_invn=1u l_invn=0.18u w_currn=1u l_currn=4u w_currp=3u l_currp=4u m_curr=20 w_swn=1u l_swn=0.18u w_swp=3u l_swp=0.18u m_sw=4" +generic_type="w_invp=w_real l_invp=w_real w_invn=w_real l_invn=w_real w_currn=w_real l_currn=w_real w_currp=w_real l_currp=w_real m_curr=w_real w_swn=w_real l_swn=w_real w_swp=w_real l_swp=w_real m_sw=w_real"} +V {} +S {} +E {} +L 4 -90 -80 90 -80 {} +L 4 -90 80 90 80 {} +L 4 -90 -80 -90 80 {} +L 4 90 -80 90 80 {} +L 4 -110 -10 -90 -10 {} +L 4 90 0 110 0 {} +L 4 -60 -100 -60 -80 {} +L 4 -110 10 -90 10 {} +L 4 0 20 0 30 {} +L 4 -10 10 0 20 {} +L 4 0 -30 0 -20 {} +L 4 0 -10 0 0 {} +L 4 -10 -20 0 -10 {} +L 4 0 0 0 10 {} +L 4 0 0 60 0 {} +L 4 0 34 0 44 {} +L 4 0 -46 0 -36 {} +L 4 -0 50 0 60 {} +L 4 0 -60 -0 -50 {} +L 4 -50 10 -48 10 {} +L 4 -44 10 -42 10 {} +L 4 -38 10 -36 10 {} +L 4 -32 10 -30 10 {} +L 4 -26 10 -24 10 {} +L 4 -24 12 -24 14 {} +L 4 -22 16 -20 16 {} +L 4 -16 16 -14 16 {} +L 4 -10 16 -8 16 {} +L 4 -50 -10 -48 -10 {} +L 4 -44 -10 -42 -10 {} +L 4 -38 -10 -36 -10 {} +L 4 -32 -10 -30 -10 {} +L 4 -26 -10 -24 -10 {} +L 4 -24 -14 -24 -12 {} +L 4 -22 -14 -20 -14 {} +L 4 -16 -14 -14 -14 {} +L 4 -10 -14 -8 -14 {} +L 4 -68 -10 -66 -10 {} +L 4 -62 -10 -60 -10 {} +L 4 -56 -10 -54 -10 {} +L 7 0 -100 0 -80 {} +L 7 0 80 0 100 {} +B 5 -2.5 -102.5 2.5 -97.5 {name=VDD dir=inout } +B 5 -112.5 -12.5 -107.5 -7.5 {name=UP dir=in } +B 5 107.5 -2.5 112.5 2.5 {name=OUT dir=out } +B 5 -62.5 -102.5 -57.5 -97.5 {name=BIAS dir=in } +B 5 -112.5 7.5 -107.5 12.5 {name=DOWN dir=in } +B 5 -2.5 97.5 2.5 102.5 {name=GND dir=inout } +A 4 0 40 9.848857801796104 156.0375110254218 360 {} +A 4 0 -40 9.848857801796104 156.0375110254218 360 {} +P 4 4 0 47 3 44 -3 44 0 47 {} +P 4 4 0 -33 3 -36 -3 -36 0 -33 {} +T {@symname} 17 84 0 0 0.3 0.3 {} +T {@name} 25 108 0 0 0.2 0.2 {} +T {VDD} 12 -75 0 1 0.2 0.2 {} +T {UP} -85 -16 0 0 0.2 0.2 {} +T {OUT} 85 -6 0 1 0.2 0.2 {} +T {BIAS} -72 -75 0 0 0.2 0.2 {} +T {DOWN} -87 4 0 0 0.2 0.2 {} +T {GND} -12 75 2 1 0.2 0.2 {}
diff --git a/xschem/chargepump/tests/chargepump_tb.sch b/xschem/chargepump/tests/chargepump_tb.sch new file mode 100644 index 0000000..8c0a660 --- /dev/null +++ b/xschem/chargepump/tests/chargepump_tb.sch
@@ -0,0 +1,96 @@ +v { version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 1520 -150 1520 -90 {lab=#net1} +N 1170 -600 1170 -250 {lab=VDD} +N 0 -600 0 -180 {lab=VDD} +N 810 -0 1170 0 {lab=0} +N 0 -120 0 0 {lab=0} +N 560 -40 560 0 {lab=0} +N 1520 -30 1520 0 {lab=0} +N 810 -600 1170 -600 {lab=VDD} +N 310 0 560 0 {lab=0} +N 1170 0 1520 0 {lab=0} +N 310 -40 310 0 {lab=0} +N 1170 -50 1170 0 {lab=0} +N 250 -340 250 0 { lab=0} +N 230 -370 250 -370 { lab=0} +N 230 -370 230 0 { lab=0} +N 320 -370 1110 -370 { lab=#net2} +N 1110 -370 1110 -250 { lab=#net2} +N 250 -430 250 -400 { lab=#net2} +N 250 -430 320 -430 { lab=#net2} +N 320 -430 320 -370 { lab=#net2} +N 250 -600 250 -530 { lab=VDD} +N 1280 -150 1410 -150 { lab=out} +N 1470 -150 1520 -150 { lab=#net1} +N 810 -90 810 -0 { lab=0} +N 890 -140 1060 -140 { lab=DOWN} +N 890 -160 1060 -160 { lab=UP} +N 810 -600 810 -210 { lab=VDD} +N 250 0 310 0 {lab=0} +N 230 0 250 0 {lab=0} +N 0 0 230 0 {lab=0} +N 250 -470 250 -430 { lab=#net2} +N 290 -370 320 -370 { lab=#net2} +N 0 -600 250 -600 {lab=VDD} +N 560 0 810 -0 {lab=0} +N 250 -600 810 -600 {lab=VDD} +N 310 -160 730 -160 { lab=#net3} +N 310 -160 310 -100 { lab=#net3} +N 560 -140 560 -100 { lab=#net4} +N 560 -140 730 -140 { lab=#net4} +C {vsource.sym} 560 -70 0 0 {name=V1 value="pulse(0 1.8 0ns 1ns 1ns 50ns 100ns)"} +C {vsource.sym} 0 -150 0 0 {name=Vdd value=1.8} +C {isource.sym} 250 -500 0 0 {name=I0 value=1m} +C {capa.sym} 1520 -60 0 0 {name=C1 +m=1 +value=100p +footprint=1206 +device="ceramic capacitor"} +C {lab_wire.sym} 0 -600 0 1 {name=l1 sig_type=std_logic lab=VDD} +C {lab_wire.sym} 1010 -140 0 1 {name=l2 sig_type=std_logic lab=DOWN} +C {lab_wire.sym} 1320 -150 0 1 {name=l6 sig_type=std_logic lab=out} +C {lab_wire.sym} 0 0 0 1 {name=l7 sig_type=std_logic lab=0} +C {code.sym} 1460 -350 0 0 {name=STIMULI +tclcommand="xschem edit_vi_prop" +value=" +*.option PARHIER=LOCAL RUNLVL=6 post MODMONTE=1 warn maxwarns=400 +*.option ITL4=20000 ITL5=0 +* .option sampling_method = SRS +* .option method=gear + +.lib "sky130_fd_pr/models/sky130.lib.spice" tt +.include sky130_fd_pr/models/sky130_fd_pr__model__pnp.model.spice + +.ic v(out) 0.9 + +.temp 30 +.tran 1e-9 50e-6 +*.dc Vdd 1.8 1.8 0.25 +"} +C {chargepump/chargepump.sym} 1170 -150 0 0 {name=x1 w_invp=3u l_invp=0.18u w_invn=1u l_invn=0.18u w_currn=1u l_currn=4u w_currp=3u l_currp=4u m_curr=20 w_swn=1u l_swn=0.18u w_swp=3u l_swp=0.18u m_sw=4} +C {vsource.sym} 310 -70 0 0 {name=V2 value="pulse(0 1.8 0ns 1ns 1ns 75ns 150ns)"} +C {lab_wire.sym} 1010 -160 0 1 {name=l3 sig_type=std_logic lab=UP} +C {code.sym} 1590 -350 0 0 {name=STDCELL_MODELS +only_toplevel=true +place=end +format=tcleval(@value\\) +value="[sky130_models]" +} +C {sky130_fd_pr/nfet_01v8_lvt.sym} 270 -370 0 1 {name=M1 +L=1 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=200 +model=nfet_01v8_lvt +spiceprefix=X +} +C {ammeter.sym} 1440 -150 3 0 {name=Vmeas} +C {phase_frequency_detector/phase_frequency_detector.sym} 810 -150 0 0 {name=x2}
diff --git a/xschem/fractional_n_divider/.gitignore b/xschem/fractional_n_divider/.gitignore new file mode 100644 index 0000000..a1e0396 --- /dev/null +++ b/xschem/fractional_n_divider/.gitignore
@@ -0,0 +1 @@ +runs/
diff --git a/xschem/fractional_n_divider/models/__pycache__/fractional_n_divider_model.cpython-37.pyc b/xschem/fractional_n_divider/models/__pycache__/fractional_n_divider_model.cpython-37.pyc new file mode 100644 index 0000000..a51d157 --- /dev/null +++ b/xschem/fractional_n_divider/models/__pycache__/fractional_n_divider_model.cpython-37.pyc Binary files differ
diff --git a/xschem/fractional_n_divider/models/__pycache__/lfsr_fib_model.cpython-37.pyc b/xschem/fractional_n_divider/models/__pycache__/lfsr_fib_model.cpython-37.pyc new file mode 100644 index 0000000..042c79b --- /dev/null +++ b/xschem/fractional_n_divider/models/__pycache__/lfsr_fib_model.cpython-37.pyc Binary files differ
diff --git a/xschem/fractional_n_divider/models/__pycache__/mash_mod_model.cpython-37.pyc b/xschem/fractional_n_divider/models/__pycache__/mash_mod_model.cpython-37.pyc new file mode 100644 index 0000000..3b77d96 --- /dev/null +++ b/xschem/fractional_n_divider/models/__pycache__/mash_mod_model.cpython-37.pyc Binary files differ
diff --git a/xschem/fractional_n_divider/models/fractional_n_divider_model.py b/xschem/fractional_n_divider/models/fractional_n_divider_model.py new file mode 100644 index 0000000..9445a00 --- /dev/null +++ b/xschem/fractional_n_divider/models/fractional_n_divider_model.py
@@ -0,0 +1,76 @@ +""" + A model of the fractional N divider. +""" + +import mash_mod_model + +class fractional_n_divider_model(): + + def __init__(self, integer_width, modulus_width, order, divide_value=1): + """ + Instatiate the model object + """ + + # store the modulator parameters + self.integer_width = integer_width + self.modulus_width = modulus_width + self.order = order + self.divide_value = divide_value + + # create internal state variables + self.count = 0 + self.mash_output = 0 + + # create the mash model object + self.mash_mod_obj = mash_mod_model.mash_mod_model(self.modulus_width, self.order) + + + def reset(self): + """ + Reset the internal state of the modulator + """ + + # reset internal state variables + self.count = 0 + self.mash_output = 0 + self.mash_mod_obj.reset() + + + def set_divide_value(self, divide_value): + """ + Set a new divide value + """ + + # reset internal state variables + self.divide_value = divide_value + + + def update(self): + """ + Update the state of the modulator with new data + """ + + # combine to find a new count target + integer_component = int(self.divide_value) + count_target = integer_component + self.mash_output + + # print('count_target', count_target, 'count', self.count) + + if self.count == count_target: + + # pull out the fractioanal component + fractional_component = self.divide_value % 1 + + # find out the next mash modulated value + self.mash_output = self.mash_mod_obj.update(fractional_component) + + # reset and siganl a rising edge + self.count = 0 + output_data = 1 + + else: + + self.count += 1 + output_data = 0 + + return output_data \ No newline at end of file
diff --git a/xschem/fractional_n_divider/models/lfsr_fib_model.py b/xschem/fractional_n_divider/models/lfsr_fib_model.py new file mode 100644 index 0000000..5c301b9 --- /dev/null +++ b/xschem/fractional_n_divider/models/lfsr_fib_model.py
@@ -0,0 +1,47 @@ +""" + A model of the LFSR quasi-random number generator. +""" + +class lfsr_fib_model(): + + def __init__(self, polynomial_length=8, initial_fill=1, taps=0x2D): + """ + Instatiate the model object + """ + + # store the modulator parameters + self.polynomial_length = polynomial_length + self.initial_fill = [int(digit) for digit in format(initial_fill, '#0'+str(polynomial_length+2)+'b')[2:]][::-1] + self.taps = [int(digit) for digit in format(taps, '#0'+str(polynomial_length+2)+'b')[2:]][::-1] + + # create internal state variables + self.reset() + + + def reset(self): + """ + Reset the internal state of the modulator + """ + + # reset internal state variables + self.shift_register = self.initial_fill + + + def update(self, input_data): + """ + Update the state of the LFSR with new data + """ + + previous_out = self.shift_register[0] + + if input_data["ce"]: + + # XOR the selected tap points + xored = self.shift_register[0] & self.taps[0] + for i in range(1, self.polynomial_length-1): + xored ^= self.shift_register[i] & self.taps[i] + + # update the shift register + self.shift_register = self.shift_register[1:] + [xored ^ input_data["in"]] + + return previous_out \ No newline at end of file
diff --git a/xschem/fractional_n_divider/models/mash_mod_model.py b/xschem/fractional_n_divider/models/mash_mod_model.py new file mode 100644 index 0000000..34cafa4 --- /dev/null +++ b/xschem/fractional_n_divider/models/mash_mod_model.py
@@ -0,0 +1,78 @@ +""" + A model of the MASH mdulator. +""" + +class mash_mod_model(): + + def __init__(self, modulus_width, order): + """ + Instatiate the model object + """ + + # store the modulator parameters + self.modulus_width = modulus_width + self.order = order + + # create internal state variables + self.accum_delay = [0.0]*order + self.accum_out = [0.0]*order + self.accum_carry = [0.0]*order + self.sum_delay = [0.0]*(order-1) + + # calculate the delay in processing + # self.delay = 4*(self.order-1)+1 + self.delay = 4*(self.order-1) + self.delay_line = [0.0] * self.delay + + + def reset(self): + """ + Reset the internal state of the modulator + """ + + # reset internal state variables + self.accum_delay = [0.0]*self.order + self.accum_out = [0.0]*self.order + self.accum_carry = [0.0]*self.order + self.sum_delay = [0.0]*(self.order-1) + self.delay_line = [0] * self.delay + + + def update(self, input_data): + """ + Update the state of the modulator with new data + """ + + # convert fractional number to unsigned integer + input_data_int = int(input_data * 2**self.modulus_width) + + # loop through the different stages in the modulator + for i in range(self.order): + + # calculate accumulator outputs + if i == 0: + self.accum_out[i] = input_data_int + self.accum_delay[i] + else: + self.accum_out[i] = self.accum_out[i-1] + self.accum_delay[i] + + # treat as fixed point numbers + self.accum_carry[i] = int(self.accum_out[i]/(2**self.modulus_width)) + self.accum_out[i] = int((self.accum_out[i])%(2**self.modulus_width)) + self.accum_delay[i] = self.accum_out[i] + + # tally up carries + mash_output = self.accum_carry[-1] + for i in range(self.order-2, -1, -1): + temp_mash_output = mash_output + mash_output += self.accum_carry[i] - self.sum_delay[i] + self.sum_delay[i] = temp_mash_output + + # ensure the output wraps around + if mash_output == 4: + mash_output = -4 + + # delay to track pipelining + output_data = self.delay_line[-1] + self.delay_line = [mash_output] + self.delay_line[:-1] + + return output_data \ No newline at end of file
diff --git a/xschem/fractional_n_divider/models/prim_cells.lib b/xschem/fractional_n_divider/models/prim_cells.lib new file mode 100644 index 0000000..681d34b --- /dev/null +++ b/xschem/fractional_n_divider/models/prim_cells.lib
@@ -0,0 +1,54 @@ +/* Primitive cells, Clifford Wolf, http://http://www.clifford.at/yosys */ + +library(demo) { + cell(BUF) { + area: 6; + pin(A) { direction: input; } + pin(Y) { direction: output; + function: "A"; } + } + cell(NOT) { + area: 3; + pin(A) { direction: input; } + pin(Y) { direction: output; + function: "A'"; } + } + cell(NAND) { + area: 4; + pin(A) { direction: input; } + pin(B) { direction: input; } + pin(Y) { direction: output; + function: "(A*B)'"; } + } + cell(NOR) { + area: 4; + pin(A) { direction: input; } + pin(B) { direction: input; } + pin(Y) { direction: output; + function: "(A+B)'"; } + } + cell(DFF) { + area: 18; + ff(IQ, IQN) { clocked_on: C; + next_state: D; } + pin(C) { direction: input; + clock: true; } + pin(D) { direction: input; } + pin(Q) { direction: output; + function: "IQ"; } + } + cell(DFFSR) { + area: 18; + ff("IQ", "IQN") { clocked_on: C; + next_state: D; + preset: S; + clear: R; } + pin(C) { direction: input; + clock: true; } + pin(D) { direction: input; } + pin(Q) { direction: output; + function: "IQ"; } + pin(S) { direction: input; } + pin(R) { direction: input; } + } +}
diff --git a/xschem/fractional_n_divider/models/prim_cells.v b/xschem/fractional_n_divider/models/prim_cells.v new file mode 100644 index 0000000..a77a1d6 --- /dev/null +++ b/xschem/fractional_n_divider/models/prim_cells.v
@@ -0,0 +1,44 @@ +/* Primitive cells, Clifford Wolf, http://http://www.clifford.at/yosys */ + +module BUF(A, Y); + input A; + output Y; + assign Y = A; +endmodule + +module NOT(A, Y); + input A; + output Y; + assign Y = ~A; +endmodule + +module NAND(A, B, Y); + input A, B; + output Y; + assign Y = ~(A & B); +endmodule + +module NOR(A, B, Y); + input A, B; + output Y; + assign Y = ~(A | B); +endmodule + +module DFF(C, D, Q); + input C, D; + output reg Q; + always @(posedge C) + Q <= D; +endmodule + +module DFFSR(C, D, Q, S, R); + input C, D, S, R; + output reg Q; + always @(posedge C, posedge S, posedge R) + if (S) + Q <= 1'b1; + else if (R) + Q <= 1'b0; + else + Q <= D; +endmodule
diff --git a/xschem/fractional_n_divider/models/prim_cells_ngspice.mod b/xschem/fractional_n_divider/models/prim_cells_ngspice.mod new file mode 100644 index 0000000..0a537f8 --- /dev/null +++ b/xschem/fractional_n_divider/models/prim_cells_ngspice.mod
@@ -0,0 +1,48 @@ +* ngspice digital cells, Uros Platise, http://http://www.clifford.at/yosys + +.global d_low d_high + +.model digital_pulldown d_pulldown +.model digital_pullup d_pullup + +Ad_pulldown d_low digital_pulldown +Ad_pullup d_high digital_pullup + +.SUBCKT BUF A Y +.model buffer1 d_buffer +Abuf A Y buffer1 +.ENDS NOT + +.SUBCKT NOT A Y +.model not1 d_inverter +Anot A Y not1 +.ENDS NOT + +.SUBCKT NAND A B Y +.model nand1 d_nand +Anand [A B] Y nand1 +.ENDS NAND + +.SUBCKT NOR A B Y +.model nor1 d_nor +Anand [A B] Y nor1 +.ENDS NOR + +.SUBCKT DLATCH E D Q +.model latch1 d_latch +Alatch D E null null Q nQ latch1 +.ENDS DLATCH + +.SUBCKT DFF C D Q +.model dff1 d_dff (clk_delay = 13.0e-9 set_delay = 25.0e-9 ++ reset_delay = 27.0e-9 ic = 2 rise_delay = 10.0e-9 ++ fall_delay = 3e-9) +Adff D C null null Q nQ dff1 +.ENDS DFF + +.SUBCKT DFFSR C D Q S R +.model dffsr1 d_dff (clk_delay = 0.1e-9 set_delay = 0.1e-9 ++ reset_delay = 0.1e-9 ic = 0 rise_delay = 0.1e-9 ++ fall_delay = 0.1e-9) +Adffsr D C S R Q nQ dffsr1 +.ENDS DFF \ No newline at end of file
diff --git a/xschem/phase_frequency_detector/.gitignore b/xschem/phase_frequency_detector/.gitignore new file mode 100644 index 0000000..a1e0396 --- /dev/null +++ b/xschem/phase_frequency_detector/.gitignore
@@ -0,0 +1 @@ +runs/
diff --git a/xschem/phase_frequency_detector/phase_frequency_detector.sch b/xschem/phase_frequency_detector/phase_frequency_detector.sch new file mode 100644 index 0000000..d5e1637 --- /dev/null +++ b/xschem/phase_frequency_detector/phase_frequency_detector.sch
@@ -0,0 +1,42 @@ +v { version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 160 -300 160 -200 { lab=rst_b} +N 160 -300 190 -300 { lab=rst_b} +N 160 -60 190 -60 { lab=rst_b} +N 160 -200 160 -60 { lab=rst_b} +N 370 -100 520 -100 { lab=down} +N 520 -180 520 -100 { lab=down} +N 490 -180 520 -180 { lab=down} +N 490 -220 520 -220 { lab=up} +N 520 -340 520 -220 { lab=up} +N 370 -340 520 -340 { lab=up} +N 520 -340 580 -340 { lab=up} +N 520 -100 580 -100 { lab=down} +N 80 -320 190 -320 { lab=vdd} +N 80 -420 80 -320 { lab=vdd} +N -0 -420 80 -420 { lab=vdd} +N -0 -340 190 -340 { lab=ref} +N 0 -100 190 -100 { lab=fb} +N 320 -200 370 -200 { lab=#net1} +N 160 -200 240 -200 { lab=rst_b} +N 80 -80 190 -80 { lab=vdd} +N 80 -320 80 -80 { lab=vdd} +C {sky130_stdcells/dfrtp_4.sym} 280 -80 0 0 {name=x1 VGND=vss VNB=vss VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/dfrtp_4.sym} 280 -320 0 0 {name=x2 VGND=vss VNB=vss VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/and2_0.sym} 430 -200 0 1 {name=x3 VGND=vss VNB=vss VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {iopin.sym} 0 -420 0 1 {name=p1 lab=vdd} +C {iopin.sym} 0 0 0 1 {name=p2 lab=vss} +C {ipin.sym} 0 -100 0 0 {name=p3 lab=fb} +C {ipin.sym} 0 -340 0 0 {name=p4 lab=ref} +C {opin.sym} 580 -100 0 0 {name=p5 lab=down} +C {opin.sym} 580 -340 0 0 {name=p6 lab=up} +C {sky130_stdcells/clkinv_1.sym} 280 -200 0 1 {name=x4 VGND=vss VNB=vss VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {lab_pin.sym} 160 -200 0 0 {name=l1 sig_type=std_logic lab=rst_b} +C {sky130_stdcells/tapvpwrvgnd_1.sym} 490 -470 0 0 {name=x5[4:1] VGND=vss VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/decap_4.sym} 740 -480 0 0 {name=x5 VGND=vss VNB=vss VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/decap_6.sym} 740 -430 0 0 {name=x6 VGND=vss VNB=vss VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ } +C {sky130_stdcells/decap_3.sym} 740 -380 0 0 {name=x7 VGND=vss VNB=vss VPB=vdd VPWR=vdd prefix=sky130_fd_sc_hd__ }
diff --git a/xschem/phase_frequency_detector/phase_frequency_detector.sym b/xschem/phase_frequency_detector/phase_frequency_detector.sym new file mode 100644 index 0000000..1a71ef2 --- /dev/null +++ b/xschem/phase_frequency_detector/phase_frequency_detector.sym
@@ -0,0 +1,33 @@ +v {xschem version=2.9.8 file_version=1.2} +G {} +K {type=subcircuit +format="@name @pinlist @symname" +template="name=x1" +} +V {} +S {} +E {} +L 4 -60 -40 60 -40 {} +L 4 -60 40 60 40 {} +L 4 -60 -40 -60 40 {} +L 4 60 -40 60 40 {} +L 4 -80 -10 -60 -10 {} +L 4 60 -10 80 -10 {} +L 4 -80 10 -60 10 {} +L 4 60 10 80 10 {} +L 7 0 -60 0 -40 {} +L 7 0 40 0 60 {} +B 5 -2.5 -62.5 2.5 -57.5 {name=vdd dir=inout name=p1 } +B 5 -82.5 -12.5 -77.5 -7.5 {name=ref dir=in name=p4 } +B 5 77.5 -12.5 82.5 -7.5 {name=up dir=out name=p6 } +B 5 -82.5 7.5 -77.5 12.5 {name=fb dir=in name=p3 } +B 5 77.5 7.5 82.5 12.5 {name=down dir=out name=p5 } +B 5 -2.5 57.5 2.5 62.5 {name=vss dir=inout name=p2 } +T {@symname} 24 64 0 0 0.3 0.3 {} +T {@name} 25 48 0 0 0.2 0.2 {} +T {vdd} 16 -35 0 1 0.2 0.2 {} +T {ref} -55 -14 0 0 0.2 0.2 {} +T {up} 55 -14 0 1 0.2 0.2 {} +T {fb} -55 6 0 0 0.2 0.2 {} +T {down} 55 6 0 1 0.2 0.2 {} +T {vss} -6 35 2 1 0.2 0.2 {}
diff --git a/xschem/phase_frequency_detector/test/phase_frequency_detector_tb.sch b/xschem/phase_frequency_detector/test/phase_frequency_detector_tb.sch new file mode 100644 index 0000000..c686b66 --- /dev/null +++ b/xschem/phase_frequency_detector/test/phase_frequency_detector_tb.sch
@@ -0,0 +1,88 @@ +v { version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 580 -250 580 -210 {lab=VDD} +N 0 -250 580 -250 {lab=VDD} +N 0 -250 0 -180 {lab=VDD} +N 330 -140 330 -100 {lab=fb} +N 580 0 880 0 {lab=GND} +N 0 -120 0 0 {lab=GND} +N 330 -40 330 0 {lab=GND} +N 880 -30 880 0 {lab=GND} +N 70 0 330 0 {lab=GND} +N 330 -140 500 -140 {lab=fb} +N 70 -160 70 -100 {lab=ref} +N 70 -160 500 -160 {lab=ref} +N 70 -40 70 0 {lab=GND} +N 580 -90 580 0 {lab=GND} +N 330 0 580 0 {lab=GND} +N 0 0 70 0 {lab=GND} +N 960 -30 960 0 {lab=GND} +N 880 0 960 0 {lab=GND} +N 1000 -170 1090 -170 {lab=up} +N 1000 -170 1000 -160 {lab=up} +N 1000 -130 1090 -130 {lab=down} +N 1000 -140 1000 -130 {lab=down} +N 1130 -120 1130 -90 {lab=out} +N 1130 0 1220 0 {lab=GND} +N 1220 -190 1220 0 {lab=GND} +N 1130 -190 1220 -190 {lab=GND} +N 1130 -190 1130 -180 {lab=GND} +N 1130 -30 1130 0 {lab=GND} +N 660 -160 1000 -160 { lab=up} +N 660 -140 1000 -140 { lab=down} +N 880 -90 1020 -90 {} +N 1020 -90 1020 0 {} +N 1020 0 1130 0 {lab=GND} +N 960 0 1020 0 {lab=GND} +C {phase_frequency_detector/phase_frequency_detector.sym} 580 -150 0 0 {name=x1} +C {vsource.sym} 330 -70 0 0 {name=V1 value="pulse(0 1.8 delay 1ns 1ns \{0.5*period\} \{period\})"} +C {vsource.sym} 0 -150 0 0 {name=Vdd value=1.8} +C {capa.sym} 880 -60 0 0 {name=C1 +m=1 +value=0.1p +footprint=1206 +device="ceramic capacitor"} +C {lab_wire.sym} 0 -250 0 1 {name=l1 sig_type=std_logic lab=VDD} +C {lab_wire.sym} 420 -140 0 1 {name=l2 sig_type=std_logic lab=fb} +C {lab_wire.sym} 720 -140 0 1 {name=l6 sig_type=std_logic lab=down +} +C {vsource.sym} 70 -70 0 0 {name=V2 value="pulse(0 1.8 0ns 1ns 1ns 40ns 90ns)"} +C {lab_wire.sym} 420 -160 0 1 {name=l3 sig_type=std_logic lab=ref} +C {lab_wire.sym} 720 -160 0 1 {name=l4 sig_type=std_logic lab=up} +C {capa.sym} 960 -60 0 0 {name=C2 +m=1 +value=0.1p +footprint=1206 +device="ceramic capacitor"} +C {vccs.sym} 1130 -150 0 0 {name=G1 value=1e-6} +C {capa.sym} 1130 -60 0 0 {name=C3 +m=1 +value=1p +footprint=1206 +device="ceramic capacitor"} +C {lab_wire.sym} 1130 -100 0 1 {name=l5 sig_type=std_logic lab=out} +C {code.sym} 960 -320 0 0 {name=STDCELL_MODELS +only_toplevel=true +place=end +format=tcleval(@value\\) +value="[sky130_models]" +} +C {gnd.sym} 0 0 0 0 {name=l7 lab=GND} +C {code.sym} 830 -320 0 0 {name=simulation only_toplevel=false value=" +.temp 27 + +.lib "sky130_fd_pr/models/sky130.lib.spice" tt +.include sky130_fd_pr/models/sky130_fd_pr__model__pnp.model.spice + +.param delay=0 +.param period=100e-9 + +.param vdd=1.8 + + +.tran 0.1u 10u uic +"}
diff --git a/xschem/rf_bufferdiff_hp/rf_bufferdiff_hp.sch b/xschem/rf_bufferdiff_hp/rf_bufferdiff_hp.sch new file mode 100644 index 0000000..54e0872 --- /dev/null +++ b/xschem/rf_bufferdiff_hp/rf_bufferdiff_hp.sch
@@ -0,0 +1,151 @@ +v { version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 0 -90 0 0 { lab=GND} +N 990 0 1080 -0 { lab=GND} +N 820 -100 820 0 { lab=GND} +N 490 -100 490 0 { lab=GND} +N 490 -130 510 -130 { lab=GND} +N 510 -130 510 0 { lab=GND} +N 800 -130 820 -130 { lab=GND} +N 800 -130 800 0 { lab=GND} +N 490 -180 490 -160 { lab=outp} +N 820 -180 820 -160 { lab=outn} +N 530 -350 620 -350 { lab=outn} +N 620 -350 690 -280 { lab=outn} +N 690 -280 820 -280 { lab=outn} +N 690 -350 780 -350 { lab=outp} +N 620 -280 690 -350 { lab=outp} +N 490 -280 620 -280 { lab=outp} +N 820 -420 820 -380 { lab=#net1} +N -0 -420 0 -150 { lab=#net1} +N 470 -350 490 -350 { lab=#net1} +N 490 -420 490 -380 { lab=#net1} +N 470 -420 470 -350 { lab=#net1} +N 820 -350 840 -350 { lab=#net1} +N 840 -420 840 -350 { lab=#net1} +N 820 -420 840 -420 { lab=#net1} +N 320 -30 320 0 { lab=GND} +N 320 -130 320 -90 { lab=#net2} +N 320 -130 450 -130 { lab=#net2} +N 990 -30 990 0 { lab=GND} +N 990 -130 990 -90 { lab=#net3} +N 860 -130 990 -130 { lab=#net3} +N 820 0 990 0 { lab=GND} +N 690 -210 820 -210 { lab=outn} +N 490 -210 630 -210 { lab=outp} +N 820 -180 1080 -180 { lab=outn} +N 1080 -180 1080 -100 { lab=outn} +N 1080 -40 1080 0 { lab=GND} +N 230 -180 490 -180 { lab=outp} +N 230 -180 230 -100 { lab=outp} +N 230 -40 230 0 { lab=GND} +N 230 0 320 0 { lab=GND} +N 800 0 820 0 { lab=GND} +N 320 0 490 0 { lab=GND} +N 490 0 510 0 { lab=GND} +N 510 0 800 0 { lab=GND} +N 820 -320 820 -280 { lab=outn} +N 490 -320 490 -280 { lab=outp} +N 490 -420 820 -420 { lab=#net1} +N 470 -420 490 -420 { lab=#net1} +N 410 -420 470 -420 { lab=#net1} +N 820 -210 820 -180 { lab=outn} +N 490 -210 490 -180 { lab=outp} +N -0 -0 230 0 { lab=GND} +N 920 -310 920 -260 { lab=#net1} +N 920 -420 920 -370 { lab=#net1} +N 840 -420 920 -420 { lab=#net1} +N 410 -420 410 -370 { lab=#net1} +N 490 -280 490 -210 { lab=outp} +N 350 -310 410 -310 { lab=#net1} +N 350 -420 350 -310 { lab=#net1} +N 820 -280 820 -210 { lab=outn} +N 920 -310 970 -310 { lab=#net1} +N 970 -420 970 -310 { lab=#net1} +N 920 -420 970 -420 { lab=#net1} +N 350 -420 410 -420 { lab=#net1} +N -0 -420 350 -420 { lab=#net1} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_nfet.sym} 470 -130 0 0 {name=XMdiffp1 model=sky130_fd_pr__rf_nfet_01v8_lvt_aF08W3p00L0p15} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_pfet.sym} 510 -350 0 1 {name=XMctlpos model=sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15 m=8} +C {code.sym} 1150 -370 0 0 {name=STIMULI +tclcommand="xschem edit_vi_prop" +value=" +.param temp=27 +.temp 27 + +.save all i(R1) + +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM04W5p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM02W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF08W3p00L0p15.spice + +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W3p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p50.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM02W3p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM02W5p00L0p35.spice + +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W5p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W3p00L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W5p00L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF04W2p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF04W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W1p65L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15.spice + +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF06W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF06W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF04W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF02W0p84L0p15.spice + + +.lib sky130_fd_pr/models/sky130.lib.spice tt +*.include sky130_fd_pr/models/corners/tt.spice + + +.tran 0.01n 100n 95n +.param vdd=1.8 +.param vctl=0.2 +"} +C {vsource.sym} 0 -120 0 0 {name=Vvdd value=1.8} +C {gnd.sym} 0 0 0 0 {name=l3 lab=GND} +C {vsource.sym} 320 -60 0 0 {name=V3 value="pulse(0.2 1.6 0 10p 10p 200p 400p 0)"} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_nfet.sym} 840 -130 0 1 {name=XMdiffp2 model=sky130_fd_pr__rf_nfet_01v8_lvt_aF08W3p00L0p15} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_pfet.sym} 800 -350 0 0 {name=XMctlpos3 model=sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15 m=8} +C {vsource.sym} 990 -60 0 1 {name=V1 value="pulse(1.6 0.2 0 10p 10p 200p 400p 0)"} +C {res.sym} 660 -210 1 0 {name=R1 +value=50 +footprint=1206 +device=resistor +m=1} +C {capa.sym} 1080 -70 0 0 {name=C1 +m=1 +value=10p +footprint=1206 +device="ceramic capacitor"} +C {capa.sym} 230 -70 0 1 {name=C2 +m=1 +value=10p +footprint=1206 +device="ceramic capacitor"} +C {lab_pin.sym} 490 -210 0 0 {name=l1 sig_type=std_logic lab=outp} +C {lab_pin.sym} 820 -210 0 1 {name=l2 sig_type=std_logic lab=outn} +C {res.sym} 920 -340 2 0 {name=R2 +value=100 +footprint=1206 +device=resistor +m=1} +C {res.sym} 410 -340 2 0 {name=R3 +value=100 +footprint=1206 +device=resistor +m=1}
diff --git a/xschem/rf_bufferdiff_hp/rf_bufferdiff_hp_ai.sch b/xschem/rf_bufferdiff_hp/rf_bufferdiff_hp_ai.sch new file mode 100644 index 0000000..07330ac --- /dev/null +++ b/xschem/rf_bufferdiff_hp/rf_bufferdiff_hp_ai.sch
@@ -0,0 +1,160 @@ +v { version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 0 -90 0 0 { lab=GND} +N 610 -100 610 0 { lab=GND} +N 610 -130 630 -130 { lab=GND} +N 630 -130 630 0 { lab=GND} +N 440 -30 440 0 { lab=GND} +N 440 -130 440 -90 { lab=#net1} +N 440 -130 570 -130 { lab=#net1} +N 790 -40 790 0 { lab=GND} +N 360 -0 440 0 { lab=GND} +N 440 0 610 0 { lab=GND} +N 610 0 630 0 { lab=GND} +N -0 -0 230 0 { lab=GND} +N 610 -240 610 -160 { lab=outp} +N 230 -310 230 -270 { lab=#net2} +N 230 -310 320 -310 { lab=#net2} +N 230 -490 230 -400 { lab=#net3} +N 230 -490 360 -490 { lab=#net3} +N 360 -490 360 -450 { lab=#net3} +N 360 -350 360 -340 { lab=outp} +N 270 -370 360 -370 { lab=outp} +N 210 -370 230 -370 { lab=#net3} +N 210 -490 210 -370 { lab=#net3} +N 210 -490 230 -490 { lab=#net3} +N 230 -210 230 0 { lab=GND} +N -0 -490 210 -490 { lab=#net3} +N -0 -490 0 -150 { lab=#net3} +N 790 -240 790 -100 { lab=outp} +N 630 0 790 0 { lab=GND} +N 230 -340 230 -310 { lab=#net2} +N 360 -390 360 -370 { lab=outp} +N 360 -310 390 -310 { lab=#net3} +N 390 -490 390 -310 { lab=#net3} +N 360 -490 390 -490 { lab=#net3} +N 790 -240 860 -240 { lab=outp} +N 1000 -40 1000 0 { lab=GND} +N 1000 -240 1000 -100 { lab=outn} +N 1170 0 1340 0 { lab=GND} +N 920 -240 1000 -240 { lab=outn} +N 790 -0 1000 -0 { lab=GND} +N 390 -490 1390 -490 { lab=#net3} +N 360 -280 360 -0 { lab=GND} +N 360 -350 610 -350 { lab=outp} +N 610 -350 610 -240 { lab=outp} +N 610 -240 790 -240 { lab=outp} +N 1170 -100 1170 0 { lab=GND} +N 1150 -130 1170 -130 { lab=GND} +N 1150 -130 1150 0 { lab=GND} +N 1340 -30 1340 0 { lab=GND} +N 1340 -130 1340 -90 { lab=#net4} +N 1210 -130 1340 -130 { lab=#net4} +N 1420 0 1550 0 { lab=GND} +N 1150 0 1170 0 { lab=GND} +N 1170 -240 1170 -160 { lab=outn} +N 1550 -310 1550 -270 { lab=#net5} +N 1460 -310 1550 -310 { lab=#net5} +N 1550 -490 1550 -400 { lab=#net3} +N 1420 -490 1550 -490 { lab=#net3} +N 1420 -490 1420 -450 { lab=#net3} +N 1420 -350 1420 -340 { lab=outn} +N 1420 -370 1510 -370 { lab=outn} +N 1550 -370 1570 -370 { lab=#net3} +N 1570 -490 1570 -370 { lab=#net3} +N 1550 -490 1570 -490 { lab=#net3} +N 1550 -210 1550 0 { lab=GND} +N 1550 -340 1550 -310 { lab=#net5} +N 1420 -390 1420 -370 { lab=outn} +N 1390 -310 1420 -310 { lab=#net3} +N 1390 -490 1390 -310 { lab=#net3} +N 1390 -490 1420 -490 { lab=#net3} +N 1420 -280 1420 0 { lab=GND} +N 1170 -350 1420 -350 { lab=outn} +N 1170 -350 1170 -240 { lab=outn} +N 1000 -240 1170 -240 { lab=outn} +N 230 0 360 -0 { lab=GND} +N 360 -370 360 -350 { lab=outp} +N 1000 0 1150 0 { lab=GND} +N 1340 0 1420 0 { lab=GND} +N 1420 -370 1420 -350 { lab=outn} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_nfet.sym} 590 -130 0 0 {name=XMdiffp1 model=sky130_fd_pr__rf_nfet_01v8_lvt_aF08W3p00L0p15} +C {code.sym} 430 -670 0 0 {name=STIMULI +tclcommand="xschem edit_vi_prop" +value=" +.param temp=27 +.temp 27 + +.save all i(R1) + +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM04W5p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM02W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF08W3p00L0p15.spice + +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W3p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p50.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM02W3p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM02W5p00L0p35.spice + +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W5p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W3p00L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W5p00L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF04W2p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF04W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W1p65L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15.spice + +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF06W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF06W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF04W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF02W0p84L0p15.spice + + +.lib sky130_fd_pr/models/sky130.lib.spice tt +*.include sky130_fd_pr/models/corners/tt.spice + + +.tran 0.01n 100n 95n +.param vdd=1.8 +.param vctl=0.2 +"} +C {vsource.sym} 0 -120 0 0 {name=Vvdd value=1.8} +C {gnd.sym} 0 0 0 0 {name=l3 lab=GND} +C {vsource.sym} 440 -60 0 0 {name=V3 value="pulse(0.2 1.6 0 10p 10p 200p 400p 0)"} +C {res.sym} 890 -240 3 0 {name=R1 +value=50 +footprint=1206 +device=resistor +m=1} +C {capa.sym} 790 -70 0 1 {name=C2 +m=1 +value=10p +footprint=1206 +device="ceramic capacitor"} +C {lab_pin.sym} 610 -210 0 0 {name=l1 sig_type=std_logic lab=outp} +C {isource.sym} 360 -420 0 0 {name=I0 value=100u} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_pfet.sym} 340 -310 0 0 {name=XMctlpos1 model=sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15 m=8} +C {isource.sym} 230 -240 0 0 {name=I1 value=100u} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_pfet.sym} 250 -370 0 1 {name=XMctlpos2 model=sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15 m=8} +C {capa.sym} 1000 -70 0 0 {name=C1 +m=1 +value=10p +footprint=1206 +device="ceramic capacitor"} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_nfet.sym} 1190 -130 0 1 {name=XMdiffp2 model=sky130_fd_pr__rf_nfet_01v8_lvt_aF08W3p00L0p15} +C {vsource.sym} 1340 -60 0 1 {name=V1 value="pulse(1.6 0.2 0 10p 10p 200p 400p 0)"} +C {lab_pin.sym} 1170 -210 0 1 {name=l2 sig_type=std_logic lab=outn} +C {isource.sym} 1420 -420 0 1 {name=I2 value=100u} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_pfet.sym} 1440 -310 0 1 {name=XMctlpos3 model=sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15 m=8} +C {isource.sym} 1550 -240 0 1 {name=I3 value=100u} +C {/home/tom/repositories/amsat_txrx_ic/library/primitives/sky130_fd_pr__rf_pfet.sym} 1530 -370 0 0 {name=XMctlpos4 model=sky130_fd_pr__rf_pfet_01v8_aF06W3p00L0p15 m=8}
diff --git a/xschem/rf_driver_cell/rf_driver_cell.sch b/xschem/rf_driver_cell/rf_driver_cell.sch new file mode 100644 index 0000000..c48f8e8 --- /dev/null +++ b/xschem/rf_driver_cell/rf_driver_cell.sch
@@ -0,0 +1,216 @@ +v { version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 160 -500 160 -450 { lab=#net1} +N 400 -500 400 -450 { lab=#net1} +N 280 -90 300 -90 { lab=vss} +N 300 -90 300 0 { lab=vss} +N 280 0 300 0 { lab=vss} +N 280 -60 280 0 { lab=vss} +N 300 -530 400 -530 { lab=vss} +N 300 -530 300 -90 { lab=vss} +N 0 -530 120 -530 { lab=in} +N 160 -590 160 -560 { lab=#net2} +N 400 -610 400 -560 { lab=#net3} +N 320 -670 360 -670 { lab=#net3} +N 320 -610 400 -610 { lab=#net3} +N 320 -670 320 -610 { lab=#net3} +N 600 -760 600 -620 { lab=vdd} +N 400 -760 400 -700 { lab=vdd} +N 160 -760 160 -700 { lab=vdd} +N 140 -670 160 -670 { lab=vdd} +N 140 -760 140 -670 { lab=vdd} +N 400 -670 420 -670 { lab=vdd} +N 420 -760 420 -670 { lab=vdd} +N 600 -590 620 -590 { lab=vdd} +N 620 -760 620 -590 { lab=vdd} +N 600 -760 620 -760 { lab=vdd} +N 560 -50 580 -50 { lab=vss} +N 560 -50 560 0 { lab=vss} +N 600 -20 600 0 { lab=vss} +N 560 0 600 0 { lab=vss} +N 160 -530 300 -530 { lab=vss} +N 400 -640 400 -610 { lab=#net3} +N 200 -670 320 -670 { lab=#net3} +N 160 -760 400 -760 { lab=vdd} +N 140 -760 160 -760 { lab=vdd} +N 400 -760 420 -760 { lab=vdd} +N 0 -760 140 -760 { lab=vdd} +N 600 -100 600 -80 { lab=#net4} +N 160 -590 560 -590 { lab=#net2} +N 420 -760 600 -760 { lab=vdd} +N 440 -530 600 -530 { lab=#net5} +N 280 -450 400 -450 { lab=#net1} +N 160 -640 160 -590 { lab=#net2} +N 0 0 280 0 { lab=vss} +N 300 0 560 0 { lab=vss} +N 280 -450 280 -120 { lab=#net1} +N 600 -500 690 -500 { lab=#net5} +N 0 -90 240 -90 { lab=bias} +N 750 -500 800 -500 { lab=out} +N 560 -150 580 -150 { lab=vss} +N 560 -150 560 -50 { lab=vss} +N 600 -200 600 -180 { lab=#net5} +N 600 -200 800 -200 { lab=#net5} +N 800 -100 800 -80 { lab=#net4} +N 800 -0 840 0 { lab=vss} +N 800 -20 800 -0 { lab=vss} +N 160 -450 280 -450 { lab=#net1} +N 600 -530 600 -500 { lab=#net5} +N 600 -560 600 -530 { lab=#net5} +N 600 -0 800 -0 { lab=vss} +N 600 -100 800 -100 { lab=#net4} +N 800 -120 800 -100 { lab=#net4} +N 800 -200 800 -180 { lab=#net5} +N 820 -150 840 -150 { lab=vss} +N 840 -150 840 0 { lab=vss} +N 600 -120 600 -100 { lab=#net4} +N 600 -300 600 -280 { lab=#net4} +N 800 -300 800 -280 { lab=#net4} +N 600 -300 800 -300 { lab=#net4} +N 800 -320 800 -300 { lab=#net4} +N 600 -320 600 -300 { lab=#net4} +N 800 -220 800 -200 {} +N 600 -220 600 -200 {} +N 600 -400 600 -380 {} +N 800 -400 800 -380 {} +N 600 -400 800 -400 {} +N 600 -500 600 -400 {} +N 560 -350 560 -150 {} +N 560 -350 580 -350 {} +N 820 -350 840 -350 {} +N 840 -350 840 -150 {} +N 820 -250 840 -250 {} +N 560 -250 580 -250 {} +N 820 -50 840 -50 {} +C {sky130_fd_pr/nfet_01v8_lvt.sym} 140 -530 0 0 {name=M1 +L=0.15 +W=5 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=16 +model=nfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/nfet_01v8_lvt.sym} 260 -90 0 0 {name=M2 +L=1 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=40 +model=nfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/nfet_01v8_lvt.sym} 420 -530 0 1 {name=M3 +L=0.15 +W=5 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=16 +model=nfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/res_generic_nd.sym} 600 -50 0 0 {name=R1 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 380 -670 0 0 {name=M4 +L=0.35 +W=5 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=4 +model=pfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 580 -590 0 0 {name=M5 +L=0.35 +W=5 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=4 +model=pfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/pfet_01v8_lvt.sym} 180 -670 0 1 {name=M6 +L=0.35 +W=5 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=4 +model=pfet_01v8_lvt +spiceprefix=X +} +C {sky130_fd_pr/cap_mim_m3_1.sym} 720 -500 1 0 {name=C1 model=cap_mim_m3_1 W=15 L=15 MF=1 spiceprefix=X} +C {iopin.sym} 0 -760 0 1 {name=p1 lab=vdd} +C {iopin.sym} 0 0 0 1 {name=p2 lab=vss} +C {ipin.sym} 0 -530 0 0 {name=p3 lab=in} +C {ipin.sym} 0 -90 0 0 {name=p4 lab=bias} +C {opin.sym} 800 -500 0 0 {name=p5 lab=out} +C {sky130_fd_pr/res_generic_nd.sym} 800 -50 0 1 {name=R2 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1} +C {sky130_fd_pr/res_generic_nd.sym} 600 -150 0 0 {name=R3 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1} +C {sky130_fd_pr/res_generic_nd.sym} 800 -150 0 1 {name=R4 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1} +C {sky130_fd_pr/res_generic_nd.sym} 600 -250 0 0 {name=R5 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1} +C {sky130_fd_pr/res_generic_nd.sym} 800 -250 0 1 {name=R6 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1} +C {sky130_fd_pr/res_generic_nd.sym} 600 -350 0 0 {name=R7 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1} +C {sky130_fd_pr/res_generic_nd.sym} 800 -350 0 1 {name=R8 +rho=120 +W=0.5 +L=3 +model=res_generic_nd +spiceprefix=X +mult=1}
diff --git a/xschem/rf_driver_cell/rf_driver_cell.sym b/xschem/rf_driver_cell/rf_driver_cell.sym new file mode 100644 index 0000000..968ae17 --- /dev/null +++ b/xschem/rf_driver_cell/rf_driver_cell.sym
@@ -0,0 +1,30 @@ +v {xschem version=2.9.8 file_version=1.2} +G {} +K {type=subcircuit +format="@name @pinlist @symname" +template="name=x1" +} +V {} +S {} +E {} +L 4 -130 -30 130 -30 {} +L 4 -130 30 130 30 {} +L 4 -130 -30 -130 30 {} +L 4 130 -30 130 30 {} +L 4 -150 -10 -130 -10 {} +L 4 130 0 150 0 {} +L 4 -150 10 -130 10 {} +L 7 0 -50 0 -30 {} +L 7 0 30 0 50 {} +B 5 -2.5 -52.5 2.5 -47.5 {name=vdd dir=inout name=p1 } +B 5 -152.5 -12.5 -147.5 -7.5 {name=in dir=in name=p3 } +B 5 147.5 -2.5 152.5 2.5 {name=out dir=out name=p5 } +B 5 -152.5 7.5 -147.5 12.5 {name=bias dir=in name=p4 } +B 5 -2.5 47.5 2.5 52.5 {name=vss dir=inout name=p2 } +T {@symname} 49 54 0 0 0.3 0.3 {} +T {@name} 55 38 0 0 0.2 0.2 {} +T {vdd} -14 -25 0 0 0.2 0.2 {} +T {in} -125 -14 0 0 0.2 0.2 {} +T {out} 125 -4 0 1 0.2 0.2 {} +T {bias} -125 6 0 0 0.2 0.2 {} +T {vss} -14 15 0 0 0.2 0.2 {}
diff --git a/xschem/rf_driver_cell/test/rf_driver_cell_tb.sch b/xschem/rf_driver_cell/test/rf_driver_cell_tb.sch new file mode 100644 index 0000000..0d0a91d --- /dev/null +++ b/xschem/rf_driver_cell/test/rf_driver_cell_tb.sch
@@ -0,0 +1,115 @@ +v { version=2.9.8 file_version=1.2} +G {} +K {} +V {} +S {} +E {} +N 380 -250 380 -180 { lab=in} +N 380 -250 500 -250 { lab=in} +N 0 0 380 0 { lab=GND} +N 0 -560 0 -390 { lab=#net1} +N 0 -330 0 0 { lab=GND} +N 0 -560 580 -560 { lab=#net1} +N 380 -120 380 0 { lab=GND} +N 380 0 520 -0 { lab=GND} +N 800 -240 890 -240 { lab=out} +N 890 -240 890 -140 { lab=out} +N 650 0 890 0 { lab=GND} +N 890 -80 890 0 { lab=GND} +N 240 -200 240 -10 { lab=GND} +N 240 -10 240 -0 { lab=GND} +N 240 -320 240 -260 { lab=#net2} +N 240 -320 300 -320 { lab=#net2} +N 300 -320 300 -230 { lab=#net2} +N 240 -380 240 -320 { lab=#net2} +N 240 -550 240 -440 { lab=#net1} +N 240 -560 240 -550 { lab=#net1} +N 220 -230 240 -230 { lab=GND} +N 220 -230 220 0 { lab=GND} +N 650 -190 650 0 { lab=GND} +N 280 -230 500 -230 { lab=#net2} +N 650 -560 650 -290 { lab=#net1} +N 580 -560 650 -560 { lab=#net1} +N 520 -0 650 0 { lab=GND} +C {vsource.sym} 380 -150 0 0 {name=V1 value="pulse(0.1 1.7 0 10p 10p 200p 400p 0)"} +C {vsource.sym} 0 -360 0 0 {name=V2 value=1.8} +C {gnd.sym} 0 0 0 0 {name=l1 lab=GND} +C {lab_wire.sym} 870 -240 0 1 {name=l2 sig_type=std_logic lab=out} +C {lab_wire.sym} 380 -250 0 1 {name=l3 sig_type=std_logic lab=in} +C {code.sym} 720 -510 0 0 {name=STIMULI +tclcommand="xschem edit_vi_prop" +value=" +.param temp=27 +.temp 27 + +*.save v(ip) v(in) v(vctl) i(vdd) + +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM04W5p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM02W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aM02W1p65L0p15.spice + +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W3p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM04W5p00L0p50.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM02W3p00L0p35.spice +.include sky130_fd_pr/cells/rf_pfet_01v8_lvt/sky130_fd_pr__rf_pfet_01v8_lvt_aM02W5p00L0p35.spice + +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W5p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W3p00L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W5p00L0p25.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF04W2p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aF04W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_pfet_01v8/sky130_fd_pr__rf_pfet_01v8_aM02W1p65L0p25.spice + +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF06W3p00L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF06W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF04W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF02W1p65L0p15.spice +.include sky130_fd_pr/cells/rf_nfet_01v8_lvt/sky130_fd_pr__rf_nfet_01v8_lvt_aF02W0p84L0p15.spice + + +.lib sky130_fd_pr/models/sky130.lib.spice tt +*.include sky130_fd_pr/models/corners/tt.spice + + + +*.save all @M.xdut.xmmnr.msky130_fd_pr__nfet_01v8_lvt[vdsat] @M.xdut.xmmpr.msky130_fd_pr__pfet_01v8_lvt[vdsat] @M.xdut.xmcasn.msky130_fd_pr__nfet_01v8_lvt[gm] @M.xdut.xmcasn.msky130_fd_pr__nfet_01v8_lvt[vdsat] @M.xdut.xmloadmp.msky130_fd_pr__pfet_01v8_lvt[vdsat] @M.xdut.xmdiffn.msky130_fd_pr__pfet_01v8_lvt[gm] @M.xdut.xmgain.msky130_fd_pr__pfet_01v8_lvt[vdsat] @M.xdut.xmgain.msky130_fd_pr__pfet_01v8_lvt[gm] @M.xdut.xmcas_foldn.msky130_fd_pr__nfet_01v8_lvt[vdsat] @M.xdut.xmcurr_foldn.msky130_fd_pr__nfet_01v8_lvt[vdsat] @M.xdut.xmdiffn.msky130_fd_pr__pfet_01v8_lvt[vdsat] @M.xdut.xmloadcp.msky130_fd_pr__pfet_01v8_lvt[vdsat] @M.xdut.xmloadmp.msky130_fd_pr__pfet_01v8_lvt[vdsat] + +.save all @M.xm7.msky130_fd_pr__nfet_01v8_lvt[vdsat] + +*.control +* run +* setplot ac1 +* set units=degrees +* gnuplot bandgap_opamp_test db(out) db(gate) +*.endc + + +.tran 0.01n 100n uic +*.ac dec 100 10 100e9 +*.op + +.param vdd=1.8 +.param vctl=0.2 +"} +C {res.sym} 890 -110 0 0 {name=R2 +value=50 +footprint=1206 +device=resistor +m=1} +C {sky130_fd_pr/nfet_01v8_lvt.sym} 260 -230 0 1 {name=M7 +L=1 +W=1 +ad="'W * 0.29'" pd="'2 * (W + 0.29)'" +as="'W * 0.29'" ps="'2 * (W + 0.29)'" +nrd="'0.29 / W'" nrs="'0.29 / W'" +sa=0 sb=0 sd=0 +nf=1 mult=200 +model=nfet_01v8_lvt +spiceprefix=X +} +C {isource.sym} 240 -410 0 0 {name=I0 value=1m} +C {rf_driver_cell/rf_driver_cell.sym} 650 -240 0 0 {name=x1[32:1]}