Outils pour utilisateurs

Outils du site


fpga

documentation doxygen

syntaxe vhdl

liste de cartes de développement

Memory Interface Generator

tableau types de mémoires

timing VGA pour différentes résolutions

carte avec usb et pleins d'ip

super cours

carte spartan3 de Pierre

Licence ISE

copier le fichier Xilinx.lic dans ~/.Xilinx

serveur de licences au laas

Installation ise sous ubuntu

récupérés sur http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools/v2012_4---14_7.html

cd /local/users/bvandepo
wget -c https://xilinx-ax-dl.entitlenow.com/dl/ul/2013/10/18/R209855202/Xilinx_ISE_DS_Lin_14.7_1015_1.tar/49210d32505ebdabeded7d2d7e0a82d8/5671CD1C/Xilinx_ISE_DS_Lin_14.7_1015_1.tar?akdm=1&filename=Xilinx_ISE_DS_Lin_14.7_1015_1.tar
mv Xilinx_ISE_DS_Lin_14.7_1015_1.tar\?akdm\=1 Xilinx_ISE_DS_Lin_14.7_1015_1.tar
tar xvf Xilinx_ISE_DS_Lin_14.7_1015_1.tar 
cd Xilinx_ISE_DS_Lin_14.7_1015_1
xhost +local:root
sudo ./xsetup
xhost -local:root

Selectionner tout, pour voir le log d'installation:

gedit /opt/Xilinx/14.7/ISE_DS/.xinstall/install.log

installation driver digilent cable jtag-usb

cd /local/users/bvandepo/Xilinx/14.7/ISE_DS/ISE/bin/lin/digilent/digilent.adept.runtime_2.13.1-i686

installation librairies 32 bits sur machine 64 bits

nécessaire par exemple pour l'executable data2mem qui est 32 bits et ne peut donc pas utiliser les libs 64 bits installées par défaut

sudo apt-get install ia32-libs-multiarch

pour lancer ise

cd /local/users/bvandepo/Xilinx/14.7/ISE_DS
source settings32.csh
ise

configuration carte spartan 3 pierre lacroix

le connecteur série se branche directement sur adaptateur USB/serie ou alors avec cable droit au port série du PC

pour pouvoir charger le .bit directement dans le fpga sans passer par la flash, ne laisser que le jumper M1 sur le connecteur de mode JP8

pour pouvoir charger le .bit dans le fpga depuis la flash, laisser tous les jumpers sur le connecteur de mode JP8

simulation avec ghdl et gtkwave

Version 0.29 sur linux 32 bits

wget http://ghdl.free.fr/ghdl-0.29-i686-pc-linux.tar
tar -vxf  ghdl-0.29-i686-pc-linux.tar 
cd ghdl-0.29-i686-pc-linux/
sudo tar -C / -jxvf ghdl-0.29-i686-pc-linux.tar.bz2

s'installe dans /usr/local

Version 0.33 sur linux 64 bits

wget https://github.com/tgingold/ghdl/releases/download/v0.33/ghdl-0.33-x86_64-linux.tgz
sudo tar -C /usr/local/ -vxf  ghdl-0.33-x86_64-linux.tgz 

Gtkwave

sudo apt-get install gtkwave

erreur

ghdl -e deco7seg_tb1
  /usr/bin/ld: cannot find -lz
  collect2: ld a retourné 1 code d'état d'exécution
  ghdl: compilation error
  
ldd -v /usr/local/bin/ghdl 
linux-gate.so.1 =>  (0x00b49000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x004e6000)
/lib/ld-linux.so.2 (0x00f29000)
Version information:
/usr/local/bin/ghdl:
	libc.so.6 (GLIBC_2.2.4) => /lib/i386-linux-gnu/libc.so.6
	libc.so.6 (GLIBC_2.1) => /lib/i386-linux-gnu/libc.so.6
	libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/libc.so.6
/lib/i386-linux-gnu/libc.so.6:
	ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
	ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
	ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

il faut installer le paquet:

