Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

nios2-terminal/jtag-atlantic data transfer speed on DE0-nano

Altera_Forum
Honored Contributor II
3,159 Views

I need communication interface between DE0-nano and notebook (need transfer large ~16bit x 10000 data array). 

 

I knew, that I can use nios2-terminal for data transfers, but I don't know it average speed. 

 

Before ask this question I found some solutions in internet. For example - http://idle-logic.com/2012/04/15/talking-to-the-de0-nano-using-the-virtual-jtag-interface/ 

But It is not working on Quartus Web Edition (and it is looking crazy - quartus,tcl,tcp/ip ...). 

 

So, I have two questions. 

1. Average speed of data transfers of 'nios2-terminal/jtag-atlantic' 

2. May be somebody know NORMAL solution for data transfers for DE0-nano without additional hardware (or with only wires interconnection). NORMAL means, that on computer can be used C/C++/C#/Java API without launching additional programs. 

 

P.S. I already wrote C# library for 'jtag-atlantic' interface -it is working normal with samples (Gyro, ADC and other text data) but I down't know how It would work with large data transfers.
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
1,634 Views

Let's start with question 2. If you don't want to use any additional hardware then the only interface the Nano offers (that will connect directly to a PC) is the mini USB connector. You can solder wires onto the unit but you will not be able to connect them directly to any I/O connector on your PC. They will all need some sort of additional physical layer hardware. 

 

As the link you posted confirms, the USB connector on the Nano is reserved for the USB-Blaster circuitry. So, if you are looking to use a cable, and nothing else, the route via the on board USB-Blaster is the only option. 

 

So, to question 1 - the USB connection is the only NORMAL way into the Nano. There is no absolute answer to the transfer rate. 'JTAG-Atlantic' refers to an embedded protocol, carried over JTAG - which isn't particularly fast. A couple of other factors, primarily PC related, are going to impact how fast the protocol will actually work. 

 

Having said that, I don't think you're trying to transfer that much data. 10,000 x 16b = 160kbits. Plenty of FPGAs are configured via JTAG, many (probably all) requiring considerably more data. 

 

I have a DE2-115 in front of me. FPGA image size is over 28Mbits - about 175 times the transfer size you discuss. The FPGA takes about 3 seconds to configure via the same on board USB-Blaster circuitry as the Nano. Assume, with jtag-atlantic, you only manage to realise an interface that is 10 times slower, you will transfer your data in about 17ms.
0 Kudos
Altera_Forum
Honored Contributor II
1,634 Views

Thanks! 

I also have DE2-115, but for my task almost all it features are not needed. I want to make a much smaller device. 

Now I have DE2-155 + DCC, and it is connected to PC via Ethernet (Ethernet usage was a task from my mentor for DE2).  

I want try non-standard config: DE0-nano + 2 custom IDE cables + ADA/GPIO (remained from old board).
0 Kudos
Altera_Forum
Honored Contributor II
1,634 Views

Hi Alexei, 

 

I'm trying to do write a C# library for the 'jtag-atlantic' interface as you did. Do you have any suggestions on how to do this/links I could look at it? 

 

Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
1,634 Views

I will post it on github next week if it is needed :-)

0 Kudos
Altera_Forum
Honored Contributor II
1,634 Views

That would be great! Thanks. :)

0 Kudos
Altera_Forum
Honored Contributor II
1,634 Views

Hi Alexei, 

 

I'm still running into problems with this. I think I've created a C# library that Pinvokes all the C++ methods, but when I try to write or read using jtagatlantic_write or jtagatlantic_read I get system memory access exceptions. Did you ever run into that problem? Perhaps this means that my C# library isn't actually working the correct way.  

 

Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
1,634 Views

Look at my code 

https://github.com/alexeischerbakov/alteralib 

 

There are 3 problems: 

1. Locating and loading 'jtag_atlantic.dll' (sometimes quartus bin directory not added to PATH) 

2. Correct calling unmanaged fuctions (mangled names + __cdecl convention) 

3. 32/64 Quartus
0 Kudos
Altera_Forum
Honored Contributor II
1,634 Views

Hi Alexei, 

 

Thanks! It was the second issue. I was not calling the function names correctly. 

 

Thanks!
0 Kudos
Reply