Never miss a story from RF Design. Subscribe for in-depth analysis and articles.
The Team RF "μWaveRiders" blog series is a showcase for Cadence AWR RF products. Monthly topics will vary between Cadence AWR Design Environment release highlights, feature videos, Cadence Academic Network news (now includes the former AWR University Program), as well as software tips, tricks, customization, and feature spotlights. To receive notifications about new blogs in this series, click Subscribe Now and enter your email address in the Subscriptions box.
The Cadence AWR Design Environment platform is an object-oriented application that contains an Integrated Development Environment (IDE); a multi-purpose development tool that allows programmers to manage AWR Design Environment platform Projects. The platform also includes a scripting tool that features its own IDE-- referred to within the platform as the AWR Scripting Development Environment (AWR SDE). This tool has its own main window, runs its own threads, and manipulates the current project's components, such as collections of objects, their properties and methods. This capability allows you to write scripts that control the program asynchronously.
The AWR Design Environment platform supports scripting based on Visual Basic for Applications (VBA). Scripting automates tasks by controlling simulations through the extensive Application Programming Interface (API) in the platform. VBA scripting is entirely embedded within the platform via the AWR SDE for code development and execution.
The AWR Design Environment platform also includes many useful user utilities accessible via the Scripts menu. You don’t need to know a scripting language or IDE to use the scripts.
Scripting is a great way to automate repetitive tasks. Cadence provides an AWR SDE, a full description of the API objects available, and many examples of how to use each object. The AWR API Scripting Guide contains many working scripts with problems and solutions, and explains the basic concepts of AWR Design Environment scripting while providing you with coding examples. It also provides information on the most useful objects, properties, and methods for creating scripts in the AWR SDE. Selected objects and properties are supplied with detailed explanations and examples to demonstrate various approaches to problem solving.
Other programming languages that support the Common Object Model (COM) interface can be used with the platform. When using these languages, the IDE resides outside of the platform.
Python is one of the languages that can be used for scripting through the COM interface. Previously, one drawback to using Python was the lack of code-completion of the platform’s API commands, rendering a very inefficient code development process. A recent enhancement is the addition of the pyawr library that supports code-completion when using many of the popular Python IDEs. The pyawr library is installed using methods common to other open-source Python libraries. In addition to code-completion, the pyawr library allows for command syntax that is better suited to the Python language than to VBA. One example is the indexing of arrays.
What are the advantages of using Python over VBA for scripting in the AWR Design Environment platform? The VBA implementation in the platform is not very extensive for math functions, and array processing is not very efficient. Python allows access to a large body of open-source libraries for higher-level mathematics, statistics, and digital signal processing. Python itself is very efficient in array processing, and libraries can be accessed for further array processing capability. Python also offers more advanced graphing capability than what is offered using VBA, and you can use your preferred Python IDE for code development and execution. With Python gaining in popularity, there is also a large community of users who offer help in on-line forums.
By: Brian AvenellSr. Principal Product EngineerCadence AWR R&D - U.S.
For questions, general feedback, or suggestions for future blog topics, write to email@example.com.
To receive notifications about new blogs in this series, click Subscribe Now and enter your email address in the Subscriptions box.