sudo apt-get install libghc-zlib-dev 

installation

sudo apt-get install gtkwave
mkdir ~/ghdlbin
cd ~/ghdlbin
wget ghdl.free.fr/site/uploads/Main/ghdl-i686-linux-latest.tar
tar xvf ghdl-i686-linux-latest.tar
cd ghdl-0.29-i686-pc-linux
sudo tar -C / -jxvf ghdl-0.29-i686-pc-linux.tar.bz2

ghdl s'installe dans /usr/local, ce qui pose problème au laas car ce dossier est un montage réseau, et même sudo ne peut pas y créer de dossier (/usr/local/info), mais ce n'est pas grave, les binaires et librairies sont installées correctement

il faut aussi installer le paquet:

sudo apt-get install libghc-zlib-dev 

fichier clean.sh

#!/bin/sh
rm *.o *.cf *.vcd *~
ghdl --clean

fichier pour lancer le test

#!/bin/sh
echo "ghdl -a --ieee=synopsys -fexplicit  cptgn.vhd"
ghdl -a --ieee=synopsys -fexplicit  cptgn.vhd
echo "ghdl -a --ieee=synopsys -fexplicit  tb_cptgn2.vhd"
ghdl -a --ieee=synopsys -fexplicit  tb_cptgn2.vhd
echo "ghdl -e --ieee=synopsys -fexplicit tb_cptgn2"
ghdl -e --ieee=synopsys -fexplicit tb_cptgn2
echo "ghdl -r --ieee=synopsys -fexplicit tb_cptgn2 --vcd=tb_cptgn2.vcd"
ghdl -r --ieee=synopsys -fexplicit tb_cptgn2 --vcd=tb_cptgn2.vcd  --stop-time=10us
echo "gtkwave tb_cptgn2.vcd sp3_cptgn2.sav &"
gtkwave tb_cptgn2.vcd sp3_cptgn2.sav & 
#le .sav sert à conserver les paramètres d'affichage , ctrl-s dans gtkwave pour sauver

ATTENTION, au cas ou certains VHD utilisés dans le projet manquent, il y a juste un warning du type:

../uart/gh_uart_Tx_8bit.vhd:126:1:warning: component instance "u1" is not bound
../uart/gh_uart_Tx_8bit.vhd:44:14:warning: (in default configuration of gh_uart_tx_8bit(a))

TODO: Idéalement, on doit pouvoir générer ces scripts shell ou des makefiles à partir du fichier .xise qui décrit les différents fichiers du projet.

tb.sh
#!/bin/bash
 
COMPONENT_FILES="../src/histogram_byte"
TB_DIR="../tb/"
TB_FILE="tb_histo"
 
GHDL_OPTIONS="--std=02 --ieee=synopsys -fexplicit  --warn-no-vital-generic --workdir=./"
for CURRENT_FILES  in  $COMPONENT_FILES
do
echo ------------------------ Processing $CURRENT_FILES.vhd ------------------------ 
ghdl -a $GHDL_OPTIONS $CURRENT_FILES.vhd
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
done
 
echo ------------------------ Analysis of $TB_DIR$TB_FILE.vhd ------------------------ 
ghdl -a $GHDL_OPTIONS $TB_DIR$TB_FILE.vhd
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
echo ------------------------ Elaboration of $TB_FILE ------------------------ 
ghdl -e $GHDL_OPTIONS $TB_FILE
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
echo ------------------------ Running simulation of $TB_FILE ------------------------ 
ghdl -r $GHDL_OPTIONS $TB_FILE  --vcd=$TB_FILE.vcd --stop-time=10us
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
echo ------------------------ Display simulation of $TB_FILE.vcd ------------------------ 
gtkwave $TB_FILE.vcd $TB_FILE.sav 
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
#le .sav sert à conserver les paramètres d'affichage , ctrl-s dans gtkwave pour sauver

prise en charge librairie arith

ghdl -a --std=02 --ieee=synopsys afficheur.vhd

ou

