Bonsoir,
Je suis Etudiante en mastère de recherche et je suis entrain de faire mon mémoire.j'ai besoin de vous aide et urgent .mon probleme lorsque je develpoe avec vhdl j'ai rencontre des problemes.brv mon procesus est la suivant: j'ai 3 tableau un tableau s'appelle entree ,code_punct et sortie.donc je fait un test sur le tableau de code_punct element par element si code_punct vaut 1 donc sortie(i) va prendre entree(i) sinon(c.a.d code_punct =0) sortie(i) va prendre 0 .le test se fait tout au long de taille de code_punct c.a.d lorsque le tableau de code_punct se fini et le tableau de l'entree pas encore le test se refaire de le debut de tableau de code_punct.exemple entree :111111111 :code_punct: 1101 sortie donc vaut:110111011.voici mon essai .svp quelqu'un m'aider .mon probleme ce que comment retourne le test dés le debut si code_punct se termine ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_arith.all; use ieee.numeric_bit.all; use ieee.numeric_std.all; entity essaii is port ( entree : in std_logic_vector(0 to 8); RST : in std_logic; CLK: in std_logic; sortie : out std_logic_vector(0 to 8) ); end essaii; architecture arch_punctring of essaii is signal code_punct:std_logic_vector(0 to 3); --2/3 signal tmp: std_logic_vector(0 to 8); signal n:integer range 0 to 8; begin U1 : process ( Clk, RST) Variable j:integer range 0 to 8 :=0; variable i:integer range 0 to 3:=0; Begin If ( RST='1') then code_punct<= (others =>'0'); sortie <= (others =>'0'); tmp<=(others=>'0'); elsif (Clk='1' and Clk'event) then n <= entree' length ; if (code_punct ="1101") then n <= entree' length ; for q in 0 to (entree'length ) loop if (j = code_punct'length) then j:=0; else j:=j+1; end if; end loop; for i in 0 to (n - 1) loop if (code_punct(i) ='1') then tmp(i) <= entree(i); i:=i+1; else tmp(j)<='0'; end if; end loop; end if; sortie<=tmp; end if; end process U1; end arch_punctring;
Partager