To run this script
Select Scripts >Project > Create_XML_Library from the Menus.
Or, in versions that support the script, you can run the utility directly from this page using this button.
This script helps you create a library of parts for Microwave Office and Visual System Simulator. You configure the parts you would like them in an AWRDE project and the script will write out all the necessary information to an XML format that is used to describe parts libraries. It is much easier to configure the parts in a system diagram than editing XML files directly. You might use this script for various purposes including:
- Creating a common list of models you want to configure in the Element tree for easy access.
- Saving the state of a model that was difficult to configure for future use.
- Managing approved vendor models to create a library that could be shared by your companies designers.
To use this Script (Version 16.02 and lower)
- Run the script as described above.
- A new directory named "Library" is created in the same directory as your AWRDE project. This directory has all the files needed for your library.
A log is written named "log.txt" in the same directory as your project. It is also imported into the project when the utility is done. This log contains any errors, warnings and information messages including the name and location of files written. An example log is shown below.
To use this library in the AWR Design Environment
Once your library is complete, you need to hook up your library for the AWR Design Environment to find it.
To do this:
- Select Help > Show Files/Directories and then double click on the XmlUser folder.
For Microwave Office libraries, open the Circuit Elements folder and add a new xml file. The file contents should be similar to below.
If this file was named "test.xml" in this folder, then the library will display in the software as shown below.
Where the xml file name will the name of the top node as shown above and then second node is the "Name =" in the XML file.
For VSS libraries, open the System Blocks folder and add a new xml file and follow the same steps for the Circuit Elements above.
The name of the schematic or system diagram will specify the name of the folder for those parts in the element tree.
In this example, the system diagrams look like the following:
After the script is finished and the library configured, notice how the System Diagram names are the names of the nodes in the library.
The name is value shown up in the Models column shown below.
This value can come from either the model ID parameter or a user attribute. For example in the list above, the first model came from the ID parameter from the resistor below.
Alternately, you can define a user attribute with Name=name. If this value is set, it will always be used instead of the ID.
To access the user attributes, double click on the element and select the "User Attributes" tab, as shown below.
The description is value shown up in the Description column shown below.
This value can come from a user attribute with Name=Description. For example in the list above, the second model is defining this description with the attribute shown below.
If this value is not set, the value will be the description of the model used for the part in the AWR Design Environment. One special case is a subcircuit. Since it doesn't have model description, the log will report that a description is missing.
The part number is a field located on each element as shown below.
This value can come from either the Part Number field shown above or the user attribute with Name=Partnumber. If both are set, an error is issued and no value is set.
By specifying a help url, when the user double clicks on the element, the Element Options will have the Vendor Help button enabled that will take you to that help as well as when you right click on a model in the Element tree and select Element Help...
This value comes the user attribute with Name=help If both are set, an error is issued and no value is set.
You can assign different symbols to your library parts, this is especially useful when using a subcircuit. You don't need to do anything else for this to get captured in the library. The only limitation is that the symbol must be from the symbols shipped with the software. If you use a symbol created in the project, the utility will issue an error in the log.
You can assign layout cells to your library parts. You don't need to do anything else for this cell to get captured in the library. The only limitation is that the cell must be from a GDSII library. DXF libraries don't fully understand the layout units and can cause serious issues if the user of the library doesn't select the right units.
As shown, user attributes are used to specific specific parts of the library. You may specify any other user attribute that makes sense for your library of parts and those attributes will be retained in the library..
To use the script (Version 16.03 and higher)
Running the script will first bring up the following dialog box:
Using the radio button Store in Project Directory, the behavior is described as above for AWRDE versions 16.02 and lower.
When using the radio button Store in XmlUsers Directory, the behavior is as follows:
The script runs similar to what is described above except that all the files are stored in the xml directory found using: Select Help > Show Files/Directories and then double click on the XmlUser folder.
The library name can be entered in the text box Enter Library File Name.
AWRDE must be restarted for the library to show up in the Elements browser.