/mos.lua

https://code.google.com/p/google-pinyin-api/ · Lua · 35 lines · 21 code · 5 blank · 9 comment · 11 complexity · 11a74698cacc0e5ed766535e216156b2 MD5 · raw file

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