Ignore:
Timestamp:
May 21, 2014, 11:36:19 AM (10 years ago)
Author:
rolagamo
Message:

Ceci est la version 16 bits de la plateforme ainsi que la version hierarchique du NoCNoC

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  
    1919-- Additional Comments: Ajout d'un délai pour ignorer les paquets qui sont là depuis
    2020-- longtemps
    21 --
     21--Revision: Mai-02-2014
     22-- Revision 0.01 - File
     23-- Additional Comments: Passage à la version 16 bits
     24-- longtemps
    2225----------------------------------------------------------------------------------
    2326library IEEE;
     
    3437
    3538entity 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);
    3742           reset : in  STD_LOGIC;
    3843           clk : in  STD_LOGIC;
     
    6065type typ_outfsm is (Idle,waiting,dropping,reading);
    6166type typ_receiv is (r_wait,r_head,r_len,r_glen,r_data,r_pulse,r_end);
    62 
     67type typ_store is (idle,accu,transf);
    6368signal EtRec : typ_receiv;
     69signal Et_store,next_et_store: typ_store;
    6470signal Et_out_fsm : typ_outfsm;
    65 signal fifo_empty : std_logic
     71signal fifo_empty ,fifo_wr: std_logic:='0';     
    6672signal sw : std_logic:='0'; -- permet de positionner le mux sur les signaux internes
    6773signal tlimit : natural:=0; --permet de compter les impulsions de temps
    6874signal n : natural:=0; --utiliser pour la mae du tampon de sortie
     75signal nib : natural:=nbyte; --nombre de byte à transférer
    6976signal rcv_start :  std_logic; --début de la réception
    7077signal  rcv_ack : std_logic;   -- acquittement de la réception
    7178signal  rcv_comp :  std_logic; -- fin de la réception
    7279signal   spop,pop,rd_en,dat_avail :  std_logic:='0';
     80signal fifo_in :std_logic_vector(Word-1 downto 0); --le tampon de données d'entrée
    7381signal  mem,fifo_out :  std_logic_vector(Word-1 downto 0); --variable tampon sans intérêt réel
    7482begin
     
    7785                port map (
    7886                        clk => clk,
    79                         din => data_in,
     87                        din => fifo_in,
    8088                        rd_en => rd_en,
    8189                        srst => reset,
    82                         wr_en => wr_en,
     90                        wr_en => fifo_wr,
    8391                        dout => fifo_out,
    8492                        empty => fifo_empty,
    8593                        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;                 
     105next_store_state:process (clk)
     106begin
     107if rising_edge(clk) then
     108case et_store is
     109when idle =>
     110if wr_en='1' then
     111et_store<=transf;
     112nib<=nib-1;
     113else
     114 nib<=nbyte;
     115end if;
     116
     117
     118when 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
     128when 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;
     141end case ;
     142
     143end if;
     144end process next_store_state;
     145
     146val_store_state:process (et_store,nib,data_in,wr_en)
     147begin
     148--case et_store is
     149--when transf =>fifo_wr<='1';
     150--when others => fifo_wr<='0';
     151--end case;
     152if nib=1 then
     153  fifo_wr<='1';
     154else
     155  fifo_wr<='0';
     156end if;
     157fifo_in(8*nib-1 downto 8*(nib-1))<=data_in;
     158end process val_store_state;
     159
    87160
    88161outport_proc : process(clk,reset,fifo_empty)
    89162begin
     163
    90164if rising_edge(clk) then
    91165if reset='1' then
Note: See TracChangeset for help on using the changeset viewer.