Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
12.2. ANALOG MODELS Limits: Vector: Vector_Bounds: Null_Allowed: PARAMETER_TABLE: Parameter_Name: Description: Data_Type: Default_Value: Limits: Vector: Vector_Bounds: Null_Allowed: 181 no no no no alpha "model parameter 1" real 0.0 no no beta "model parameter 2" real 1.0 no no Description: The memristor is a two-terminal resistor with memory, whose resistance depends on the time integral of the voltage across its terminals. rmin and rmax provide the lower and upper limits of the resistance, rinit is its starting value (no voltage applied so far). The voltage has to be above a threshold vt to become effective in changing the resistance. alpha and beta are two model parameters. The memristor code model is derived from a SPICE subcircuit published in [23]. Example SPICE Usage: amen 1 2 memr .model memr memristor (rmin=1k rmax=10k rinit=7k + alpha=0 beta=2e13 vt=1.6) 12.2.27 2D table model NAME_TABLE: C_Function_Name: Spice_Model_Name: Description: PORT_TABLE: Port_Name: PARAMETER_TABLE: Parameter_Name: Description: Data_Type: Default_Value: Limits: Vector: Vector_Bounds: Null_Allowed: PARAMETER_TABLE: Parameter_Name: Description: Data_Type: Default_Value: cm_table2D table2D "2D table model" inx iny order "order" int 3 no yes verbose "verbose" int 0 no yes offset "offset" real 0.0 gain "gain" real 1.0 out Description: 182 CHAPTER 12. MIXED-MODE AND BEHAVIORAL MODELING WITH XSPICE Limits: Vector: Vector_Bounds: Null_Allowed: PARAMETER_TABLE: Parameter_Name: Description: Data_Type: Default_Value: Limits: Vector: Vector_Bounds: Null_Allowed: no yes no yes file "file name" string "2D-table-model.txt" no yes Description: The 2D table model reads a matrix from file "file name" (default 2D-table-model.txt) which has x columns and y rows. Each x,y pair, addressed by inx and iny, yields an output value out. Linear interpolation is used for out, eno (essentially non oscillating) interpolation for its derivatives. Parameters offset (default 0) and gain (default 1) modify the output table values according to offset + gain*out. Parameter order (default 3) influences the calculation of the derivatives. Parameter verbose (default 0) yields test outputs, if set to 1 or 2. The table format is shown below. Be careful to include the data point inx = 0, iny = 0 into your table, because ngspice uses to start there during op calculation. x horizontal and y vertical adress values have to increase monotonically. The usage example consists of two input voltages referenced to ground and a current source output with two floating nodes. Table Example: * table source * number of columns (x) 8 * number of rows (y) 9 * x horizontal (column) address values (real numbers) -1 0 1 2 3 4 5 6 * y vertical (row) address values (real numbers) -0.6 0 0.6 1.2 1.8 2.4 3.0 3.6 4.2 * table with output data (horizontally addressed by x, vertically by y) 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 1 1 1 1 1 1 1 1 1 1.2 1.4 1.6 1.8 2 2.2 2.4 1 1.5 2 2.5 3 3.5 4 4.5 1 2 3 4 5 6 7 8 1 2.5 4 5.5 7 8.5 10 11.5 1 3 5 7 9 11 13 15 1 3.5 6 8.5 11 13.5 16 18.5 1 4 7 10 13 16 19 22 Example SPICE Usage: atab inx iny %id(out1 out2) tabmod .model tabmod table2d (offset=0.0 gain=1 order=3 file="table-simple.txt") 12.2. ANALOG MODELS 12.2.28 183 3D table model NAME_TABLE: C_Function_Name: Spice_Model_Name: Description: PORT_TABLE: Port_Name: Description: Direction: Default_Type: Allowed_Types: Vector: Vector_Bounds: Null_Allowed: PORT_TABLE: Port_Name: Description: Direction: Default_Type: Allowed_Types: Vector: Vector_Bounds: Null_Allowed: PARAMETER_TABLE: Parameter_Name: Description: Data_Type: Default_Value: Limits: Vector: Vector_Bounds: Null_Allowed: PARAMETER_TABLE: Parameter_Name: Description: Data_Type: Default_Value: Limits: Vector: Vector_Bounds: Null_Allowed: PARAMETER_TABLE: Parameter_Name: Description: Data_Type: Default_Value: Limits: Vector: cm_table3D table3D "3D table model" inx "inputx" in v [v,vd,i,id,vnam] no no iny "inputy" in v [v,vd,i,id,vnam] no no out "output" out i [v,vd,i,id] no no order "order" int 3 no yes offset "offset" real 0.0 no yes verbose "verbose" int 0 no yes gain "gain" real 1.0 no yes file "file name" string "3D-table-model.txt" no inz "inputz" in v [v,vd,i,id,vnam] no no 184 CHAPTER 12. MIXED-MODE AND BEHAVIORAL MODELING WITH XSPICE Vector_Bounds: Null_Allowed: yes Description: The 3D table model reads a matrix from file "file name" (default 3D-tablemodel.txt) which has x columns, y rows per table and z tables. Each x,y,z triple, addressed by inx, iny, and inz yields an output value out. Linear interpolation is used for out, eno (essentially non oscillating) interpolation for its derivatives. Parameters offset (default 0) and gain (default 1) modify the output table values according to offset + gain*out. Parameter order (default 3) influences the calculation of the derivatives. Parameter verbose (default 0) yields test outputs, if set to 1 or 2. The table format is shown below. Be careful to include the data point inx = 0, iny = 0, inz = 0 into your table, because ngspice uses to start there during op calculation. x horizontal, y vertical, and z table adress values have to increase monotonically. The usage example simulates a NMOS transistor with independent drain, gate and bulk nodes, referenced to source. Parameter gain may be used to emulate transistor width, with respect to the table transistor. Table Example: * 3D table for nmos bsim 4, W=10µm, L=0.13µm *x 39 *y 39 *z 11 *x (drain voltage) -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 ... *y (gate voltage) -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 ... *z (substrate voltage) -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 *table -1.8 -4.50688E-10 -4.50613E-10 -4.50601E-10 -4.50599E-10 ... -4.49622E-10 -4.49267E-10 -4.4921E-10 -4.49202E-10 ... -4.50672E-10 -4.49099E-10 -4.48838E-10 -4.48795E-10 ... -4.55575E-10 -4.4953E-10 -4.48435E-10 -4.48217E-10 ... ... *table -1.6 -3.10015E-10 -3.09767E-10 -3.0973E-10 -3.09724E-10 ... -3.09748E-10 -3.08524E-10 -3.08339E-10 -3.08312E-10 ... ... *table -1.4 -2.04848E-10 -2.04008E-10 -2.03882E-10 ... -2.07275E-10 -2.03117E-10 -2.02491E-10 ... ... Example SPICE Usage: amos1 %vd(d s) %vd(g s) %vd(b s) %id(d s) mostable1 .model mostable1 table3d (offset=0.0 gain=0.5 order=3 + verbose=1 file="table-3D-bsim4n.txt")