ghdl -a --std=02 --ieee=mentor afficheur.vhd

en fonction du logiciel utilisé (mentor ou synopsys)

# Voir GHDL guide p16 pour explication sur “–ieee=synopsys -fexplicit”

SUPER DOC DANS /usr/local/info/ghdl.info

exemple de testbench avec liste de stimuli

makefile pour vhdl

bus wishbone

OpenCores

uart avec wrapper wishbone

librairie gh

sram controler with wishbone wrapper

controleur de carte sd

File Naming Conventions

http://www.xilinx.com/itp/xilinx10/isehelp/ise_r_file_names.htm

Filenames for ISE® projects and for project source files must adhere to the following conventions: Filenames must start with a letter (A-Z, a-z) and must contain only alphanumeric characters (A-Z, a-z, 0-9) and underscores (_).

state machines

http://www.xilinx.com/itp/xilinx10/isehelp/ise_c_working_with_state_machines.htm

graphviz: visualisation de graphe de machine à état: http://www.graphviz.org/

statecad: http://www.xilinx.com/itp/xilinx10/help/iseguide/mergedProjects/state/whnjs.htm

ragel: Ragel compiles executable finite state machines from regular languages. Ragel targets C, C++, Objective-C, C#, D, Java, Ruby, OCaml and Go

http://www.complang.org/ragel/

doxygen

xlogiccircuit

http://conter.perso.enseeiht.fr/xlogicintro.html

 
sudo apt-get install openjdk-7-jre

Licences Xilinx au LAAS

Logic Analyser with spartan 3 board

http://www.sump.org/projects/analyzer/

remarque à tester:

fishfish (Thu, 21 Jan 2010):
For anyone else trying to compile for an S3Board with ISE 11.1, change d9 to n8 in la.ucf to get rid of the \"This will not allow the use of the fast path between the IO and the Clock buffer\" error. From what I can tell from the datasheets, this is the only global clock site able to be connected to a clock mux with t9 which isn\'t used for something else on the board.

http://oakmicros.com/content/downloads/Download-document/Logic-Analyzer-Files.html

This package includes all of the required source and binary files in a 3M byte file in ZIP format: http://oakmicros.com/content/downloads/Download-document/Logic-Analyzer-User-Guide.html

carte bas cout: http://gadgetforge.gadgetfactory.net/gf/project/butterflylogic/

vmagic

http://sourceforge.net/projects/vmagic/

Description

vMAGIC is a Java-API which helps creating VHDL generators and analyzers. vMAGIC comprises three parts: 1st a VHDL'93 compliant parser, 2nd a programming model to easily create and modify VHDL constructs, and 3rd a VHDL Writer to generate code.

http://aigamedev.com/open/article/fsm-age-is-over/

terminaux émulation série

softcore 8051 en vhdl

Organisation des dossiers pour dépot git

structure dossier projet vhdl/c/c++/system C

Définir une politique; que met on sur le dépot git que NE met on PAS sur le dépot git

imposer des entêtes de fichiers et des fichiers descripteurs de dossiers (par exemple README)

Dans les entêtes, indiquer l'état du fichier, est ce que c'est en test, quelle version, ce qu'il reste à tester, si c'est validé, dans quel projet c'est utilisé etc…

organisation des dossiers ⇒ permet automatiser des taches (par exemple simu)

eviter de mettre des fichiers avec le même nom à différents endroits⇒ comme ca on peut faire des find . pour rechercher un .vhd d'après le nom d'un composant par exemple

fournit un ensemble d'outils (intégrer par exemple ghdl, comme ca il n'y a pas besoin de l'installer manuellement) et des scripts associés

interfaces de communication avec cartes ⇒softs

comment gérer les testbenchs; 1 dossier à part pour les tb_.vhd? 1 script shell pour lancer la simu par tb fichiers resultats non enregistrés sous git mais il faut prévoir les dossiers et ne pas pourrir les dossiers de sources

gestion de doxygen

1 grosse doc commune à tout

organisation du dossier harddev

