xTIMEcomposer Unboxing Series: Part 3 - Waves Window

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
User avatar
JasonWhiteman
Active Member
Posts: 63
Joined: Mon Jul 15, 2013 11:39 pm
Contact:

xTIMEcomposer Unboxing Series: Part 3 - Waves Window

Post by JasonWhiteman »

Community,

Unfortunately, at the moment my progress in further progressing down the XMOS path is haulted due to an inability to get the software and/or hardware to work between my PC host and the XTAG-2 hardware. However, this article will focus on an observation in using the "Waves" window during simulation of the PWM window.

In this article, I will explain some initial confusion with looking at the "Waves" window for the PWM example and the later "light bulb" moment when I was finally looking at the signals in the proper manner.

The tutorial is found under Home --> sliceKIT Development Board Tutorial --> xTIMEcomposer Studio Tutorial --> The xTIMEcomposer Waveform Viewer

Following the tutorial, I added the waveform by:
a) Double-click[ing] on PWM.vcd in the Project Explorer
b) In the project explorer: Browse to the XS1_PORT_4A port (the port you selected for our PWM port), open the folder and double-click on tile[1]_XS1_PORT_4A

I was presented with the following default waveform:

Image

When presented with this default waveform, and not yet knowing anything about the XMOS internals - I (incorrectly) ignored the top signals (seen changing between 0x0 and 0xf) and looked at the bottom 3 single signals. Since inuse[1] and direction[1] were both static (always high after initial reset), I initially looked at tWaiting[1] as the PWM signal. After changing around code to try to affect the duty cycle of the tWaiting signal, I stumbled upon the fact that I was not looking at the correct signal at all.

Although the primary issue as a lack of familiarity with the CPU, the more practical issue was knowing which signals to key in on. The code is driving 4 LED signals, and those 4 signals are grouped as tile[1]_XS1_PORT_4A[4].

To show the individual signals, right-click on tile[1]_XS1_PORT_4A[4], right click, and select "Expand".

The response to the "Expand" is a little different than the Tektronix logic analyzers I've used. I am accustomed to "Expand" replacing the original bused signals to be replaced by individual signals. Not with xTIMEcomposer Waves. The response from the GUI is to make a copy of single signals (expanded signals) placed after the last signal in your Waves window. Initially, the Waves window was only tall enough to show the 4 signals in the default view. Therefore, clicking on "Expand" seemingly did nothing. Be sure to drag your window size large enough to see all the signals, or scroll down to see the new expanded non-bused signals.

Image

As expected, the transitions from "0xf" to "0x0" are the actual LED signals as 0xf is simply a nibble of all 1's and of course 0x0 is all 0's.

A few tool quirks:

1) As stated earlier, the expand does not actually expand the bus but instead makes an expanded copy in your Waves window.

2) Only one cursor may be placed on the waves window. Right click on the window, and the red cursor bar will move to the window cursor position. To measure distance between the cursor and a point, the window pointer must be used as the 2nd cursor. In the above screen shot, I had the window cursor at the 0x0 to 0xf transition next to the tooltip "Signal Value: f Num Transitions To Marker: 2". The resulting distance measurement is shown circled in pink (10.00uS).

For documentation purposes, as seen by the screen capture - the 2nd cursor position (windows cursor) does not show up in a screen shot. Therefore, it's difficult to explain where exactly the 2nd "cursor" is located. I would prefer there to be an actual physical cursor. Furthermore, it would be more ideal for the 2 location (38.90us, 28.90us) and delta (10.00us) text areas to also display some text such as "x1:", "x2:", "x2-x1:". The rationale would be for documentation clarity when taking screen shots of the waves window to send to clients/management/team members/etc.

3) While running the project, status is updated in the status line of the window (very bottom of window) even when the "Waves" window is shown. This allows for the user to know when the run has completed. However, unless the "Console" tab is shown, the user cannot stop the run by using an icon. A preferred method would be to transition the shape of the start button (green circle with white "play" triangle) to indicate the current state (launching) and when finished launching, change to a "stop" button to allow stopping the run without having to switch to the "Console" tab.

4) To update the waveform window after code change / run, the "Signals" tab next to the Project Explorer should be displayed and click the amber right/green left arrow icon ("Reload Vcd File"). Altogether, this is acceptable but it may be an improvement to also locate the "Reload Vcd File" icon in the upper-right of the "Waves" tab.

Happy designing and best wishes to success of your XMOS projects ...

Regards,
Jason Whiteman
http://www.xcore.com/forum/viewtopic.php?f=20&t=2247

xTIMEcomposer Unboxing Series: Part 1 - Getting Started

xTIMEcomposer Unboxing Series: Part 2 - 1st Application(PWM)


Post Reply