Changeset 75 for PROJECT_CORE_MPI


Ignore:
Timestamp:
Jan 15, 2014, 2:43:44 AM (10 years ago)
Author:
rolagamo
Message:
 
Location:
PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/FIFO_DP.vhd

    r22 r75  
    4141full : out std_logic --set as '1' when the queue is full
    4242);
    43 end fifo;
     43end fifo_dp;
    4444
    4545architecture Behavioral of fifo_dp is
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/OUTPUT_PORT_MODULE.vhd

    r69 r75  
    109109if rd_out_en='1' then
    110110        Et_out_fsm<=reading;
    111 elsif tlimit=350 then
     111elsif tlimit=5000 then
    112112        Et_out_fsm<=dropping;
    113113        tlimit<=0;
     
    131131                sw<='0';
    132132                Et_out_fsm<=Idle;
     133                report "Attention Paquet perdu !à Output_Port_Module";
    133134                n<=0;
    134135        end if;
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/proto_send.vhd

    r71 r75  
    5757 signal n,n_i:natural range 0 to 7;
    5858 signal wr_ok,rd_ok:std_logic:='0';
    59  signal sfifo_in,Data_to_send : std_logic_vector(Word-1 downto 0);
     59 signal wr_ok_i,rd_ok_i:std_logic:='0';
     60 signal sfifo_in,Data_to_send,Data_to_send_i  : std_logic_vector(Word-1 downto 0);
    6061 signal spush : std_logic:='0';
    6162 signal err : std_logic_vector(Word-1 downto 0):=(others =>'0');
    6263begin
    6364
    64 Fifo_copy_sync:process(clk)
     65Fifo_copy_sync:process(clk,reset)
    6566
    6667begin
    67 if rising_edge(clk) then
     68
    6869
    6970  if reset='1' then
     
    7172  Snd_state<=0;
    7273  P_len<=0;
     74  Data_to_send<=(others=>'0');
    7375else
     76        if rising_edge(clk) then
    7477  Snd_state<=Next_Snd_state;
    7578  n<=n_i;       
    7679  p_len<=P_len_i;
     80  Data_to_send<=Data_to_send_i;
     81  wr_ok<=wr_ok_i;
     82  rd_ok<=rd_ok_i;
    7783end if;
    7884end if;
     
    8187         Fifo_copy_val:process (Snd_state,Etsnd,copy_mode,data_to_send,rd_ok,wr_ok,spush)
    8288begin
     89        --fifo_out_wr_en<='0';
     90        --fifo_in_rd_en<='0';
     91        --fifo_out_data_in<=data_to_send;
    8392        if copy_mode='0' then
    8493          fifo_out_wr_en<=wr_ok;
     
    95104        -- process qui envoie des données en provenance d'un Fifo vers un Fifo
    96105        FIfo_to_fifo:process(snd_state,copy_mode,snd_start,snd_ack,fifo_in_empty,
    97         fifo_out_full,Fifo_in_data_out,p_len)
     106        fifo_out_full,Fifo_in_data_out,p_len,n,mem,wr_ok,rd_ok)
    98107        variable onepop:std_logic:='0';
    99108        begin
    100109                  Next_snd_state<=snd_state; --valeur par defaut
     110                  Data_To_Send_i<=Data_to_send;
     111                  wr_ok_i<=wr_ok;
     112                  rd_ok_i<=rd_ok;
    101113          case snd_state is
    102114
     
    106118                         n_i<=0;
    107119                     end if;
    108                      wr_ok<='0';rd_ok<='0';onepop:='0';
     120                     wr_ok_i<='0';rd_ok_i<='0';onepop:='0';
    109121                     snd_comp<='0';
    110           when 1=>         if P_len>0 then 
     122         when 1=>         --placer la première donnée sur le bus 
    111123                                                                                    if copy_mode='1' then
    112                                                                                                 if  fifo_in_empty='0' and onepop='0' then
    113                                                                                                                 data_to_send <=fifo_in_data_out ;
    114                                                                                                                 rd_Ok<='1';
    115                                                                                                                         onepop:=not onepop; --une donnée lue il faut arrêter de dépiler
    116                                                                                                                        
     124                                                                                                  if  fifo_in_empty='0'  then
     125                                                                                                                  data_to_send_i <=fifo_in_data_out ;           
     126                                                                                                  end if;
    117127                                                                                                else
    118                                                                                                                         rd_Ok<='0';
    119                                                                                                 end if;
     128                                                                                                  data_to_send_i<=mem(n);
     129                                                                                                 end if;
     130                                                                                                 next_snd_state<=2;     
     131          when 2=>         if P_len>0 then 
     132                                                                                    if copy_mode='1' then
     133                                                                                                  if  fifo_in_empty='0' and onepop='0' then
     134                                                                                                                  data_to_send_i <=fifo_in_data_out ;
     135                                                                                                                  rd_Ok_i<='1';
     136                                                                                                                        onepop:='1'; --une donnée lue il faut arrêter de dépiler
     137                                                                                                                       
     138                                                                                                  else
     139                                                                                                                        rd_Ok_i<='0';
     140                                                                                                  end if;
    120141                                                                                                else
    121                                                                                                   onepop:='1';
    122                                                                                                   data_to_send<=mem(n);
     142                                                                                                  onepop:='1';rd_ok_i<='0'; --pas besoin de signal de lecture ici
     143                                                                                                  data_to_send_i<=mem(n);
    123144                                                                                                 end if;
    124145
    125                                                                                           if (fifo_out_full = '0') and onepop='1'   then                                                                                        wr_ok<='1';
    126                                                                                                         onepop:=not onepop;
    127                                                                                                         wr_ok<='1';
    128                                                                                                         p_len_i<=p_len-1;
    129                                                                                                         n_i<=n+1;
    130                                                                                                        
     146                                                                                          if (fifo_out_full = '0') and onepop='1'   then                                                               
     147                                                                                                                wr_ok_i<='1';
     148                                                                                                         onepop:='0';
     149                                                                                                         p_len_i<=p_len-1;
     150                                                                                                         n_i<=n+1;                                                                                                     
    131151                                                                                                else
    132                                                                                                                 wr_Ok<='0';
    133                                                                                                        
     152                                                                                                                wr_Ok_i<='0';                                                                                                   
    134153                                                                                                end if;
    135154                                                                                        else
    136                                                                                          rd_ok<='0';wr_ok<='0';
    137                                                                                          next_snd_state<=2;
     155                                                                                         rd_ok_i<='0';
     156                                                                                         wr_ok_i<='0';
     157                                                                                         next_snd_state<=3;
    138158                                                                                         snd_comp<='1';
    139159                                                                                        end if;
    140                 when 2 =>  --fin de la copie
     160                when 3 =>  --fin de la copie
    141161                                                                                                if  snd_ack='1' then
    142162                                                                                               
    143                                                                                                     next_snd_state<=3;
     163                                                                                                    next_snd_state<=4;
    144164                                                                                                end if;
    145                                                                                                 wr_ok<='0';rd_ok<='0';
     165                                                                                                wr_ok_i<='0';rd_ok_i<='0';
    146166                                                                                                snd_comp<='1';         
    147                                                                                                                 data_to_send <=(others=>'-');
    148         when 3 =>next_snd_state<=0;
     167                                                                                                               
     168        when 4 =>next_snd_state<=0;
    149169                 snd_comp<='0';
    150170                                                                                                                       
    151171when others => next_snd_state<=0;
    152172                  snd_comp<='0';
    153                   rd_ok<='0';
    154                   wr_ok<='0';
    155                   data_to_send <=(others=>'-');
     173                  rd_ok_i<='0';
     174                  wr_ok_i<='0';
     175                  data_to_send_i <=(others=>'U');
    156176  end case;
    157177        end process FIfo_to_fifo;
Note: See TracChangeset for help on using the changeset viewer.