Changes

Jump to: navigation, search

Creating New Devices and Models

73 bytes added, 14:59, 10 November 2016
/* Setting & Matching Device Pins */
Example:
! This is an example of an RF BJT model based on measured S-[[parameters]].
.model MyNewRFBJT
The model statement specifies the name of your RF device model, in this case, MyNewRFBJT. The symbol statement determines the device type and schematic symbol. The symbol_name can only be one of the choice given in the table below. The frequency units can be hz, khz, mhz or ghz. "s" implies the s-parameters. If the complex_data_format is left blank, the S-parameters are interpreted to have Mag/Phase format, with the magnitude on a linear scale and phase expressed in degrees. The other options for complex_data_format are "ma" for magnitude expressed in dB, or "ri" for Real/Imag format. The last part specifies the reference impedance value, which must come after letter "r". In the above example, the reference impedance is 50 Ohms.
[[Image:Info_icon.png|40px]] Click here to see a '''[[An_Overview_of_RF_Circuit_Simulation#List_of_Standard_Imported_RF_Devices | List of Standard Imported RF Devices]]'''.
== Using Device Manager for Importing S-Parameter Data ==
* Create New Generic T-Line Discontinuity from S-Parameter Text File...
The first item in the above list simply lets you import an S-parameter ".TXT" file and saves it as a simulation model in [[RF.SpiceA/D]]'s parts database. You can use this model later to build a new device or share it among several devices. The next three items in the above list create new devices complete with simulation models and schematic symbols. The newly create devices are permanently stored in your [[RF.Spice A/D]] parts database and can be used as new parts in your RF circuits. For example, an imported RF BJT device has the same BJT symbol with the same pin map as the other BJT devices of [[RF.Spice A/D]]. The main difference is that instead of a technology process models or a Netlist subcircuit model, the RF BJT is modeled by its imported, measured S-[[parameters]]. In a similar manner, you can import Multiport Network devices or T-Line Discontinuity models from S-parameter text files that are generated at the end of full-wave simulations of such structures using an electromagnetic modeling tool like [[EM.Cube]] .
==Creating a New Simulation Model from Scratch==
If your model type is a SUBCIRCUIT the simulation guts will be blank. You will need to enter the subcircuit text for this part into the empty text field. If you already have this text in another file, you can copy and paste the subcircuit text.
If your model type is other than a Subcircuit you will need to set [[parameters]] for the device. If you need help with this, see the section on entering [[parameters]].
Some devices or parts require that a process model be set. To set the process model click on the ellipsis button, and then select a process model from the list that appears. If the process model for your simulation model is not in the list, then you need to add a new process model.
==Creating a New Device from Scratch==
==Setting & Matching Device Pins==
[[File:b2MAN_Fig45.png|thumb|480px| "Connect Symbol Pins to Model Pins" Dialog.]]
When creating a new simulation model as will be discussed later, you can also instruct the Device Editor to create a default (simple and basic) symbol for a it. Normally, if you have already set the simulation model pin or terminal names, the symbol pins will automatically match the model pins. In many other cases, you may create the models and symbols separately and independently. In such cases, you need set and match the symbol pins with the corresponding model pins.
It is important to match up the pins correctly because the simulator will need this information to be correct to simulate the part correctly. Limit pin names to 10 characters or less. For spaces use underscore ( _ ). Dashes are not accepted. Click OK when all the pins have been matched up correctly.
 
<table>
<tr>
<td>
[[File:b2MAN_Fig45.png|thumb|left|720px| "Connect Symbol Pins to Model Pins" Dialog.]]
</td>
</tr>
</table>
==Creating a New Device from an Existing Simulation Model==
If your circuit contained XSpice parts, you will have to designate whether the pin is digital or analog. If the pin is Digital, then you must also designate whether it is an Input or Output pin. If the pin is Analog, then input and output direction designation do not apply. Click accept when you're done with each pin. Click OK when you're done setting the pins.
For Digital parts, Select and edit the [[Digital Simulation|digital simulation]] model you just created. In the Edit Simulation Model dialog box, click the Edit Pin Properties button to access the list of digital pin. You should set each pin's direction, state, and propagation delay. Click the Accept button to accept changes and move on to the next pin. Refer to the Database Editor Menu's Edit simulation model section for more information.
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.
If you know what you're doing, you can start entering your subcircuit starting with the .SUBCKT statement and ending the .ENDS statement. This subcircuit will need to be in Berkeley Spice 3f5 format with XSpice extensions. Otherwise, copy and paste a subcircuit into the window. You can get the subcircuit text for an existing simulation model by editing the simulation model and copying its text.
Now all you have to do is incorporate your own parameters into the subcircuit. Enter your [[parameters]] in the form of a parameter or formula. All custom parameters must go in between the curly brackets {}. For example, if you had two parameters called X and Y and wish to have them added together in a subcircuit, the formula would be {X + Y}. Or getting fancier, you add X and Y and then multiply by 2. The formula would look like this: {(X + Y) * 2}. All standard mathematical operations are supported (+,-,/,*), power of (^), and any other operation supported in the graphing plot expression module of the Workshop. In the example below, note that the {voltage} has replaced the regular voltage number.
Once you're satisfied that everything is correct, click OK and continue to the next step.
28,333
edits