-- File: [Cherry]<Thyme>Documentation>CMos2.0u25RingOsc.thy
-- simulation of Paul Martin's CMOS III ring oscillator
-- Last edited:
-- SChen, June 11, 1983  8:11 PM
-- McCreight, March 17, 1983  1:44 PM

library[mosmodels];
library[stdfunctions];

circuit[Lambda← 1.0, Temp← 25]= {

! ThymeBasics.thy
! CMos2.0u25.thy

  Vdd: node;
  powerSupply: voltage[Vdd, Gnd]= 5.0;

  Stage: circuit[i, o]= {
    PD: NETran[i, Gnd, o, Gnd|
      l← 2.5, w← 16, as← 240, ad← 240, ps← 46, pd← 46];
    PU: PETran[i, Vdd, o, Vdd|
      l← 2.5, w← 40, as← 600, ad← 600, ps← 70, pd← 70];
    };

  s1, s2, s3, s4, s5, s6, s7, s8, s9, s10,
    s11, s12, s13, s14, s15, s16, s17, s18, s19, out: node;
  stg1: Stage[s1, s2];
  stg2: Stage[s2, s3];
  stg3: Stage[s3, s4];
  stg4: Stage[s4, s5];
  stg5: Stage[s5, s6];
  stg6: Stage[s6, s7];
  stg7: Stage[s7, s8];
  stg8: Stage[s8, s9];
  stg9: Stage[s9, s10];
  stg10: Stage[s10, s11];
  stg11: Stage[s11, s12];
  stg12: Stage[s12, s13];
  stg13: Stage[s13, s14];
  stg14: Stage[s14, s15];
  stg15: Stage[s15, s16];
  stg16: Stage[s16, s17];
  stg17: Stage[s17, s18];
  stg18: Stage[s18, s19];
  stg19: Stage[s19, s1];
  stgOut: Stage[s19, out];
  };

plot["CMOS III ring oscillator simulation of June 11, 1983  5:43 PM",
  :1ns, -1, 6, out];

ic[Vdd ← 5.0, s1 ← 5.0, s3 ← 5.0, s5 ← 5.0, s7 ← 5.0, s9 ← 5.0, 
   s11 ← 5.0, s13 ← 5.0, s15 ← 5.0, s17 ← 5.0, s19 ← 5.0];
run[tMax ← 50ns, maxIter ← 1000];
dump