Changes

Creating New Devices and Models

0 bytes added, 16:53, 18 August 2015
==Importing a New Simulation Model==
 
Both process models and subcircuit models can be imported from simple plain text files with a ".TXT' file extension. Importing a simulation model from a text file is a very simple and straightforward procedure. Under the File Menu of the Device Editor, choose "Import Simulation Model from Text File...". An "Open" dialog box will appear for you to locate the model text file. Locate the file and click OK. Follow the program prompts to choose a category, enter a description and keyword and choose a manufacturer for the new model to be imported. These fields may be left blank and filled out later through the Edit Model Dialog. Click OK when you are done. A message will indicate that you have loaded your (subcircuit or process) model file, and that a simulation model was created assuming that it was successfully loaded. The program will then fix the polynomial controlled sources, if any, and notify you of encountered problems. Click OK after each message box. When your model is loaded successfully, the program will notify you of the completion of the import process.
 
If your file does not load, make sure the source file is not open in another application. Your model text file can contain the ".model" lines or Netlist subcircuit codes for several different models. All of these models can be imported together in a single process. In that case, the program will guide you through the same process for each individual model.
==Resolving SPICE Language Incompatibilities==
 
===Polynomial-Controlled Sources===
 
[[RF.Spice A/D]] does not support polynomial controlled sources within subcircuits. When you edit a subcircuit model in the Device Editor, you can check for incompatible polynomial sources using the button labeled "Check Controlled Sources". In addition, there is a button you can use to fix these sources wherever possible within the subcircuit.
 
The polynomial sources are lines of the form:
 
(E|F|G|H)xxx node node POLY(n) inputs coefficient-list
 
An example of this is the following:
 
E1 1 2 poly(3) (3,0) 1 0 0 3
 
The SPICE line above means a voltage-controlled voltage source where the voltage across nodes 1 and 2 is determined by the function: v(1,2) = 1 + 0 + 0 + 3* v(3)^3. SPICE 3, on which [[B2.Spice A/D]] is based , supports a more general form of controlled source which includes polynomial controlled sources as a subset. This new "device" is the nonlinear dependent source with the following general Form:
 
Bxxx N+ N- < I=EXPR > < V=EXPR >
 
An example of this is the following:
 
B1 0 1 I=cos(v(1)) + sin(v(2)) + v(1)^2
 
With the SPICE 2 example given above, i.e.
 
E1 1 2 poly(3) (3,0) 1 0 0 3
 
the corresponding SPICE 3 (and B2.Spice) implementation is:
 
BE1 1 2 V= 1 + 3 * V(3)^3
 
 
[[RF.Spice A/D]] has the capability to convert from SPICE 2 polynomial-controlled syntax to SPICE 3 nonlinear source syntax when they are embedded in subcircuit models. Using the Device Editor, create the simulation model from the text file containing the subcircuit model. Depending on how you do this, the Device Editor may automatically convert the polynomials for you. If not, choose the button labeled "Fix Controlled Sources" and the Device Editor will perform the conversion.
 
The following is an example of this kind of conversion. The first line is commented out because it was the old polynomial controlled source.
 
* egnd 99 0 poly(2) (3,0) (4,0) 0 .5 .5
 
begnd 99 0 v =0 + .5 * v(3,0) + .5 * v(4,0)
 
===Incompatible Model Types===
 
Some Netlist languages such as that from Pspice use models that are either not in B2.SpiceA/D or are defined with a different set of [[parameters]]. When you edit a subcircuit model in the Device Editor, you can check for incompatible models using the appropriate button. In addition, there is a button you can use to fix these models wherever possible within the subcircuit.
==Creating a New Device from Scratch==
Once you're done setting the pin properties, close all the dialog boxes. All that remains is to alter the symbol if you want to rearrange the symbol pins and exit the Database Editor. In the Workshop pull up your new part and use it like any other part.
==Importing a New Simulation Model==
 
Both process models and subcircuit models can be imported from simple plain text files with a ".TXT' file extension. Importing a simulation model from a text file is a very simple and straightforward procedure. Under the File Menu of the Device Editor, choose "Import Simulation Model from Text File...". An "Open" dialog box will appear for you to locate the model text file. Locate the file and click OK. Follow the program prompts to choose a category, enter a description and keyword and choose a manufacturer for the new model to be imported. These fields may be left blank and filled out later through the Edit Model Dialog. Click OK when you are done. A message will indicate that you have loaded your (subcircuit or process) model file, and that a simulation model was created assuming that it was successfully loaded. The program will then fix the polynomial controlled sources, if any, and notify you of encountered problems. Click OK after each message box. When your model is loaded successfully, the program will notify you of the completion of the import process.
 
If your file does not load, make sure the source file is not open in another application. Your model text file can contain the ".model" lines or Netlist subcircuit codes for several different models. All of these models can be imported together in a single process. In that case, the program will guide you through the same process for each individual model.
==Creating a New Simulation Model from Scratch==
You can assign packages and pairings by using the drop down box to select a package, typing in how many parts come in a package, and then clicking on the Connect Part Pins to Package Pins button. More information about Packages can be found in the PCB tutorial.
==Resolving SPICE Language Incompatibilities==
 
===Polynomial-Controlled Sources===
 
[[RF.Spice A/D]] does not support polynomial controlled sources within subcircuits. When you edit a subcircuit model in the Device Editor, you can check for incompatible polynomial sources using the button labeled "Check Controlled Sources". In addition, there is a button you can use to fix these sources wherever possible within the subcircuit.
 
The polynomial sources are lines of the form:
 
(E|F|G|H)xxx node node POLY(n) inputs coefficient-list
 
An example of this is the following:
 
E1 1 2 poly(3) (3,0) 1 0 0 3
 
The SPICE line above means a voltage-controlled voltage source where the voltage across nodes 1 and 2 is determined by the function: v(1,2) = 1 + 0 + 0 + 3* v(3)^3. SPICE 3, on which [[B2.Spice A/D]] is based , supports a more general form of controlled source which includes polynomial controlled sources as a subset. This new "device" is the nonlinear dependent source with the following general Form:
 
Bxxx N+ N- < I=EXPR > < V=EXPR >
 
An example of this is the following:
 
B1 0 1 I=cos(v(1)) + sin(v(2)) + v(1)^2
 
With the SPICE 2 example given above, i.e.
 
E1 1 2 poly(3) (3,0) 1 0 0 3
 
the corresponding SPICE 3 (and B2.Spice) implementation is:
 
BE1 1 2 V= 1 + 3 * V(3)^3
 
 
[[RF.Spice A/D]] has the capability to convert from SPICE 2 polynomial-controlled syntax to SPICE 3 nonlinear source syntax when they are embedded in subcircuit models. Using the Device Editor, create the simulation model from the text file containing the subcircuit model. Depending on how you do this, the Device Editor may automatically convert the polynomials for you. If not, choose the button labeled "Fix Controlled Sources" and the Device Editor will perform the conversion.
 
The following is an example of this kind of conversion. The first line is commented out because it was the old polynomial controlled source.
 
* egnd 99 0 poly(2) (3,0) (4,0) 0 .5 .5
 
begnd 99 0 v =0 + .5 * v(3,0) + .5 * v(4,0)
 
===Incompatible Model Types===
 
Some Netlist languages such as that from Pspice use models that are either not in B2.SpiceA/D or are defined with a different set of [[parameters]]. When you edit a subcircuit model in the Device Editor, you can check for incompatible models using the appropriate button. In addition, there is a button you can use to fix these models wherever possible within the subcircuit.
== Importing RF Device Models ==
28,333
edits