Gateway Reference Manual Silvaco, Inc. 2811 Mission College Blvd, Floor 6 Santa Clara, CA 95054 Phone: (408) 567-1000 Web: www.silvaco.com June 1, 2020 Notice The information contained in this document is subject to change without notice. Silvaco, Inc. MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. Silvaco, Inc. shall not be held liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. This document contains proprietary information, which is protected by copyright laws of the United States. All rights are reserved. No part of this document may be photocopied, reproduced, or translated into another language without the prior written consent of Silvaco Inc. AccuCell, AccuCore, Athena, Athena 1D, Atlas, Blaze, C-Interpreter, Catalyst AD, Catalyst DA, Clarity RLC, Clever, Clever Interconnect, Custom IC CAD, DeckBuild, DevEdit, DevEdit 3D, Device 3D, DRC Assist, Elite, Exact, Expert, Expert C++, Expert 200, ExpertViews, Ferro, Gateway, Gateway 200, Giga, Giga 3D, Guardian, Guardian DRC, Guardian LVS, Guardian NET, Harmony, Hipex, Hipex C, Hipex NET, Hipex RC, HyperFault, Interconnect Modeling, IWorkBench, Laser, LED, LED 3D, Lisa, Luminous, Luminous 3D, Magnetic, Magnetic 3D, MaskViews, MC Etch & Depo, MC Device, MC Implant, Mercury, MixedMode, MixedMode XL, MultiCore, Noise, OLED, Optolith, Organic Display, Organic Solar, OTFT, Quantum, Quantum 3D, Quest, RealTime DRC, REM 2D, REM 3D, SEdit, SMovie, S-Pisces, SSuprem 3, SSuprem 4, SDDL, SFLM, SIPC, SiC, Silvaco, Silvaco Management Console, SMAN, Silvaco Relational Database, Silos, Simulation Standard, SmartSpice, SmartSpice 200, SmartSpice API, SmartSpice Debugger, SmartSpice Embedded, SmartSpice Interpreter, SmartSpice Optimizer, SmartSpice RadHard, SmartSpice Reliability, SmartSpice Rubberband, SmartSpice RF, SmartView, SolverLib, Spayn, SpiceServer, Spider, Stellar, TCAD Driven CAD, TCAD Omni, TCAD Omni Utility, TCAD & EDA Omni Utility, TFT, TFT 3D, Thermal 3D, TonyPlot, TonyPlot 3D, TurboLint, Universal Token, Universal Utility Token, Utmost III, Utmost III Bipolar, Utmost III Diode, Utmost III GaAs, Utmost III HBT, Utmost III JFET, Utmost III MOS, Utmost III MultiCore, Utmost III SOI, Utmost III TFT, Utmost III VBIC, Utmost IV, Utmost IV Acquisition Module, Utmost IV Model Check Module, Utmost IV Optimization Module, Utmost IV Script Module, VCSEL, Verilog-A, Victory, Victory Cell, Victory Device, Victory Device Single Event Effects, Victory Process, Victory Process Advanced Diffusion & Oxidation, Victory Process Monte Carlo Implant, Victory Process Physical Etch & Deposit, Victory Stress, Virtual Wafer Fab, VWF, VWF Automation Tools, VWF Interactive Tools, and Vyper are trademarks of Silvaco, Inc. All other trademarks mentioned in this manual are the property of their respective owners. Copyright © 1984 - 2020, Silvaco, Inc. 2 Confidential How to Read this Manual Style Conventions Font Style/Convention Description Example Courier This represents the commands, parameters, and variables syntax. ENTER Courier Bold This represents keywords. FUNCTION Times Roman Bold This represents the menu options and buttons in the GUI. File New Century Italics This represents the variables of equations. x+y=1 Schoolbook 3 Confidential 4 SILVACO, Inc. Table of Contents Chapter 1 Gateway Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1 Netlist Structure Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 Example Syntax using a pmos4.symbol file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.3 Command Line Option Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Chapter 2 Standard Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1 Spicelib Library Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2 $default Library Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3 Digilib Library Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Chapter 3 Symbol Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.1 Attaching Verilog, Verilog-A, or SPICE to Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2 Using Embedded Symbol Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.3 Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Chapter 4 Supported Functions for the Gateway Equation Parser . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1 Gateway Equation Parser Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1.2 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4 Confidential Table of Contents 5 Confidential Chapter 1 Gateway Syntax Netlist Structure Syntax 1.1 Netlist Structure Syntax Netlist strings may be formatted in Gateway using two mechanisms: metatokens or functions. Table 1-1 describes the syntax of the both the function-based approach and the metatoken approach for comparison of how both are accomplished and what they represent. Table 1-1 Netlist Syntax Options Function Metatoken Type Description $(signal(n)) %n Pin Denotes a pin on a symbol, such as PLUS, MINUS, A, B, Z. $(signal(n, true) %$n Pin Displays the signal name attached to the pin in the format signal_name = pin_name. pin_name=a, Example: signal_name=NET1, then %$a renders NET1=a. $(value(n)) @n Attribute Denotes an attribute, which will always appear in the netlist. For example, PREFIX, PATH. $(namevalue(n)) $n Attribute This is name=value. MIN=2. Attribute Attribute outputted as For example, displayed as $(namevalue(n, false)) $@n $(value(n, false)) @@n Attribute Attribute displayed as value, (non-recursive). Example: if a=b and b=2, then @@a renders b where @a renders 2. $(optvalue(n)) &n Optional Attribute If the attribute is specified, it will be included in the netlist. $(condition(n)) #n# Conditional Statement This will be evaluated as a statement. For example, #DC &DC # if &DC has a value then include DC &DC in the netlist. $(result(n)) ~n Result This prints out the result of the attribute. 6 Confidential name=value, (non-recursive). Example: if a=b and b=2, then $@a renders a=b where $a renders a=2. Netlist Structure Syntax Table 1-1 Netlist Syntax Options Function Metatoken Type Description $(nameresult(n)) ?n Result This is name=result. MAX=2.00. outputted as For example, $(optresult(n)) ^n Optional Result If the result is specified, it will be included in the netlist. $(libpath(n)) $$n Library reference Used as a shortcut to reference files used in a workspace library. Gateway resolves the true file path. $(literal(n)) \n Escape Character Escape character used to escape other metatokens. $(breakcondition(n)) &@n Conditional Breaks condition if n evaluates to an empty value. $(defparam(v, n)) n/a Parameter Creates a defparam statement in the netlist with name n and value v. 7 Confidential Example Syntax using a pmos4.symbol file 1.2 Example Syntax using a pmos4.symbol file The following figures illustrate what the SmartSpice string looks like for the same symbol, pmos4.symbol, when different approaches are used. Figure 1-1 shows how the SmartSpice string looks when metatokens are used. Figure 1-2 shows how the SmartSpice string looks if the function mechanism is used instead. Figure 1-1 SPICE String Editor (Metatoken Style) 8 Confidential Example Syntax using a pmos4.symbol file Figure 1-2 SPICE String Editor (Functional Style) 9 Confidential Command Line Option Syntax 1.3 Command Line Option Syntax Syntax gateway [-help] gateway [-suppress] [-start <location>] [-spf] [-views] [-w <workspace> [<files...>]] Description -help shows the usage. -spf specifies the preference file to load. -suppress suppresses automatic session loading. -start specifies an initial workspace location. -views specifies launching of the GatewayViews application. -w specifies a workspace. -mnu specifies a javascript file to be run during startup that contains menu customization commands. -jscript specifies a javascript file to be run during startup. 10 Confidential Chapter 2 Standard Libraries Spicelib Library Symbols 2.1 Spicelib Library Symbols Symbol Name Type Description SmartSpice Device and21 standard cell 2 input and gate X and31 standard cell 3 input and gate X and41 standard cell 4 input and gate X bcs primitive analog behavioral device (current) A bvs primitive analog behavioral device (voltage) A cap primitive capacitor C cccs primitive current controlled current source F cccspoly primitive current controlled (polynomial case) current source F cccspwl primitive current controlled (piecewise linear case) current source F ccs primitive current controlled switch S ccvs primitive current controlled voltage source H ccvspoly primitive current controlled (polynomial case) voltage source H ccvspwl primitive current controlled (piecewise linear case) voltage source H diode primitive diode D idc primitive DC current source I iexp primitive exponential current source I ind primitive inductor L inv2 standard cell inverter (implicit power and ground) X inv standard cell inverter (implicit power and ground) X ipulse primitive pulse current source I ipwl primitive piecewise linear current source (t,v) I ipwlfile primitive piecewise linear current source from specified file I isffm primitive single frequency current source I isin primitive sinusoidal current source I 12 Confidential Spicelib Library Symbols Symbol Name Type Description SmartSpice Device k primitive coupled mutual inductor K nand21 standard cell 2 input nand gate X nand31 standard cell 3 input nand gate X nand41 standard cell 4 input nand gate X njfet primitive n-type jfet (3 terminal) J njfet_b primitive n-type jfet (bulk node specified) J njfet4 primitive n-type jfet (4 terminal) J nmes primitive n-type MESFET (3 terminal) B nmes_b primitive n-type MESFET (bulk node specified) B nmes4 primitive n-type MESFET (4 terminal) B nmos primitive n-type MOSFET (3 terminal) M nmos_b primitive n-type MOSFET (bulk node specified) M nor21 standard cell 2 input nor gate X nor31 standard cell 3 input nor gate X nor41 standard cell 4 input nor gate X npn primitive npn bipolar junction transistor Q npn_b primitive npn bipolar junction transistor (substrate node specified) Q npn4 primitive npn bipolar junction transistor (4 terminal) Q op_ideal subcircuit ideal operational amplifier X or21 standard cell 2 input or gate X or31 standard cell 3 input or gate X or41 standard cell 4 input or gate X pjfet primitive p-type jfet (3 terminal) J pjfet_b primitive p-type jfet (bulk node specified) J pjfet4 primitive p-type jfet (4 terminal) J pmos primitive p-type MOSFET (3 terminal) M pmos_b primitive p-type MOSFET (bulk node specified) M pmos4 primitive p-type MOSFET (4 terminal) M 13 Confidential Spicelib Library Symbols Symbol Name Type Description SmartSpice Device pnp primitive pnp bipolar junction transistor Q pnp_b primitive pnp bipolar junction transistor (substrate node specified) Q pnp4 primitive pnp bipolar junction transistor (4 terminal) Q res primitive resistor R RSFF subcircuit RS Flip Flop X Tline_O primitive lossy transmission line (Berkeley SPICE model) O Tline_T primitive lossless transmission line T Tline_TXL primitive lossy transmission line TXL transformer primitive Ideal Transformer E vccs primitive voltage controlled current source G vccsbhv primitive voltage controlled current source (behavior) G vccspoly primitive voltage controlled (polynomial) source G vccspwl primitive voltage controlled current source (piecewise linear) G vccstbl primitive voltage controlled current source (table) G vcs primitive voltage controlled switch S vcvs primitive voltage controlled voltage source E vcvsbhv primitive voltage controlled voltage source (behavior) E vcvspoly primitive voltage controlled (polynomial) source E vcvspwl primitive voltage controlled voltage source (piecewise linear) E vcvstbl primitive voltage controlled voltage source (table) E vdc primitive DC voltage source V vexp primitive exponential voltage source V vpl primitive piecewise linear voltage source (v,t) V vpulse primitive pulse voltage source V vpwl primitive piecewise linear voltage source (t,v) V 14 current voltage Confidential Spicelib Library Symbols SmartSpice Device Symbol Name Type Description vpwlfile primitive piecewise linear voltage source from specified file V vpwlfiledesc primitive This is read from the specified file as a series of (time, voltage) pairs. V vpwlfiledesc2 primitive This is read from the specified file as a series of uniformly separated values. V vsffm primitive single frequency voltage source V vsin primitive sinusoidal voltage source V 15 Confidential $default Library Symbols 2.2 $default Library Symbols Symbol Name Type Description bischpin pin bidirectional schematic pin chord special connection symbol that establishes alias mapping between signals of different nets. code special symbol that allows text entry to be used in the netlist in specific locations gnd special analog ground inschpin pin input schematic pin netInherit special defines net expressions for the purpose of overriding global signals throughout a hierarchy. noconn special symbol indicating a no-connection point on the schematic outschpin pin output schematic pin pageschpin pin signal continuation pin used for sheet-to-sheet connections. param special .PARAM statement symbol for SPICE parameters special defines attributes to be passed through hierarchy pwr voltage rail user-defined power symbol vcc voltage rail positive voltage rail vdd voltage rail positive voltage rail vee voltage rail negative voltage rail vss voltage rail negative voltage rail 16 Confidential Digilib Library Symbols 2.3 Digilib Library Symbols The digilib library contains symbols representing Verilog primitives. Symbol Name Type Description and21 primitive 2 input AND gate and31 primitive 3 input AND gate and41 primitive 4 input AND gate buf primitive Buffer bufif0 primitive three-state logic gate, buffer if zero bufif1 primitive three-state logic gate, buffer if one clk_gen standard Simple clock generator cmos primitive Standard CMOS switch dff_sr standard D Flip Flop inv primitive Inverter nand21 primitive 2 input NAND gate nand31 primitive 3 input NAND gate nand41 primitive 4 input NAND gate nmos primitive Standard NMOS transistor nor21 primitive 2 input NOR gate nor31 primitive 3 input NOR gate nor41 primitive 4 input NOR gate or21 primitive 2 input OR gate or31 primitive 3 input OR gate or41 primitive 4 input OR gate pmos primitive Standard PMOS transistor pulldown primitive Pulldown pullup primitive Pullup rcmos primitive RCMOS switch rnmos primitive RNMOS switch rpmos primitive RPMOS switch RSFF standard RS Flip Flop 17 Confidential Digilib Library Symbols Symbol Name Type Description rtran primitive Bi-directional pass switch tff primitive T Flip Flop timescale standard timescale device tran primitive Bi-directional pass switch verilog_testbench standard Simple code block xnor21 primitive 2 input XNOR gate xnor31 primitive 3 input XNOR gate xnor41 primitive 4 input XNOR gate xor21 primitive 2 input XOR gate xor31 primitive 3 input XOR gate xor41 primitive 4 input XOR gate 18 Confidential Chapter 3 Symbol Files Attaching Verilog, Verilog-A, or SPICE to Symbols 3.1 Attaching Verilog, Verilog-A, or SPICE to Symbols To use the attached file definition for a symbol: 1. 2. 3. 4. 5. 6. 7. 8. 9. Open a symbol for edit or create a new symbol. Add pins as necessary. Click EditProperties. Press the SmartSpice or Verilog button, depending on the type. Click the Definition tab. Choose Attached File from the pulldown menu. Browse to the file and select it. For SPICE types, specify whether it is a .LIB, .INCLUDE, or .VERILOG (for Verilog-A). Click the Instance tab and press the Generate String button. 3.2 Using Embedded Symbol Definitions To use the embedded definition for a symbol: 1. 2. 3. 4. 5. 6. 7. 8. Open a symbol for edit or create a new symbol. Add pins as necessary. Click EditProperties. Press the SmartSpice or Verilog button, depending on the type. Click the Definition tab. Choose Embedded Definition from the pulldown menu. Enter the definition in the text box. Click the Instance tab and press the Generate String button. 3.3 Encryption Files can be encrypted and then included to prevent users from seeing a technology that may be proprietary. Use the Sencrypt program to encrypt all required files. Please see the Sencrypt User’s Manual for all details. 20 Confidential Chapter 4 Supported Functions for the Gateway Equation Parser Gateway Equation Parser Functions 4.1 Gateway Equation Parser Functions This document details the mathematical functions supported by GATEWAY when an attribute’s visibility is changed to “Name=Result” or “Result”. ‘expression’ means any valid mathematical expression. For example, 10, 1+2, 2*3, 1+2*(3+4). These functions can also be nested (e.g., SQRT(ABS(-1))). 4.1.1 Functions Function Description Equation ABS(x) The absolute function returns the absolute value of any number. ACOS(z) The inverse cosine or arc cosine (i.e., cos-1) of z. N/A --- – 2 2n + 1 n=0 ASIN(z) The inverse sine or arc sine (i.e., sin-1) of z. 2n + 1 n=0 ATAN(z) -1 The inverse tangent or arc tangent (i.e., tan ) of z. 2n ! - ------------------z ------------------2 2n 2 n! 2n + 1 2n ! - ------------------z ------------------2 2n + 1 2n 2 n! n 2n + 1 n=0 CEIL(x) Returns the nearest integer greater than x (e.g., rounds up). COS(x) The cosine of x. –1 z --------------------------2n + 1 N/A n – 1 - 2n -----------x 2n ! n=0 COSH(x) The hyperbolic cosine of x. n=0 EXP(x) The exponential function is defined as: ex where e is defined as the constant, 2.718… . 2n x ----------- 2n ! n=0 FLOOR(x) Returns the nearest integer less than x (e.g., rounds down). N/A INT(x) Returns the integer part of x. N/A 22 n x----n! Confidential Gateway Equation Parser Functions JN(, x) Bessel functions of the first kind, denoted as J(x), are solutions of Bessel's differential equation that are finite at the origin (x = 0) for non-negative integer and diverge as x approaches zero for negative non-integer . LOG10(x) Log to the base 10, also known as the common logarithm, is defined to be the inverse of taking a number. For example, a to the power of another number say b (i.e., ab). Therefore, Log to the base 10 is the inverse of taking 10 to the power of a number (i.e., 10x). LN(z) or LOG(z) Log to the base e, also known as the natural logarithm, is defined as the inverse of taking e to the power of a number (i.e., ez). J x = m 2m + –1 --------------------------------------- --x- m! m + + 1 2 m=0 Where n = n – 1 ! ln x log 10 x = ---------------ln 10 n 1 – z – -----------------n ln z = n=1 MIN(a,b) The minimum of the a and b values. N/A MAX(a,b) The maximum of the a and b values. N/A MOD(n,m) Computes the remainder on dividing n by m. Both arguments must be integers. N/A POW(a, n) The power function is defined as taking a number a to the power of n (i.e., an). n = n ROUND(x) ROUND(x, n) The round function will round any number to the n number of decimal places (e.g., ROUND(1.2345, 3) would equal 1.235). If n is not specified, the default precision will be 0 decimal places. N/A SGN(x) The sgn function returns 1 for positive values of x ( x >= 0) and -1 for negative values of x ( x < 0). N/A SIN(x) The sine of x. n – 1 - 2n + 1 --------------------x 2n + 1 ! n=0 SINH(x) The hyperbolic sine of x. n=0 SQRT(x) TAN(x) The square root of a number (e.g., x1/2 x ). The tangent of x (B is the Bernoulli number). 2n + 1 x -------------------- 2n + 1 ! n – 1 2n 2n 2n – 1 –1 2 2 – 1B x 2n ----------------------------------------------------------------------------------------- 2n ! n=1 23 Confidential Gateway Equation Parser Functions TANH(x) The hyperbolic tangent of x (B is the Bernoulli number). 2n 2n 2n – 1 2 2 – 1B x 2n ----------------------------------------------------------------- 2n ! n=1 YN(, x) The Bessel functions of the second kind, denoted by Y(x), are solutions of the Bessel differential equation. They have a singularity at the origin (x = 0). J x cos – J x – Y x = ----------------------------------------------------------- sin 4.1.2 Operators Operator Description Usage > or >> Greater than operator. Used to determine if an A > B expression A is larger than expression B. >= Greater than or equals operator. Used to A >= B determine if an expression A is larger or equal to expression B. = = Equality operator. Used to determine if two A == B expressions are identical. != Inequality operator. Determines expressions are not equal. < or << Less than operator. Used to determine if an A < B expression A is less than expression B <= Less than or equal to operator. Determines if A <= B an expression A is less than or equal to and expression B. && Logical AND operator. Returns a true A && B boolean statement (1) if both expressions on either side of the operator are true (1). || Logical OR operator. Returns a true boolean A || B statement (1) if either expression is true (1). IIF IIF statement. This can be used as a switch IIF(A>10, 20, 30) if two A != B statement to return back different values depending on whether the expression in the If A is greater than 10, then the return value 20. Otherwise, the return value is 30. statement is true. ? Ternary operator. This is similar to the IIF statement and can be used to return different values (or expressions) depending of the evaluation of the statement before the operator. 24 A>10?“greater”:“less than or equal” If A is greater than 10, then the return value will be “greater”. Otherwise, the return value will be “less than or equal”. Confidential