Conseils pour le VHDL
Nofi
-
kikifesmol -
kikifesmol -
Bonjour,
Je viens de commencer un projet, je dois récupérer les données d'un objectif CCD CMOS et les mettre en mémoire grâce à un FPGA.
J'ai des gros problèmes, avec Quartus, le temps de compilation est trèèèèès long...
Et lorsque mon programme parvient à se compiler, on me dit que ma licence n'est pas bonne pour la carte que j'ai choisie (le "device").
Auriez vous des conseils s'il vous plait pour repartir dans le bon chemin.
Voilà le code que j'utilise, d'avance merci.
LIBRARY ieee;
Use iEEE.std_logic_1164.all;
Use ieee.std_logic_arith.all;
ENTITY recup IS
PORT(
VSYNC : IN STD_LOGIC;
PCLK : IN STD_LOGIC;
HREF : IN STD_LOGIC;
Y : IN STD_LOGIC_VECTOR (0 TO 7)
);
END recup;
ARCHITECTURE archi OF recup IS
TYPE Matrice is ARRAY (0 TO 639) of std_logic_vector(0 TO 7);
SIGNAL data : Matrice;
SIGNAL i : integer;
BEGIN
PROCESS(PCLK)
BEGIN
LOOP
EXIT WHEN i=1;
IF (VSYNC'EVENT AND VSYNC='0') THEN
IF (PCLK'EVENT AND PCLK='1') THEN
IF HREF='1' THEN
data(i)<=Y;
i<=i+1;
END IF;
END IF;
END IF;
END LOOP;
END PROCESS;
END archi;
Je viens de commencer un projet, je dois récupérer les données d'un objectif CCD CMOS et les mettre en mémoire grâce à un FPGA.
J'ai des gros problèmes, avec Quartus, le temps de compilation est trèèèèès long...
Et lorsque mon programme parvient à se compiler, on me dit que ma licence n'est pas bonne pour la carte que j'ai choisie (le "device").
Auriez vous des conseils s'il vous plait pour repartir dans le bon chemin.
Voilà le code que j'utilise, d'avance merci.
LIBRARY ieee;
Use iEEE.std_logic_1164.all;
Use ieee.std_logic_arith.all;
ENTITY recup IS
PORT(
VSYNC : IN STD_LOGIC;
PCLK : IN STD_LOGIC;
HREF : IN STD_LOGIC;
Y : IN STD_LOGIC_VECTOR (0 TO 7)
);
END recup;
ARCHITECTURE archi OF recup IS
TYPE Matrice is ARRAY (0 TO 639) of std_logic_vector(0 TO 7);
SIGNAL data : Matrice;
SIGNAL i : integer;
BEGIN
PROCESS(PCLK)
BEGIN
LOOP
EXIT WHEN i=1;
IF (VSYNC'EVENT AND VSYNC='0') THEN
IF (PCLK'EVENT AND PCLK='1') THEN
IF HREF='1' THEN
data(i)<=Y;
i<=i+1;
END IF;
END IF;
END IF;
END LOOP;
END PROCESS;
END archi;
4 réponses
Je dois également pour mon stage créer en VHDL un programme capable d'accepter une image en la décomposant sous forme de tableau pour lui appliquer un calcul. Le probléme est que je suis sur QUARTUS comme toi mais je n'arrive pas à récupérer mon fichier(tableau) que j'ai créé censé y avoir ce que j'ai voulu lui écrire. Est ce le logiciel quartus qui n'est pas complet ? Est nous qui faisons des erreur de syntaxe ? difficile de travailler avec ce logiciel. Voici tout de meme mon programme si tu veux y réfléchir, je vais regarder ce qui va pas pour toi et je te tiens au courant. Bye et bonne chance.
LIBRARY ieee ;
use std.textio.all;
USE ieee.std_logic_1164.all ;
LIBRARY std;
ENTITY table5 IS
PORT ( init: IN STD_LOGIC;
acquit: OUT STD_LOGIC );
END table5 ;
ARCHITECTURE testTableau OF table5 IS
BEGIN
PROCESS (init)
file tableau : text;
variable pixel_1 : line;
variable pixel_2 : line;
BEGIN
file_open (tableau,"d:\russell\tableau.txt",write_mode);
write(pixel_1, string'("writing from tableau.txt"));
writeline(tableau, pixel_1);
write( pixel_1,string'("output from tableau.txt.vhdl"));
write(pixel_2, string'("writing from tableau.txt"));
writeline(tableau, pixel_2);
acquit <= not init;
END PROCESS;
END testTableau;
LIBRARY ieee ;
use std.textio.all;
USE ieee.std_logic_1164.all ;
LIBRARY std;
ENTITY table5 IS
PORT ( init: IN STD_LOGIC;
acquit: OUT STD_LOGIC );
END table5 ;
ARCHITECTURE testTableau OF table5 IS
BEGIN
PROCESS (init)
file tableau : text;
variable pixel_1 : line;
variable pixel_2 : line;
BEGIN
file_open (tableau,"d:\russell\tableau.txt",write_mode);
write(pixel_1, string'("writing from tableau.txt"));
writeline(tableau, pixel_1);
write( pixel_1,string'("output from tableau.txt.vhdl"));
write(pixel_2, string'("writing from tableau.txt"));
writeline(tableau, pixel_2);
acquit <= not init;
END PROCESS;
END testTableau;
slt Pour ton premier code, le temps de compilation tres lent est du
à ton
LOOP
EXIT.........
END LOOP
car quartus fait le tour de toutes les possibilités lors de la compilation, et ça doit te prendre un bon quart d'heure à mon avis.
Utilise à la place du LOOP un simple test if avec un compteur.
Pour ton deuxieme code j'ai pas envie de lire le code car j'ai jamais fait de traitement d'image.
à ton
LOOP
EXIT.........
END LOOP
car quartus fait le tour de toutes les possibilités lors de la compilation, et ça doit te prendre un bon quart d'heure à mon avis.
Utilise à la place du LOOP un simple test if avec un compteur.
Pour ton deuxieme code j'ai pas envie de lire le code car j'ai jamais fait de traitement d'image.