Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #940

Re: Spice Question

Date 2014-09-01 21:22 -0700
From "Thomas D. Dean" <tomdean@speakeasy.org>
Newsgroups comp.soft-sys.math.maple
Subject Re: Spice Question
References <5dSdnVgc3KQX3p_JnZ2dnUVZ_u2dnZ2d@megapath.net> <87oav11pkw.fsf@san.rr.com> <F62dnXZJRbH2WZ_JnZ2dnUVZ_rCdnZ2d@megapath.net> <87fvgc1z3k.fsf@san.rr.com>
Message-ID <gYadnYk7vdRm2JjJnZ2dnUVZ_sKdnZ2d@megapath.net> (permalink)

Show all headers | View raw


On 08/31/14 08:02, Joe Riel wrote:

I believe this will generate a .mpl that represents the circuit, less 
the fet definition and its gate.

dockt := proc(n)
     printf("\"*\\n\" \\\n");
     printf("\"* what to attach to %s gate?\\n\" \\\n",cat("M",n));
     printf("\"%s %d %d %d fet\\n\" \\\n",cat("M",n), n, n+1, 1000);
     printf("\"%s %d %d val[%d]\\n\" \\\n",cat("R",n), n, 2000, n/100);
     printf("\"%s %d %d r_isol\\n\" \\\n",cat("R",n+1), n, 3000);
     printf("\"%s %d %d r_isol\\n\" \\\n",cat("R",n+2), 2000, 4000);
end proc;

makckt := proc()
     printf("r_isol := 100000;\n");
     printf("val := [4/100, 4/10, 4, 40, 400, 4000];\n");
     printf("ckt := \"* decade shunt\\n\" \\\n");
     printf("\"V 1000 0\\n\" \\\n");
     printf("\"Rload 2000 0\\n\" \\\n");
     for idx from 100 to 600 by 100 do
         dockt(idx);
     end do;
     printf("\".subckt fet s g d\\n\" \\\n");
     printf("\"XXX FIX ME XXX add definition\\n\" \\\n");
     printf("\".ends\\n\" \\\n");
     printf("\"* V is the supply voltage\\n\" \\\n");
     printf("\"* The load is node 2000 to 0\\n\" \\\n");
     printf("\".end\\n\";\n");
end proc;

makckt();

Tom Dean

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Find similar


Thread

Spice Question "Thomas D. Dean" <tomdean@speakeasy.org> - 2014-08-30 14:35 -0700
  Re: Spice Question Joe Riel <joer@san.rr.com> - 2014-08-30 17:15 -0700
    Re: Spice Question Joe Riel <joer@san.rr.com> - 2014-08-30 17:18 -0700
    Re: Spice Question "Thomas D. Dean" <tomdean@speakeasy.org> - 2014-08-30 23:44 -0700
      Re: Spice Question Joe Riel <joer@san.rr.com> - 2014-08-31 08:02 -0700
        Re: Spice Question "Thomas D. Dean" <tomdean@speakeasy.org> - 2014-09-01 21:22 -0700

csiph-web