Changeset 64 for PROJECT_CORE_MPI/CORE_MPI/BRANCHES/v0.03/sim_fifo.vhd
- Timestamp:
- Apr 22, 2013, 11:35:01 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PROJECT_CORE_MPI/CORE_MPI/BRANCHES/v0.03/sim_fifo.vhd
r15 r64 1 1 -- TestBench Template 2 2 -- ce module permet de tester le FIFO et de valider son fonctionnement. 3 3 LIBRARY ieee; 4 4 USE ieee.std_logic_1164.ALL; 5 5 USE ieee.numeric_std.ALL; 6 use work.CoreTypes.all; 6 Library NocLib ; 7 use NocLib.CoreTypes.all; 7 8 ENTITY testbench IS 8 9 END testbench; … … 15 16 -- Component Declaration 16 17 17 component FIFO_256_FWFT 18 component FIFO_256_FWFT --Le FIFO à tester 18 19 port ( 19 20 clk: IN std_logic; … … 26 27 full: OUT std_logic); 27 28 end component; 28 component proto_receiv 29 component proto_receiv -- permet de tester la lecture dans le FIFO 29 30 generic (sizemem : natural := 64); 30 31 port ( … … 46 47 push : out std_logic:='0'; 47 48 fifo_in : out std_logic_vector(Word-1 downto 0); 48 snd_start : in std_logic; --début de l a réception49 snd_ack :in std_logic; -- acquittement de l a réception50 snd_comp : out std_logic; -- fin de l a réception49 snd_start : in std_logic; --début de l'emission 50 snd_ack :in std_logic; -- acquittement de l'émission 51 snd_comp : out std_logic; -- fin de l'émission 51 52 mem :in memory(0 to sizemem-1)); 52 53 … … 132 133 if rising_edge(clk) then 133 134 case pipo is 134 when fillmem => 135 when fillmem => -- remplissage de la mémoire d'envoie 135 136 if i=0 then 136 storage1(0)<=x"51"; 137 storage1(0)<=x"51"; -- le code de la fonction 137 138 elsif i=1 then 138 storage1(1)<=x" 20";139 elsif i< MSIZE-3then140 storage1(i)<=std_logic_vector(to_unsigned(i ,Word));139 storage1(1)<=x"05"; -- le nombre d'octets à envoyer dans le tampon. 140 elsif (i>=2) and (i<= MSIZE-2) then 141 storage1(i)<=std_logic_vector(to_unsigned(i-2,Word)); 141 142 142 143 else … … 147 148 when send1 => 148 149 149 Son<='1'; 150 Son<='1'; --activer l'emission des données 150 151 Sack<='0'; 151 if i= 10 then152 if i=2 then --activer la réception des données 152 153 Ron<='1'; 153 154 else
Note: See TracChangeset
for help on using the changeset viewer.