Mudanças entre as edições de "Configuração da USB para programação do FPGA via JTAG"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
 
(Uma revisão intermediária pelo mesmo usuário não está sendo mostrada)
Linha 1: Linha 1:
=UBUNTU =
+
=LINUX =
 
Antes de poder programar um FPGA usando a interface JTAG é necessário Configurar a USB Blaster para a programação JTAG.
 
Antes de poder programar um FPGA usando a interface JTAG é necessário Configurar a USB Blaster para a programação JTAG.
  
Linha 9: Linha 9:
 
  cd /etc/udev/rules.d
 
  cd /etc/udev/rules.d
 
  gedit 51-usbblaster.rules
 
  gedit 51-usbblaster.rules
 +
 
  # Altera USB-Blaster rule to set mode to 666.  
 
  # Altera USB-Blaster rule to set mode to 666.  
 
  SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",  
 
  SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",  
Linha 27: Linha 28:
 
Para verificar se a JTAG está configurada corretamente, conecte a placa usando a USB e  ligue-a.   
 
Para verificar se a JTAG está configurada corretamente, conecte a placa usando a USB e  ligue-a.   
  
  cd /opt/altera/13.0sp1/quartus/bin
+
  /opt/altera/intelFPGA/20.1/quartus/bin/jtagconfig
  ./jtagconfig
+
ou
 +
  /opt/intelFPGA/20.1/quartus/bin/jtagconfig
  
 
Se estiver OK, deve aparece alguma mensagem do tipo:  
 
Se estiver OK, deve aparece alguma mensagem do tipo:  
  
  1) USB-Blaster [3-3]
+
  1) USB-Blaster [N-N]
 +
  020F40DD  10CL040(Y|Z)/EP3C40/EP4CE30/..
 +
 
  
 
Se permanecer a mensagem abaixo, desligue o kit, ou retire o cabo USB, e reconecte ou ligue novamente o kit.  
 
Se permanecer a mensagem abaixo, desligue o kit, ou retire o cabo USB, e reconecte ou ligue novamente o kit.  
  1) USB-Blaster variant [3-3]
+
  1) USB-Blaster variant [N-N]
 
   Unable to lock chain (Insufficient port permissions)
 
   Unable to lock chain (Insufficient port permissions)
  
Linha 44: Linha 48:
 
FONTE: http://www.altera.com/download/drivers/dri-usb_b-lnx.html
 
FONTE: http://www.altera.com/download/drivers/dri-usb_b-lnx.html
 
FONTE: http://www.eecg.toronto.edu/~laforest/USB-Blaster-Debian.html
 
FONTE: http://www.eecg.toronto.edu/~laforest/USB-Blaster-Debian.html
 +
 +
;Problema 2:
 +
Caso o procedimento acima tenha sido feito e mesmo assim ao executar o comando
 +
  jtagconfig
 +
Não houver uma resposta com os dados da interface utilizada (020F40DD  10CL040(Y|Z)/EP3C40/EP4CE30/..), e o terminar ficar travado com a linha
 +
1) USB-Blaster [N-N]
 +
 +
Será necessário um outro método para acessar a JTAG. A solução encontrada é "matar" o serviço '''jtagd''' e reiniciá-lo.
 +
  pkill -f jtagd -9; /opt/altera/intelFPGA/20.1/quartus/bin/jtagd --user-start;  /opt/altera/intelFPGA/20.1/quartus/bin/jtagconfig
 +
ou 
 +
  pkill -f jtagd -9; /opt/intelFPGA/20.1/quartus/bin/jtagd --user-start;  /opt/intelFPGA/20.1/quartus/bin/jtagconfig
 +
 +
Se tudo estiver correto o terminal deverá mostrar:
 +
1) USB-Blaster [N-N]
 +
  020F40DD  10CL040(Y|Z)/EP3C40/EP4CE30/..
  
 
<!--
 
<!--