components                  contains descriptions of components organised in packages
components/packagesimage
components/packagessram
components/packagesddrram
components/packagesgh
         
datasheets                   
courses                      syntax example etc...
platform		     contains top level entity vhdl file and ucf etc... for specific cards
platform/DIGILENT-spartan3
platform/DIGILENT-nexys
tools                        /tools for automatic code generation, or script to automatize process (eg: testbench with ghdl, or synthesis with ise line command binaries)
tools/src                   
tools/bin
data                        contains data such as images etc...
data/images
data/sounds
data/schematics/                  contains schematics and pcb of electronic boards

softcore 32 bit zpu

doc et jeu d'instruction: http://repo.or.cz/w/zpu.git?a=blob_plain;f=zpu/docs/zpu_arch.html;hb=HEAD#implementations

site web: http://repo.or.cz/w/zpu.git

cd ~/FPGA/zpu
wget http://opensource.zylin.com/zpu/zpugcclinux.tar.bz2
tar -jxvf zpugcclinux.tar.bz2
git clone git://repo.or.cz/zpu.git

fichier de programme helloworld, contient la définition d'une ram double port avec un contenu correspondant aux opcodes etc…

gedit ../../hdl/example/helloworld.vhd

convertisseur:

zpu/hdl/example> cat zpuromgen.c 
  // zpuromgen.c
  // Program to turn a binary file into a VHDL lookup table.
  //   by Adam Pierce
  //   29-Feb-2008
zpu/hdl/zpu4/test/hello
    

doc: http://repo.or.cz/w/zpu.git?a=blob_plain;f=zpu/docs/zpu_arch.html;hb=HEAD#instructionset

voir “ Working with the tools and core ”

cd ~/FPGA/zpu/zpu/zpu/sw/helloworld
export PATH="/home/bvandepo/FPGA/zpu/install/bin:$PATH"
# zpu-elf-gcc hello.c -o hello.elf -phi  #NON CA NE GENERE PAS UN BON FICHIER
zpu-elf-gcc -Os -phi hello.c -o hello.elf -Wl,--relax -Wl,--gc-sections
zpu-elf-objcopy -O binary hello.elf hello.bin
java -classpath ../simulator/zpusim.jar com.zylin.zpu.simulator.tools.MakeRam hello.bin >hello.bram
sudo apt-get install dos2unix

cd ~/FPGA/zpu/zpu/zpu/hdl/example_ghdl
cat README 
chmod +x *.sh
dos2unix *.sh
./ghdl_import.sh
./ghdl_make.sh
./fpga_top --stop-time=2100us --wave=zpu.ghw
gtkwave zpu.ghw  zpu.sav &

pour faire le test helloworld, éditer

gedit  ghdl_import.sh 

et commenter l177 a 182 de

gedit ../../hdl/example/sim_small_fpga_top.vhd

analyse de la trace en texte:

