Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

jtag signal generation

Hi,

I'm implementing JTAG protocol API for NI PXI6552 using C api (niHSDIO_xxxxx) and need some help. Looking at the examples, I figured out how to generate the TMS/TDO/TCK signals. However, I'm having trouble figuring out how to acquire the data coming back from the target device.

 

How can I trigger the acquisition to happen exactly when the generation of the signal happens? All the generation and acquisition samples I see requires signals to be looped back from the connector. It that the only way to acquire data while generating signals at the same time?

 

I'd appreciate any help. I've seen JDW sample vi but I'm not sure how it works since I'm not familiar with LabView.

 

Thanks

 

Brian

 

0 Kudos
Message 1 of 16
(5,285 Views)

Hello Brian,

 

To further support you, can you specify what examples you have been using?  I am assuming you are using the JTAG Digital Waveform Library.

Regards,
Roman Sandoval | National Instruments | RF Systems Engineer
0 Kudos
Message 2 of 16
(5,261 Views)

Hello Roman,

I'm writing my code using C. So, the example I used are DynamicGenerationWithExportedClocks.c and DynamicAcqAndGen-SourceSynchronous.c The AcqAndGen example uses external wire to loop back a signal. Is there a way to synchronize the generation and acquisition without using an external loopback?

 

Thanks.

 

Brian

0 Kudos
Message 3 of 16
(5,255 Views)

Hello Brian,

 

Thank you for responding.  The synchronization of digital generation and acquisition, in particular for JTAG, requires the use of an external loop-back.  This is crucial for system synchronization since data, clock, and start trigger are sent simultaneously to help account for propagation delay and to share timing resources with the JTAG device.

Regards,
Roman Sandoval | National Instruments | RF Systems Engineer
0 Kudos
Message 4 of 16
(5,226 Views)

Thank you for your reply.

I was told by Raajit Lall, that it's possible to send out the trigger signal to the PXI chassis and use that to trigger the acquisition. Is that possible?

 

I attached the e-mail correspondences  Raajit Lall from NI. I also attached by project since I'm getting error when trying to export the event trigger to PXI TRIG0 signal.

 

Thanks.

Download All
0 Kudos
Message 5 of 16
(5,223 Views)

Hello Brian,

You are correct.  Rather than exporting your trigger to an external PFI output, you can export the signal to the PXI trigger backplane using niHSDIO_ExportSignal and selecting any of the available PXI trigger lines.  This function is used to route signals (clocks, triggers, and events) to the output terminal you specify.  The available lines are NIHSDIO_VAL_PXI_TRIG0_STR to NIHSDIO_VAL_PXI_TRIG6_STR.

More information about niHSDIO_ExportSignal and the PXI trigger backplane lines can be located by refering to the NI Digital Waveform Generator/Analyzer Help and searching niHSDIO_ExportSignal.  You can navigate to this resource by selecting Start » All Programs » National Instruments » NI-HSDIO » NI Digital Waveform Generator/Analyzer Help.

Typically, the data, clock, and start triggers are sent simultaneously from the transmitter/HSDIO generation to the DUT and then to the reciever/HSDIO aquisition.  This is particularly important for synchronization regarding round trip delay (RTD).  Since your implementation uses internal lines that exhibit less signal propogation, the system needs to simulate the round trip delay in hardware.  RTD is further explained in NI Digital Waveform Generator/Analyzer Help and by searching Eliminating Round Trip Delay.  Another useful resource is a C example called RoundTripDelayElimination.  You can find the example by navigating to \National Instruments\NI-HSDIO\examples\c\Measurements\RoundTripDelayElimination.  

If you decide to use this example, you must first know your total round trip delay.  You can determine this by looping various delay values and confirming if that delay is acceptable for your system.  Once known, you can set the Data Active Internal Route Delay property or the NIHSDIO_ATTR_DATA_ACTIVE_INTERNAL_ROUTE_DELAY attribute to that number of clock cycles. Then set the Data Position Delay property or the NIHSDIO_ATTR_DATA_POSITION_DELAY attribute to the desired fractional delay.  I hope this is helpful.
Regards,
Roman Sandoval | National Instruments | RF Systems Engineer
0 Kudos
Message 6 of 16
(5,167 Views)

Howdy, folks...

 

I'm trying to do some JTAG using LabWindows/CVI.  I've downloaded the JTAG waveform library, but I see it is for LabView.  Any words on compatibility?  Can I load ".vi" files for use into CVI?

0 Kudos
Message 7 of 16
(4,924 Views)

tomii,

 

VI files are for use with LabVIEW and will not work in CVI (which is a C programming environment).

 

Regards,

Aaron

National Instruments
0 Kudos
Message 8 of 16
(4,907 Views)

figured as much.  Is there any equivalent library available for CVI, or am I going to have to roll my own?

0 Kudos
Message 9 of 16
(4,899 Views)

tomii,

 

Unfortunately, the JTAG Digital Waveform Library is only available in LabVIEW.

National Instruments
0 Kudos
Message 10 of 16
(4,876 Views)