Forum Discussion
Altera_Forum
Honored Contributor
12 years agoLet me try and explain a bit more how the Jtag UART works.
The Jtag UART IP inside the FPGA has a small fifo (I think it's 32 bytes by default) and is connected to a virtual JTAG target. When you open a Nios terminal, it connects to that virtual JTAG target through the USB blaster. When your application wants to print something, the JTAG UART driver will write the characters into the hardware fifo, and the Nios terminalwill read them through the JTAG connection, and display them for you. When you use the "Run as..." function in Eclipse, it will automatically open a Nios terminaland connect it for you. But if you just upload a .sof file to the FPGA with Quartus, then there isn't any Nios terminalconnecting to the virtual JTAG target. When this happens and if you try to print anything, the driver will start filling up the fifo, but nothing on the other side will read from it. After a short while, the fifo is full (and with only 32 bytes, this happens very quickly). What to do then? Some drivers choose in that case to throw away the characters and return immediately. The text is lost, but the application still runs. Some drivers, on the other hand, choose to wait for the fifo to have some space again. In that case, your software will stop, at least until you open a Nios terminal. I don't know if it's possible to only open a Nios terminal in Eclipse, without downloading a new software image, but if you open a Nios console (start menu, Altera, Nios II EDS, Nios II command shell) and type "nios2-terminal" then you'll get a terminal.