Timing Diagram Editing and Analysis

10.1 Adding Libraries, Specifications, and Macros

10.1 Adding Libraries, Specifications, and Macros

Previous topic Next topic  

10.1 Adding Libraries, Specifications, and Macros

Previous topic Next topic  

Before you can use a parameter library in a timing diagram project you must (1) add the library to the library search list, (2) set up a specification, and (3) define a macro for the library.

1) Add parameter libraries to your Library Search List:

Select the ParameterLibs > Parameter Library Preferences menu option to open the Parameter Library Preferences dialog. Then choose either the Edit Parameter Libraries radio button to add libraries to the  current diagram, or the Edit Default Libraries radio button to add them to default list for all new timing diagrams.

parm_lib_pre

Click the Add Library to List button to open a file dialog, then select the names of the parameter libraries that you want to add to the library list and press the Ok button to close the file dialog.

Notice that the Use full pathnames checkbox is checked. This means that both the library filename and the path information will be added to the library list. If you wish to reference libraries contained only in the current working directory then you can uncheck this checkbox. Usually libraries are organized in a tree directory structure with different paths for different manufacturers, so you will probably want to leave this checked.

The libraries you selected are now listed in the Current library list. At this point you can reference and use the values in the libraries. DO NOT close the Library Preferences dialog as it is used in the next step (this dialog is modeless, so you can leave it open while you perform regular operations).

2) Define specifications for the parameter libraries in the Library Search List (optional, but recommended):

When you use a parameter name in a formula, the program searches the project for the definition. If the definition of the parameter is not found in the project, the libraries are searched in the order they are listed in the library search list until a match is found. If no match is found, the formula will display the error symbol. Since different libraries may have parameters with the same name, you need to set up a way to differentiate which library should be searched to find a particular parameter. Library Specifications let you differentiate which library to search. Also, parameter libraries with library specifications will only be searched if the parameter being sought has a matching specification. Therefore, if you keep a large number of libraries on your library search list, it is a good idea to give them library specifications in order to make parameter searches faster.

In the Parameter Library Preferences dialog, select a library and press the right arrow once to add a specification. Notice that the name of the library has moved into the specification list. Each time you click the right arrow, more of the path is added to the specification. Usually the filename is a sufficient specification.

add_specification

Now when you want to reference a parameter in a specific library, use this notation:

LibrarySpecification:ParameterName              

The next section, 10.2 Referencing Library parameters, shows how to reference a library parameter without having to type the name and specification. Click OK to close the dialog.

3) Define a Macro to represent the specifications of the new parameter library (optional):

Macros allow you to substitute one string or character for another in formula evaluation. Inside of a formula, a macro  name is surrounded by percentage signs to indicate that it is a macro. If you make macros for your library specifications and use the macros in your parameter formulas, you can analyze the impact of switching to parts from another logic family or another vendor by changing the macro values to other library specifications (assuming the parameter names are the same across libraries). You only need to use macros if you plan to switch between libraries.

Select the ParameterLibs > Macro Substitution List menu option to open the Edit Formula Macro dialog

edit_macro_dlg

Enter the macro name into the Name box and the string that you want to replace in the Value box, then press the Add button. Notice that all of the library specifications are listed in the Value drop-down, so you do not have to re-type them. Percentage characters are not allowed in macro names.

The above image defines a macro called lib. When a parameter in a formula is specified as %lib%partname, the %lib% part will be replaced with 3ac.partname. Later if you want to evaluate the timing using the ac library, you can come back to the Edit Formula Marcos dialog and change the value of the macro to ac and the entire timing diagram will change. Assuming that parameter names remain the same between libraries and the appropriate libraries are on the current library list, you can use this technique to switch manufacturers and logic families.

Any number of macros may be used in a single string. However, nesting of macros is not allowed.