Edição atual tal como às 14h21min de 29 de março de 2023

LINUX

Antes de poder programar um FPGA usando a interface JTAG é necessário Configurar a USB Blaster para a programação JTAG.

O procedimento abaixo é usado nos kits:

  • DE2-115, DE0-Nano, DE0 da Altera
  • Mercurio IV da Macnica

Executar como root os seguintes comandos para criar o arquivo altera-usb-blaster.rules na pasta /etc/udev/rules.d

gedit /etc/udev/rules.d/altera-usb-blaster.rules 

Com o conteúdo:

ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="666"
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="666"
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="666"
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="666"
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="666"

Reinicie o computador.

Para verificar se a JTAG está configurada corretamente, conecte a placa usando a USB e ligue-a.

/opt/altera/intelFPGA/20.1/quartus/bin/jtagconfig

ou

/opt/intelFPGA/20.1/quartus/bin/jtagconfig

Se estiver OK, deve aparece alguma mensagem do tipo:

1) USB-Blaster [N-N]
 020F40DD   10CL040(Y|Z)/EP3C40/EP4CE30/..


Se permanecer a mensagem abaixo, desligue o kit, ou retire o cabo USB, e reconecte ou ligue novamente o kit.

1) USB-Blaster variant [N-N]
 Unable to lock chain (Insufficient port permissions)

Caso não esteja OK, aparecerá:

No JTAG hardware available

FONTE: http://www.altera.com/download/drivers/dri-usb_b-lnx.html FONTE: http://www.eecg.toronto.edu/~laforest/USB-Blaster-Debian.html

Problema 2

Caso o procedimento acima tenha sido feito e mesmo assim ao executar o comando

 jtagconfig

Não houver uma resposta com os dados da interface utilizada (020F40DD 10CL040(Y|Z)/EP3C40/EP4CE30/..), e o terminar ficar travado com a linha

1) USB-Blaster [N-N]

Será necessário um outro método para acessar a JTAG. A solução encontrada é "matar" o serviço jtagd e reiniciá-lo.

 pkill -f jtagd -9; /opt/altera/intelFPGA/20.1/quartus/bin/jtagd --user-start;  /opt/altera/intelFPGA/20.1/quartus/bin/jtagconfig

ou

 pkill -f jtagd -9; /opt/intelFPGA/20.1/quartus/bin/jtagd --user-start;  /opt/intelFPGA/20.1/quartus/bin/jtagconfig

Se tudo estiver correto o terminal deverá mostrar:

1) USB-Blaster [N-N]
  020F40DD   10CL040(Y|Z)/EP3C40/EP4CE30/..


WINDOWS

Quando alguém precisar, escrever o procedimento.

Installing Altera usb Blaster Driver

  • Plug in the power and turn on your development board
  • Plug in your Development board or USB Blaster device into a free USB port
  • In Windows 7, 8, 8.1, and 10 go to Start and search for “device manager”
  • Click on Device manager in the search results
  • In device manager find the item list “other devices”
  • Expand that list and there should be “Altera USB-Blaster”
  • Right click on Altera USB-Blaster
  • Choose Update Driver Software...
  • In the popup choose “Browse my computer for driver software”
  • Click Browse and navigate to the altera folder C:\altera
  • Make sure the “Include Subfolders” is checked
  • Click next
  • If successful windows will say “Windows has successfully updated your driver software” Click close
  • Back in device manager under Universal Serial Bus Controllers there should be the Altera USB-Blaster
  • Close out of Device manager and you are now ready to program your Development board.
Note: On the DE2-115 there are two USB ports but the one closet to the edge is the USB blaster
Note: It is best to NOT use USB ports that have active power or an “always on” feature as these ports can damage your development board or USB blaster chip

FONTE: http://fpga.seanwrall.com/lessons/lesson4/ e pdf, video

VER: USB-Blaster Driver for Windows 7 and Windows Vista