################################################################################
# FICHE DE MODELE SABER : ED:1 REV:0
# AUTEUR:OCSIMIZE DATE:04/18/06
#
# FICHIER nmos_l4.sin : ind. a du 06/15/06
# ETAT : valid
################################################################################
#==============================================================================#
template nmos_l4 g d s = rdson,tr,tf,vg,k,vt
#==============================================================================#
################################################################################
# Copyright 2006 to infinity and beyond..., Ocsimize.
# This template may not be reproduced or modified
# without permission from Ocsimize. Ocsimize does not assume
# liability for the use of this template or the results
# obtained from using it as long as it is not validated by the final user.
# Usage of this template is allowed for customers of Ocsimize's customers
################################################################################
################################################################################
#
# MODIFICATION
#
# 06/15/06: creation
################################################################################
#
# pins
#
################################################################################
# Name Type Signification
#
# g logical_4 mos gate
# d electrical mos drain
# s electrical mos source
#
################################################################################
#
# Parameters definition
#
################################################################################
# Name Default value Signification
#
# rdson 30m (Ohms) on resistance
# tr 50n (s) risetime
# tf 50n (s) falltime
# vg 10 (V) voltage at gate
# k 7 (-) mosfet constant (multiplying factor)
# vt 3 (V) mosfet constant (threshold factor)
#
################################################################################
#
# Postprocess information
#
################################################################################
# Name Unit Signification
#
# - - -
#
################################################################################
#
# usage
#
################################################################################
#
# This template mimics a mosfet (n): negligible energy command
# and on resistive behaviour but is more accurate than mos_l4 template:
#
#
# Use :
#
#
# | |-----O (d)
# | |
# (g) O---| |-<---| Id = k/2*(vgs - vt)**2
# | | |
# | |-----O (s)
#
#
#
################################################################################
# Notes :
################################################################################
#
# a - The behaviour is mainly dependant of the native template "idealmos.sin".
# so vg is limited to around 3.3 Volts
#
# b - Use the Id = f(Vgs) characteristics to find k provided vt is available
# from the datasheet.
#
# c - You may need to add a diode in antiparallel (body diode) and inductive
# load.
#
# d - Hints : if you have a limiting current function , establish vg so
# that you can limit the current.
#
################################################################################
number rdson = 30m,tr=50n,tf=50n
number vg=10, k=7, vt = 3
electrical d,s
state logic_4 g
{
ide_d2an.ide_d2an1 d:g a:g_a m:s = model=(tr=tr,tf=tf,voh=vg)
r.rdson p:d m:d_inner = rnom=rdson
idealmos.idealmos1 d:d_inner g:g_a s:s = k=k, vt=vt, gmin=2.5u, type=_n
}
################################################################################
# netlist simple test
#
# clock_l4.clock_l4_1 clock:gate = freq=30k
# v.v1 p:_n42 m:0 = dc=10
# r.rload p:drain m:_n42 = rnom=0.2
# nmos_l4.nmos_l4_1 d:drain g:gate s:0
################################################################################