2020年7月20日星期一

Nios II minimum system

AN 717: Nios II Gen2 Hardware Development Tutorial

The latest is from 2014.09.22. Things change.

The minimum system only needs clk, nios process, on chip memory, and jtag art.

I use Quartus 19.1.

The difference is that the new Nios II processor module has two more ports, debug_reset_request and debug_mem_slave.


The debug_reset_request should connect to all other modules except clk_0.
This reset output signal appears when the JTAG Debug module is enabled. This signal is triggered by the JTAG debugger or nios2-download -r command. This signal must be connected to the reset input signal of the Nios II processor which allows the JTAG debugger to reset the processor. This signal can be connected to the reset input signal of other components when needed.

debug_mem_slave connects both data_master and instruction master.


2020年7月19日星期日

Archlinux, usb blaster setup

Quartus programmer fails immediately when downloading.

Add the following lines to the /etc/udev/rules.d/51-usbblaster.rules file.
# Intel FPGA Download Cable
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666" 

# Intel FPGA Download Cable II
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="0666"



If the programmer takes a while to fail,  check the jtagd process, it may become a zombie process.
$ sudo killall -9 jtagd   # Kill jtagd, ...
$ sudo killall -9 jtagd   # ...and verify jtagd is indeed not running.
jtagd: no process found   # Good, verified.

If everything is ok,  run jtagconfig -d, you should see this

[uty@u bin]$ pwd
/home/uty/intelFPGA_lite/19.1/quartus/bin
[uty@u bin]$ jtagconfig -d
1) USB-Blaster [1-3]
   (JTAG Server Version 19.1.0 Build 670 09/22/2019 SJ Standard Edition)
  020F10DD   10CL006(Y|Z)/10CL010(Y|Z)/.. (IR=10)
    Design hash    FB22D0B4FE4AA5509233
    + Node 19104600  Nios II #0
    + Node 0C006E00  JTAG UART #0
    + Node 00086E00  (110:1) #0

  Captured DR after reset = (020F10DD) [32]
  Captured IR after reset = (155) [10]
  Captured Bypass after reset = (0) [1]
  Captured Bypass chain = (0) [1]
  JTAG clock speed 6 MHz

2020年7月13日星期一

Nios II Eclipse

Intel Software: Quartus Prime Pro, Quartus Prime Standard
Type: Answers
Area: Tools

Last Modified: April 03, 2019
Version Found: v19.1
Bug ID: 1409124444

Is the Nios® II Software Build Tools (SBT) for Eclipse included in the full installation of the Intel® Quartus® Prime Pro Edition software starting from version 19.1?

Description

No, the Nios® II SBT for Eclipse is not included starting from Intel® Quartus® Prime Pro and Standard Edition software version 19.1 onwards.

Workaround/Fix

To install the Nios® II SBT for Eclipse, follow the steps below:
1. Download CDT 8.8.1 which is Eclipse C/C++ IDE for Mars.2
2. Extract the downloaded file into <Intel Quartus installation directory>/nios2eds/bin.  You should see the <Intel Quartus installation directory>/nios2eds/bin/eclipse folder after extraction is done.
3. Rename the <Intel Quartus installation directory>/nios2eds/bin/eclipse folder to <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2
4. Extract the <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2_plugins.zip (or tar.gz for Linux) to <Intel Quartus installation directory>/nios2eds/bin. The extraction will override files in <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2. 
5. Verify the extraction is done correctly by making sure you see the <Intel Quartus installation directory>/nios2eds/bin/eclipse_nios2/plugin_customization.ini file
6. You can now launch Nios II SBT for Eclipse via eclipse-nios2.exe

The instructions are included in the <Intel Quartus installation directory>/nios2eds/bin/README.
This information will be included in the future release version of Intel® FPGA Software Installation and Licensing User Guide.

Platform Designer "Can't locate Getopt/Long.pm" Error

Quartus 19.1

The following solves it.

export PERL5LIB=/home/uty/intelFPGA_lite/19.1/quartus/linux64/perl/lib/5.28.1

into

~/.bashrc

solved the problem. Please note that the application must be restarted to inherit the environment variable