cat trace.txt | more
  #pc,opcode,sp,top_of_stack 
  #----------
   
  0x0000000 0x0B 0x0001FFF8 0x00000000 0x00000000 0x?u 0x0000000000000006
  0x0000001 0x0B 0x0001FFF8 0x00000000 0x00000000 0x?u 0x000000000000000A
  0x0000002 0x0B 0x0001FFF8 0x00000000 0x00000000 0x?u 0x000000000000000E
  0x0000003 0x0B 0x0001FFF8 0x00000000 0x00000000 0x?u 0x0000000000000012
  0x0000004 0x82 0x0001FFF8 0x00000000 0x00000000 0x?u 0x0000000000000016
  0x0000005 0x70 0x0001FFF4 0x00000002 0x00000000 0x?u 0x000000000000001A
  0x0000006 0x0B 0x0001FFF0 0x00000002 0x00000002 0x?u 0x000000000000001E
  0x0000007 0x0B 0x0001FFF0 0x00000002 0x00000002 0x?u 0x0000000000000022
  0x0000008 0x80 0x0001FFF0 0x00000002 0x00000002 0x?u 0x0000000000000026
  0x0000009 0xCF 0x0001FFEC 0x00000000 0x00000002 0x?u 0x000000000000002A
  0x000000A 0xD8 0x0001FFEC 0x0000004F 0x00000002 0x?u 0x000000000000002E
  0x000000B 0x0C 0x0001FFEC 0x000027D8 0x00000002 0x?u 0x0000000000000032
  0x000000C 0x3A 0x0001FFF4 0x00000002 0x00000000 0x?u 0x0000000000000038
  0x0000340 0x81 0x0001FFF0 0x0000000D 0x00000002 0x?u 0x000000000000003C
  0x0000341 0x0B 0x0001FFEC 0x00000001 0x0000000D 0x?u 0x0000000000000040
  0x0000342 0x0B 0x0001FFEC 0x00000001 0x0000000D 0x?u 0x0000000000000044
  0x0000343 0x0B 0x0001FFEC 0x00000001 0x0000000D 0x?u 0x0000000000000048
  0x0000344 0x80 0x0001FFEC 0x00000001 0x0000000D 0x?u 0x000000000000004C
  0x0000345 0xCF 0x0001FFE8 0x00000000 0x00000001 0x?u 0x0000000000000050
  0x0000346 0xD4 0x0001FFE8 0x0000004F 0x00000001 0x?u 0x0000000000000054
  0x0000347 0x0C 0x0001FFE8 0x000027D4 0x00000001 0x?u 0x0000000000000058
  0x0000348 0x51 0x0001FFF0 0x0000000D 0x00000002 0x?u 0x000000000000005E
  0x0000349 0x04 0x0001FFF4 0x0000000D 0x00000000 0x?u 0x0000000000000063
  0x000000D 0x0B 0x0001FFF8 0x00000000 0x00000000 0x?u 0x0000000000000068
  0x000000E 0x0B 0x0001FFF8 0x00000000 0x00000000 0x?u 0x000000000000006C
  0x000000F 0x80 0x0001FFF8 0x00000000 0x00000000 0x?u 0x0000000000000070
  0x0000010 0xC6 0x0001FFF4 0x00000000 0x00000000 0x?u 0x0000000000000074
  0x0000011 0xD0 0x0001FFF4 0x00000046 0x00000000 0x?u 0x0000000000000078
  0x0000012 0x04 0x0001FFF4 0x00002350 0x00000000 0x?u 0x000000000000007C
  0x0002350 0xFD 0x0001FFF8 0x00000000 0x00000000 0x?u 0x0000000000000081
  0x0002351 0x3D 0x0001FFF4 0xFFFFFFFD 0x00000000 0x?u 0x0000000000000085
  0x00003A0 0x02 0x0001FFF0 0x00002352 0xFFFFFFFD 0x?u 0x0000000000000089
  0x00003A1 0x84 0x0001FFEC 0x0001FFF0 0x00002352 0x?u 0x000000000000008D
  0x00003A2 0x05 0x0001FFE8 0x00000004 0x0001FFF0 0x?u 0x0000000000000091
  0x00003A3 0x72 0x0001FFEC 0x0001FFF4 0x00002352 0x?u 0x0000000000000096
  0x00003A4 0x10 0x0001FFE8 0xFFFFFFFD 0x0001FFF4 0x?u 0x000000000000009A
  0x00003A5 0x10 0x0001FFE8 0xFFFFFFFA 0x0001FFF4 0x?u 0x00000000000000A0
  0x00003A6 0x05 0x0001FFE8 0xFFFFFFF4 0x0001FFF4 0x?u 0x00000000000000A6
  0x00003A7 0x52 0x0001FFEC 0x0001FFE8 0x00002352 0x?u 0x00000000000000AB
  0x00003A8 0x04 0x0001FFF0 0x00002352 0x0001FFE8 0x?u 0x00000000000000B0
  0x0002352 0x0D 0x0001FFF4 0x0001FFE8 0x00000000 0x?u 0x00000000000000B5
  0x0002353 0x80 0x0001FFE8 0xFFFFFFF4 0x0001FFE8 0x?u 0x00000000000000BA
  0x0002354 0x0B 0x0001FFE4 0x00000000 0xFFFFFFF4 0x?u 0x00000000000000BE
  

