1 * Z:\trinary\code\circuits\tsign_test.asc
\r
2 XX1 $G_Vdd $G_Vss tpower
\r
3 V1 I1 0 PWL(0 -5 50E-9 -5 60E-9 -5 110E-9 -5 120E-9 -5 170E-9 -5 180E-9 0 230E-9 0 240E-9 0 290E-9 0 300E-9 0 350E-9 0 360E-9 5 410E-9 5 420E-9 5 470E-9 5 480E-9 5 530E-9 5 550E-9 -5 600E-9 -5 610E-9 -5 660E-9 -5 670E-9 -5 720E-9 -5 730E-9 0 780E-9 0 790E-9 0 840E-9 0 850E-9 0 900E-9 0 910E-9 5 960E-9 5 970E-9 5 1020E-9 5 1030E-9 5 1080E-9 5 1100E-9 -5 1150E-9 -5 1160E-9 -5 1210E-9 -5 1220E-9 -5 1270E-9 -5 1280E-9 0 1330E-9 0 1340E-9 0 1390E-9 0 1400E-9 0 1450E-9 0 1460E-9 5 1510E-9 5 1520E-9 5 1570E-9 5 1580E-9 5 1630E-9 5)
\r
4 V0 I0 0 PWL(0 -5 50E-9 -5 60E-9 0 110E-9 0 120E-9 5 170E-9 5 180E-9 -5 230E-9 -5 240E-9 0 290E-9 0 300E-9 5 350E-9 5 360E-9 -5 410E-9 -5 420E-9 0 470E-9 0 480E-9 5 530E-9 5 550E-9 -5 600E-9 -5 610E-9 0 660E-9 0 670E-9 5 720E-9 5 730E-9 -5 780E-9 -5 790E-9 0 840E-9 0 850E-9 5 900E-9 5 910E-9 -5 960E-9 -5 970E-9 0 1020E-9 0 1030E-9 5 1080E-9 5 1100E-9 -5 1150E-9 -5 1160E-9 0 1210E-9 0 1220E-9 5 1270E-9 5 1280E-9 -5 1330E-9 -5 1340E-9 0 1390E-9 0 1400E-9 5 1450E-9 5 1460E-9 -5 1510E-9 -5 1520E-9 0 1570E-9 0 1580E-9 5 1630E-9 5)
\r
5 V2 I2 0 PWL(0 -5 549n -5 550n 0 1099n 0 1100n 5)
\r
6 XX2 I0 I1 I2 SIGN4 I3 tsign4
\r
9 * block symbol definitions
\r
10 .subckt tpower Vdd Vss
\r
15 .subckt tsign4 I0 I1 I2 SIGN I3
\r
16 XXcheckI2 $G_Vss N001 $G_Vdd I2 N002 mux3-1
\r
17 XXcheckI3 $G_Vss N002 $G_Vdd I3 SIGN mux3-1
\r
18 XXcheckI1 $G_Vss I0 $G_Vdd I1 N001 mux3-1
\r
21 .subckt mux3-1 A B C S Q
\r
25 XXdecoder S CTRL_A CTRL_B CTRL_C decoder1-3
\r
28 .subckt tg IN_OUT OUT_IN CONTROL
\r
29 M1 OUT_IN _C IN_OUT $G_Vdd CD4007P
\r
30 M2 IN_OUT C OUT_IN $G_Vss CD4007N
\r
31 M3 $G_Vdd CONTROL _C $G_Vdd CD4007P
\r
32 M4 _C CONTROL $G_Vss $G_Vss CD4007N
\r
33 M5 $G_Vdd _C C $G_Vdd CD4007P
\r
34 M6 C _C $G_Vss $G_Vss CD4007N
\r
37 .subckt decoder1-3 IN OUT_i OUT_0 OUT_1
\r
38 XX1pti IN IN_pti pti
\r
39 XX1sti IN_pti OUT_1 sti
\r
41 XX0nor OUT_1 OUT_i OUT_0 tnor
\r
45 Xinv IN OUT NC_01 NC_02 tinv
\r
49 XXinv IN NC_01 OUT NC_02 tinv
\r
53 Xinv IN NC_01 NC_02 OUT tinv
\r
56 .subckt tnor A B TNOR_Out
\r
59 MN1 NN A $G_Vss $G_Vss CD4007N
\r
60 MP2 NI A $G_Vdd $G_Vdd CD4007P
\r
61 MN2 NN B $G_Vss $G_Vss CD4007N
\r
62 MP1 NI B NP $G_Vdd CD4007P
\r
65 .subckt tinv Vin PTI_Out STI_Out NTI_Out
\r
66 RP PTI_Out STI_Out 12k
\r
67 RN STI_Out NTI_Out 12k
\r
68 MN NTI_Out Vin $G_Vss $G_Vss CD4007N
\r
69 MP PTI_Out Vin $G_Vdd $G_Vdd CD4007P
\r
74 .lib C:\PROGRA~1\LTC\SwCADIII\lib\cmp\standard.mos
\r
76 * Note: VA and VB are PWL's that cycle through i,0,1;\nat different frequencies. Not on schematic due to length.
\r
77 * ^ 4-trit sign circuit isn't tested for I3 other than 0\nManually change input to $G_Vss or $G_Vdd,\nexpecting SIGN4 = -5 V and +5 V, to test it.
\r