- Timestamp:
- May 21, 2014, 11:36:19 AM (10 years ago)
- Location:
- PROJECT_CORE_MPI/MPI_HCL/BRANCHES/v2.0
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
PROJECT_CORE_MPI/MPI_HCL/BRANCHES/v2.0/NOC/OUTPUT_PORT_MODULE.vhd
r101 r139 19 19 -- Additional Comments: Ajout d'un délai pour ignorer les paquets qui sont là depuis 20 20 -- longtemps 21 -- 21 --Revision: Mai-02-2014 22 -- Revision 0.01 - File 23 -- Additional Comments: Passage à la version 16 bits 24 -- longtemps 22 25 ---------------------------------------------------------------------------------- 23 26 library IEEE; … … 34 37 35 38 entity OUTPUT_PORT_MODULE is 36 Port ( data_in : in STD_LOGIC_VECTOR (Word-1 downto 0); 39 generic( nbyte : positive:=2); -- le nombre de Byte dans chaque mot du port par défaut 2 40 41 Port ( data_in : in STD_LOGIC_VECTOR (7 downto 0); 37 42 reset : in STD_LOGIC; 38 43 clk : in STD_LOGIC; … … 60 65 type typ_outfsm is (Idle,waiting,dropping,reading); 61 66 type typ_receiv is (r_wait,r_head,r_len,r_glen,r_data,r_pulse,r_end); 62 67 type typ_store is (idle,accu,transf); 63 68 signal EtRec : typ_receiv; 69 signal Et_store,next_et_store: typ_store; 64 70 signal Et_out_fsm : typ_outfsm; 65 signal fifo_empty : std_logic;71 signal fifo_empty ,fifo_wr: std_logic:='0'; 66 72 signal sw : std_logic:='0'; -- permet de positionner le mux sur les signaux internes 67 73 signal tlimit : natural:=0; --permet de compter les impulsions de temps 68 74 signal n : natural:=0; --utiliser pour la mae du tampon de sortie 75 signal nib : natural:=nbyte; --nombre de byte à transférer 69 76 signal rcv_start : std_logic; --début de la réception 70 77 signal rcv_ack : std_logic; -- acquittement de la réception 71 78 signal rcv_comp : std_logic; -- fin de la réception 72 79 signal spop,pop,rd_en,dat_avail : std_logic:='0'; 80 signal fifo_in :std_logic_vector(Word-1 downto 0); --le tampon de données d'entrée 73 81 signal mem,fifo_out : std_logic_vector(Word-1 downto 0); --variable tampon sans intérêt réel 74 82 begin … … 77 85 port map ( 78 86 clk => clk, 79 din => data_in,87 din => fifo_in, 80 88 rd_en => rd_en, 81 89 srst => reset, 82 wr_en => wr_en,90 wr_en => fifo_wr, 83 91 dout => fifo_out, 84 92 empty => fifo_empty, 85 93 full => fifo_full); 86 94 --sync_store_state:process (clk) 95 --begin 96 --if rising_edge(clk) then 97 -- if reset='1' then 98 -- et_store<=idle; 99 -- else 100 -- et_store<=next_et_store; 101 -- end if; 102 -- 103 --end if; 104 --end process sync_store_state; 105 next_store_state:process (clk) 106 begin 107 if rising_edge(clk) then 108 case et_store is 109 when idle => 110 if wr_en='1' then 111 et_store<=transf; 112 nib<=nib-1; 113 else 114 nib<=nbyte; 115 end if; 116 117 118 when accu => 119 120 if nib=1 then 121 et_store<=transf; 122 123 nib<=nbyte; 124 else 125 nib<=nib-1; 126 end if; 127 128 when transf => 129 --next_et_store<=idle; 130 if wr_en='1' then 131 if nib=1 then 132 nib<=nbyte; 133 else 134 nib<=nib-1; 135 end if; 136 et_store<=accu; 137 else 138 nib<=nbyte; 139 et_store<=idle; 140 end if; 141 end case ; 142 143 end if; 144 end process next_store_state; 145 146 val_store_state:process (et_store,nib,data_in,wr_en) 147 begin 148 --case et_store is 149 --when transf =>fifo_wr<='1'; 150 --when others => fifo_wr<='0'; 151 --end case; 152 if nib=1 then 153 fifo_wr<='1'; 154 else 155 fifo_wr<='0'; 156 end if; 157 fifo_in(8*nib-1 downto 8*(nib-1))<=data_in; 158 end process val_store_state; 159 87 160 88 161 outport_proc : process(clk,reset,fifo_empty) 89 162 begin 163 90 164 if rising_edge(clk) then 91 165 if reset='1' then
Note: See TracChangeset
for help on using the changeset viewer.