fichier log.txt visualise les sorties sur le port série

exemple zpu+wishbone sur fpga spartan 3

http://embdev.net/articles/ZPU:_Softcore_implementation_on_a_Spartan-3_FPGA

wget http://embdev.net/wikifiles_en/a/a1/ZPU_Softcore_Implementierung_auf_Spartan-3_FPGA.zip

ouvrir avec ise 14.7

convertir le projet en .xise

changer le device de XC3S200 -5 vers XC3S1000 -4

enlever le fichier .bmm du projet (il sert à refabriquer le .bit sans refaire toute la synthèse quand on change le programme C)

idéalement, il faut faire un moniteur qui permet de charger depuis la liaison série vers les block ram

acces au perif en C

The absolute hardware address can be set with a pointer of volatile int. As an example the definition of the switches and LEDs addresses on the board. The value is the address and it will be checked by the hardware multiplexer in the file softcore_top.vhd.

volatile int* intIOSW = (volatile int*)0x80080001;
volatile int* intIOLED = (volatile int*)0x80080002; 

By dereferencing the pointer intIOSW the state of the switches can be read, in the same way the LEDs can be set with the intIOLED.

 while(1) { *intIOLED = *intIOSW; // Reads the value of the switches and sets // the LEDs. //The while loop is used to mirror the // of the switches at all times at the LEDs 

modif du code du softcore

www.xilinx.com/support/documentation/sw_manuals/xilinx13_1/ise_n_data2mem_user_guide.htm

http://www.xilinx.com/support/documentation/sw_manuals/xilinx13_1/data2mem.pdf

These informations are still not enough for Data2MEM to transform the .bmm file because the information of the exact BlockRAM is still missing. It is recommended to give this task to the ISE (more exactly Bitgen). The .bmm file is included in the ISE project and during the Generate Programming File process the .bmm file will be automatically completed. Now is a new .bmm file existing in the project folder and its name is extended by „_bd“ and it's containing the location for all instances like shown below: <vhdl> ADDRESS_MAP softcore_top PPC405 0 ADDRESS_SPACE memory1 RAMB16 [0x00000000:0x00003FFF] BUS_BLOCK core/zpu_core/memory/RAMB16_S4_S4_inst7 [31:28] PLACED = X0Y1; core/zpu_core/memory/RAMB16_S4_S4_inst6 [27:24] PLACED = X0Y5; core/zpu_core/memory/RAMB16_S4_S4_inst5 [23:20] PLACED = X1Y3; core/zpu_core/memory/RAMB16_S4_S4_inst4 [19:16] PLACED = X0Y3; core/zpu_core/memory/RAMB16_S4_S4_inst3 [15:12] PLACED = X0Y0; core/zpu_core/memory/RAMB16_S4_S4_inst2 [11:8] PLACED = X0Y2; core/zpu_core/memory/RAMB16_S4_S4_inst1 [7:4] PLACED = X0Y4; core/zpu_core/memory/RAMB16_S4_S4_inst0 [3:0] PLACED = X1Y2; END_BUS_BLOCK; END_ADDRESS_SPACE; END_ADDRESS_MAP; </vhdl> Data2MEM will need besides of the new generated .bmm file also the .bit and the .elf file. The .bit file is normally located in the top level of the project folder and has the same name as the project. The following command transforms the .bit file: <c> C:\Programme\Xilinx\[program version, e.g. 10.1]\ISE\bin\nt\data2mem -bm [absolute path name]\[file name].bmm -bd [absolute path name]\[file name].elf -bt [absolute path name]\[file name].bit -o b [absolute path name]\[destination file name].bit </c> For my project the file names:

  softcore.bmm 
  main.elf 
  softcore_top.bit 
  softcore_top_fw.bit 
  
cd ~/FPGA/zpuWB/ZPU/C
cat build.sh 

adresse des periphs dans

cat ~/FPGA/zpuWB/ZPU/C/main.h


cd ~/FPGA/zpuWB/ZPU/C
PATH="/home/bvandepo/FPGA/zpu/install/bin:$PATH"
setenv PATH "/home/bvandepo/FPGA/zpu/install/bin:$PATH"
zpu-elf-gcc -Os -phi main.c -o main.elf -Wl,--relax -Wl,--gc-sections -g
zpu-elf-strip main.elf
./data2mem -bm '..\VHDL\BMM\softcore_bd.bmm' -bd '..\C\main.elf' -bt '..\ISE_PROJECT\softcore_top.bit' -o b '..\ISE_PROJECT\softcore_top_fw.bit'

data2mem a été copié depuis /opt/Xilinx/14.7/ISE_DS/ISE/bin/lin/data2mem

visualisation des différences entre 2 fichiers binaires

http://www.man-linux-magique.net/man1/hexdiff.html

sudo apt-get install hexdiff
hexdiff softcore_top.bit softcore_top_fw.bit

touche n pour passer à la différence suivante

exemple zpu+wishbone sur fpga de2

autre zpu

impact en ligne de commande

doc dans la gui de impact; help→help topics

pour entrer en mode batch et saisir les commandes dans la console impact

impact -batch

pour enchainer des commandes définies dans un fichier .cmd

impact -batch fichier.cmd

mettre cette ligne à la fin d'un script shell qui déclare les variables d'environnement (par ex ~/ise2)

le fichier cmd contient

setMode -bs
setCable -port auto
Identify 
identifyMPM 
assignFile -p 1 -file "/home/bvandepo/FPGA/vga/Spartan3VGATest/vgatest.bit"
Program -p 1
quit 

pour générer le .cmd, utiliser impact en mode graphique 1 fois et voir le fichier _impact.log dans le dossier projet et reperer les lignes commencant par / / *** BATCH CMD :

autres commandes éventuellement utiles:

readIdcode -p 1 
bypass -p 2 

avec la commande addDevice -p 1 -file FPGA/vga/Spartan3VGATest/vgatest.bit , j'ai des problèmes sur les IDcode

dans la gui, pour ne pas avoir à tout reconfigurer à chaque utilisation,

Edit->preferences->project settings control-> cocher automatically create et Automatically load  

ZPU pour pierre

récupérer: https://bvdp.inetdoc.net/files/ZPU/ZPU.sav2_FONCTIONNEL_SPARTAN3.tar.gz installer dans ton home dans ~/FPGA/zpu . C'est un ensemble de fichiers qui te permetteNT de faire la synthèse d'un ZPU plus pleins de périphériques sur un bus wishbone. Tu as donc une bonne base pour un système complet (uart etc…)

j'ai fait la synthèse pour la carte que tu m'as prétée avec le xc3S1000. tu peux programmer le ZPU sans refaire la syntèse, juste en recompilant le .c et en updatant le .bit

récupérer: https://bvdp.inetdoc.net/files/ZPU/install.tar.gz et installer dans ton home dans ~/FPGA/zpu tu dois avoir un sous dossier install/ . Ce sont les binaires du compilateur pour ZPU.

Ressources langage VHDL

https://webdocs.cs.ualberta.ca/~amaral/courses/329/labs/VHDL_Guideline.html

dans le script C/build.sh, modifie le PATH pour avoir les binaires du compilateur pour ZPU, qqchose comme:

export PATH="/home/bvandepo/FPGA/zpu/install/bin:$PATH"

ce script compile le fichier C/main.c et génère le binaire .elf. puis patch le .bit pour mettre à jour le contenu des blocks ram avec le nouveau programme puis lance un script impact pour programmer la carte.

tu dois avoir “ABC01234” qui defile sur les 4 afficheurs 7 segments.

fpga.txt · Dernière modification : 2021/02/19 21:20 de 127.0.0.1