PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/mos.lua

https://code.google.com/p/google-pinyin-api/
Lua | 35 lines | 21 code | 5 blank | 9 comment | 6 complexity | 11a74698cacc0e5ed766535e216156b2 MD5 | raw file
 1-- encoding: UTF-8
 2
 3------------------------------------------------
 4-- ????MOSFET????????
 5-- ??: Mike
 6-- ??: 0.1
 7-- ????: http://code.google.com/p/google-pinyin-api/
 8--
 9-- ?????GPLv3??
10------------------------------------------------
11
12function mos(input)
13   if #input== 0 then
14    return { { suggest = "idsa", help = "Ids (Vds<Vgs-Vth)" },
15                { suggest = "idsb", help = "Ids (Vds>Vgs-Vth)" },
16                { suggest = "b", help = "?" },
17                { suggest = "vth", help = "???" },
18                { suggest = "gm", help = "?????" },
19               }
20   elseif input == "idsa" then
21    return "Ids=?•[(Vgs-Vth)Vds-1/2•Vds^2] (Vds<Vgs-Vth)"
22   elseif input == "idsb" then
23    return "Ids=1/2•?•(Vgs-Vth)^2•(1+?Vds) (Vds>Vgs-Vth)"
24   elseif input == "b" then
25    return "?=?eff•Cox•(W/L) (??Cox=?ox/Tox)"
26   elseif input == "vth" then
27    return "Vth=Vth0+?[?(Vsb+2?)-?(2?)]"
28   elseif input == "gm" then
29    return "gm=?•(Vgs-Vth)•(1+?Vds) (???)"
30   end
31end
32
33ime.register_command("fm", "mos", "MOSFET??????")
34
35