Components

cancel
Showing results for 
Search instead for 
Did you mean: 

JTAG Digital Waveform Library

Hi ravirmsp -

 

It looks like your post got cut off before you could describe the problem you're having. To address what was written, the numbers in the "JTAG Channels" control should correspond to the HSDIO channel numbers of your device. In the screenshot you posted, TCK wil be output on ch0, TMS will be output on ch1, etc.

 

If you're trying to write a program and having trouble getting the waveform signals to map to your HSDIO channels, check out this dialogue I had with someone in the SDW library thread. (It spans a couple of pages.) Hopefully it'll provide a study guide for how to extract and organize the waveform signals before mapping them to your HSDIO pins.

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 21 of 45
(9,694 Views)

Hi David,

 

Thanks for your reply.

 

Yes my post got cut off may be due page limitation. I will try again.

 

I am using the example HSDIO JTAG - Core Features.vi without any modification. JTAG channels are configured as per the below screenshot.

JTAG Example Control.png

In the block diagram I could see the following digital signal subset from JTAG to Run Core Device.vi

sample

As per your previous message I should get TCK-0, TMS-1, TDI-2 channels of HSDIO. But I checked with oscilloscope and noticed that   TCK in channel 4, TMS in channel 2 and TDI in channel 1 of HSDIO. Where I am missing to map JTAG channels with HSDIO channels.

Why I couldn't get generate as per the configured JTAG channels. Please provide your suggestions.

 

Thanks

 

0 Kudos
Message 22 of 45
(9,676 Views)

Hi ravirmsp -

 

The signal-to-pin mapping happens in the "niHSDIO Assign Dynamic Channels" VI. Whatever string of pin numbers you give to that VI will be the signal assignment order of the waveform provided to the "niHSDIO Write Named Waveform" VI. The confusing thing in the example program is that default names are left on the signals in the waveform graph. These are not the pin numbers of those signals! The attached screenshot should help to clarify what's going on in the example.

 

I've added some extra graphs to view the waveforms as the program executes. On the right side, you can see the points on the block diagram that I tapped into. In the center are the three graphs that show the raw waveform as it is generated by the JDW library, then the waveform that is sent to the HSDIO board to be generated, then the waveform that is acquired by the HSDIO device after it has been run.

 

On the block diagram, the array {0,2,3,4} is input to the "Get Digital Signal Subset" VI. That VI will grab the signals at those indices and put them in a new waveform. This explains the difference between the Raw Wfm graph, which includes the TDI signal at index 1, and the Gen'd Wfm graph, which does not. Since this example doesn't use the HWC engine, there's no need to provide a signal with compare samples to the device's generation engine. (Indeed, if we did include the TDI signal in the generation waveform, the HSDIO driver would return an error!)

 

The mapping of signals in the Gen'd Wfm graph to pins on the device is handled in the "Init Core Device" subVI, which is shown on the left side of the screenshot. You can see that the "Output Channels" string says to map the four signals in the waveform to pins {0,1,2,4}. That means the waveform signal at index 0 will map to pin 0, index 1 will map to pin 1, index 2 will map to pin 2, and index 3 will map to pin 4. The output from the device's pins should be:

  • pin0: TRST*
  • pin1: TDO
  • pin2: TMS
  • pin3: <nothing, high-Z>
  • pin4: TCK

The output of the "Init Core Device" subVI is the waveform that was acquired by the device. This waveform's signals and pin mapping are completely unrelated to the signals and mapping of the generated waveform. The "Input Channels" control provides a list of pins that the device needs to acquire on, and the waveform that is fetched from the device contains the signals from those pins in the same index order. So for the screenshot's example, the signal at index 0 in the Acq'd Wfm graph corresponds to pin 0, and the signal at index 4 corresponds to pin 3. Referring back to how the output was mapped onto those pins, we see that signal index 4 should be the TDI waveform. (I didn't have my device connected to anything, so seeing '0' on the entire signal supports this conclusion.) The other signals correlate to their output counterparts via pin mapping as expected.

 

I hope this illustrates how pin mapping works with the HSDIO driver. It may be even more helpful for you to write a little subVI that writes the signal names and pin numbers to the various signals displayed by a waveform graph indicator. You can do this by creating a Property Node for the indicator, then using the "Active Plot" and "Plot.Name" properties to set the signal names.

 

signal_label.PNG

David Staab, CLA
Staff Systems Engineer
National Instruments
Message 23 of 45
(9,667 Views)

Hi David,

 

Thanks for your detailed explanation and vi snap shot.

 

With the understanding of waveform index mapping to HSDIO channel, we could able to solve the issue and proceed further.

 

We really thankful for your timely help.

 

0 Kudos
Message 24 of 45
(9,643 Views)

Hi

 

I am trying to understand how the JDW  id code vi works.  Whats the relation between sample rate and tck frequency.

 

Also when i assign it to HSDIO channels Whne should i trigger for acquisition. if i read the idcode it gives me large number of samples and the acquistion is started from Tms goinfg low.

 

Can you please explain the fundamentals.

 

Thanks

chintan

0 Kudos
Message 25 of 45
(9,623 Views)

Hi chintan -

 

Have you read the whitepaper on Serial Protocol Communication with Digital Waveform Devices? It explains these fundamentals and provides example programs that show how to configure the device for use with these libraries.

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 26 of 45
(9,611 Views)

Hi,

 

My colleages have used the JTAG Digital Waveform Library for previous projects, but they each had only a single TAP. The chip that I am working with has multiple TAPs, does JTAG Digital Waveform Library support this?

 

Thanks

 

0 Kudos
Message 27 of 45
(9,544 Views)

Hi Quanticles -

 

Not natively, no. If the multiple TAPs each have their own 4-ch bus, then you can just create multiple sessions of the JDW library, one for each TAP, and put their waveform data together into one wide (many channels) waveform. If they share some signals, like the clock, then you'll have to modify the library to work with this custom bus configuration.

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 28 of 45
(9,542 Views)

I meant TAPs connected serially, like in this diagram:  http://en.wikipedia.org/wiki/File:Jtag_chain.svg

 

 

0 Kudos
Message 29 of 45
(9,540 Views)

In that case, yes. That's the normal configuration for boundary-scan devices. You'll just have to shift TDO/TDI through all the registers in all your devices with each operation, effectively making each command longer (by number of samples).

David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 30 of 45
(9,537 Views)